Create a custom function

View as Markdown
Creates a new custom function for the team.

Authentication

x-api-keystring
API Key authentication via header

Request

This endpoint expects an object.
pathstringRequiredformat: "^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 are not supported. The name must be at least two characters, start with a letter, underscore, or dollar sign, and contain only letters, numbers, underscores, and dollar signs.

contentstringRequired

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

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

Response

Custom Function Created
idstring
The resource's ID.

Errors

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