Skip to main content

Execute a Task

Execute a task

Contents

Overview

  • Endpoint URL: https://{Services API hostname}/tasks/{id}/execute
  • Request method: HTTP POST
  • Response Content-Type: application/json
  • Auth required: yes

Manually trigger immediate execution of a task, bypassing the scheduled trigger.once time. This is useful for testing or when you need to run a task immediately without waiting for the scheduled time.

Version-specific information

The following version-specific changes apply to this endpoint:

VersionChange details
N/AN/A

Permissions and Authentication

This endpoint requires chain-scoped authentication on the Services API. See the authentication page for more details on authentication methods. The following authentication types are permitted:

  • Privileged authentication: the use of privileged authentication is permitted for this endpoint.
  • Admin authentication: the use of admin authentication is permitted. The performing user needs to have the appropriate access level for the chain.

Headers

The following headers can/must be passed to the API call:

ParameterDescription
N/AN/A

URL parameters

ParameterTypeRequiredDescription
idintegerrequiredThe ID of the task.

Sample request

curl -X POST 'https://{Services API hostname}/tasks/12345/execute' \
-H 'Authorization: Bearer ACCESS_TOKEN_ID:ACCESS_TOKEN_SECRET'

Sample response

Returns the task state object on success.

FieldTypeDescription
codestringFinal state: DONE or ERROR.
last_run_datestringISO 8601 datetime when the task ran.
last_modifiedstringISO 8601 datetime of the last state change.
created_datestringISO 8601 datetime when the task was created.
{
"code": "DONE",
"last_run_date": "2026-05-26T14:35:00Z",
"last_modified": "2026-05-26T14:35:45Z",
"created_date": "2026-05-26T11:59:00Z"
}

Possible error responses

The following represents a list of possible error responses for this endpoint:

ConditionDescription
Task not foundNo task exists with the specified ID for this chain.
Task execution failedThe task encountered an error during execution.
Authentication failureNo valid authentication provided or insufficient permissions.