Skip to main content
POST
/
functions
/
deployments
Create a function deployment
curl --request POST \
  --url https://api.nango.dev/functions/deployments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "function",
  "integration_id": "<string>",
  "function_name": "<string>",
  "code": "<string>",
  "version": "<string>",
  "allow_destructive": true
}
'
{
  "id": "<string>",
  "created_at": "2023-11-07T05:31:56Z"
}
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).

Authorizations

Authorization
string
header
required

The secret key from your Nango environment.

Body

application/json
type
enum<string>
required

Deploy submitted function source code.

Available options:
function
integration_id
string
required

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

function_name
string
required

The sync or action function name.

function_type
enum<string>
required
Available options:
action,
sync
code
string
required

The TypeScript source code for the function.

Minimum string length: 1
version
string

Optional version tag for this deployment.

allow_destructive
boolean

Allow overwriting an existing standalone function with the same name.

Response

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.

id
string
required
status
enum<string>
required

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

Available options:
waiting,
running,
success,
failed
created_at
string<date-time>
required