Skip to main content

Update a Task

Update a task

Contents

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:

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.

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.

ParameterTypeRequiredDescription
descstringoptionalUpdated description.
targetobjectoptionalUpdated target configuration. See Target parameters.
triggerobjectoptionalUpdated trigger configuration. See Scheduling and triggers.
debugstringoptionalUpdated 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:

ConditionDescription
Task not foundNo task exists with the specified ID for this chain.
Invalid target or triggerThe provided target or trigger configuration is not valid.
Authentication failureNo valid authentication provided or insufficient permissions.