BackendHTTP APIFunctions

Create a function deployment

Requires an API key with the environment:deploy scope. Learn more about API key scopes.

Deploys a function to an existing integration: either submitted TypeScript source code (type: function) or a template from the provider catalog (type: template).

POST
/functions/deployments

Deploys a function to an existing integration. Use type: function to deploy submitted TypeScript source code, or type: template to deploy a template from the provider catalog. Requires an API key with the environment:deploy scope.

Authorization

bearerAuth
headerAuthorizationBearer <token>

An Environment API key from your Tenklo environment, or an Account API key for account-level endpoints.

Request Body

application/json
  1. body
type*"function"

Deploy submitted function source code.

Value in"function"
integration_id*string

The integration ID (unique_key) that you created in Tenklo.

function_name*string

The sync or action function name.

function_type*RunnableFunctionType
Value in"action""sync"
code*string

The TypeScript source code for the function.

Length1 <= length
version?string

Optional version tag for this deployment.

allow_destructive?boolean

Allow overwriting an existing standalone function with the same name.

Response Body

Deployment record. status may be any of waiting, running, success, or failed. If it is not success, poll GET /functions/deployments/{id} for the final status and details.

application/json
  1. response
id*string
status*string

The status of the function deployment. Poll GET /functions/deployments/{id} to get the final status.

Value in"waiting""running""success""failed"
created_at*string
Formatdate-time
Example Request
curl -X POST 'https://api.tenklo.dev/functions/deployments' \  -H 'Content-Type: application/json' \  -d '{  "type": "function",  "integration_id": "string",  "function_name": "string",  "function_type": "action",  "code": "string"}'
Example Response
{  "id": "string",  "status": "waiting",  "created_at": "2019-08-24T14:15:22Z"}