Update a task
client.task.update(stringid, TaskUpdateParams { fields, relationships } body, RequestOptionsoptions?): TaskUpdateResponse { id, createdAt, fields, 4 more }
POST/v1/tasks/{id}
Updates an existing task by ID. Only included fields and relationships are modified.
The $note relationship is read-only — manage notes via their own relationships.
Supports idempotency via the Idempotency-Key header.
Required scope: tasks:update
Rate limit category: Write
Parameters
id: string
Unique identifier of the task to update.
Returns
Update a task
import Lightfield from 'lightfield';
const client = new Lightfield({
apiKey: 'My API Key',
});
const taskUpdateResponse = await client.task.update('id');
console.log(taskUpdateResponse.id);{
"id": "id",
"createdAt": "createdAt",
"fields": {
"foo": {
"value": "string",
"valueType": "ADDRESS"
}
},
"httpLink": "httpLink",
"relationships": {
"foo": {
"cardinality": "cardinality",
"objectType": "objectType",
"values": [
"string"
]
}
},
"updatedAt": "updatedAt",
"externalId": "externalId"
}Returns Examples
{
"id": "id",
"createdAt": "createdAt",
"fields": {
"foo": {
"value": "string",
"valueType": "ADDRESS"
}
},
"httpLink": "httpLink",
"relationships": {
"foo": {
"cardinality": "cardinality",
"objectType": "objectType",
"values": [
"string"
]
}
},
"updatedAt": "updatedAt",
"externalId": "externalId"
}