Update a Task
Update a task
Contents
- Overview
- Version-specific information
- Permissions and Authentication
- Headers
- URL parameters
- JSON body parameters
- Sample request
- Sample response
- Possible error responses
Overview
- Endpoint URL:
https://{Services API hostname}/tasks/{id} - Request method: HTTP PUT
- Request Content-Type: application/json
- Response Content-Type: application/json
- Auth required: yes
Update an existing task's description, target, or trigger configuration. Only tasks that have not yet started executing can be meaningfully updated.
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. |
JSON body parameters
The following JSON parameters can be passed in the request body. Any provided field will overwrite the existing value on the task.
| Parameter | Type | Required | Description |
|---|---|---|---|
desc | string | optional | Updated description. |
target | object | optional | Updated target configuration. See Target parameters. |
trigger | object | optional | Updated trigger configuration. See Scheduling and triggers. |
debug | string | optional | Updated debug string. |
Sample request
curl -X PUT 'https://{Services API hostname}/tasks/12345' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ACCESS_TOKEN_ID:ACCESS_TOKEN_SECRET' \
-d '{
"desc": "Updated wallet ledger export",
"target": {
"action": "export",
"export_index": "wallet-ledger",
"export_format": "json"
},
"trigger": {
"once": "2026-05-27T10:00:00Z"
}
}'
Sample response
Returns the updated task object with HTTP status 200 OK. See Task object structure for a description of all fields.
{
"id": 12345,
"chain": 1764,
"desc": "Updated wallet ledger export",
"state": {
"code": "READY",
"last_run_date": "0001-01-01T00:00:00Z",
"last_modified": "2026-05-26T14:30:00Z",
"created_date": "2026-05-26T11:59:00Z"
},
"trigger": {
"once": "2026-05-27T10:00:00Z"
},
"target": {
"action": "export",
"export_index": "wallet-ledger",
"export_format": "json"
},
"logs": null,
"debug": "",
"version": 2,
"result": ""
}
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. |
| Invalid target or trigger | The provided target or trigger configuration is not valid. |
| Authentication failure | No valid authentication provided or insufficient permissions. |