All requests must include an
Authorization: Bearer <secret-key> header. See Authentication for details.Trigger action
POST /action/trigger
Executes an action function for a specific connection and returns the function’s output.
The action function receives the input you provide and executes with the credentials of the specified connection. Execution is synchronous — the request waits until the function completes and returns its result.
Headers
Bearer <secret-key>The ID of the connection the action runs on behalf of.
The integration ID (unique key) for the connection.
Body
The name of the action to trigger, as defined in
nango.yaml.Input data passed to the action function as
nango.input. Can be any JSON-serializable value — object, array, string, or number. The expected shape is defined by your action’s input model in nango.yaml.Response
The response body is the value returned by the action function’sreturn statement. The shape is defined by your action’s output model in nango.yaml.
If the action returns an object, the response is that object. If it returns void, the response body is empty.
Response
Trigger action asynchronously
POST /action/trigger with X-Async: true
Triggers the action and returns immediately with a job ID, without waiting for the function to complete. Poll the status URL to retrieve the result when it is ready.
Additional header
Set to
true to trigger the action asynchronously.Response
Unique ID for the async action job.
URL to poll for the result. Make a
GET request to this URL with your secret key to retrieve the output when complete.Response
Error handling
Action errors
When an action function throws an error, the API returns a400 response with the error message from the function.
Timeout
Actions have a maximum execution time. If the function runs longer than the allowed limit, the request returns a408 response.
Connection not found
If the specified connection does not exist, the API returns404.
Missing action
If the action name does not match a deployed action for the integration, the API returns404.