Execute a Task
Execute a task
Contents
- Overview
- Version-specific information
- Permissions and Authentication
- Headers
- URL parameters
- Sample request
- Sample response
- Possible error responses
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:
| Version | Change details |
|---|---|
| N/A | N/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:
| Parameter | Description |
|---|---|
| N/A | N/A |
URL parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | required | The 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.
| Field | Type | Description |
|---|---|---|
code | string | Final state: DONE or ERROR. |
last_run_date | string | ISO 8601 datetime when the task ran. |
last_modified | string | ISO 8601 datetime of the last state change. |
created_date | string | ISO 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:
| Condition | Description |
|---|---|
| Task not found | No task exists with the specified ID for this chain. |
| Task execution failed | The task encountered an error during execution. |
| Authentication failure | No valid authentication provided or insufficient permissions. |