Update a custom function

View as Markdown

Updates a custom function. Only the fields present in the request body are updated. If content is provided, it replaces the entire contents of the custom function.

Authentication

x-api-keystring
API Key authentication via header

Path parameters

customFunctionIdstringRequired
The custom function's ID.

Request

This endpoint expects an object.
pathstringOptionalformat: "^functions/[a-zA-Z_$][a-zA-Z0-9_$]+\.js$"<=512 characters

The custom function’s path, in the form functions/<name>.js. Root-level paths and nested paths aren’t supported.

descriptionstringOptional<=255 characters
The custom function's description.
contentstringOptional

The custom function’s content, up to a maximum of 500 KB (UTF-8).

Response

Custom Function Updated
idstring
The resource's ID.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
500
Internal Server Error