Skip to content

Update Task

This endpoint updates an existing task by ID. Only the fields you send are changed.

PUT /v1/tasks/tasks/:id

Include your API key in the x-api-key header. See Authentication.

tasks:write
ParameterTypeRequiredDescription
idstringYesTask ID to update.

Send a JSON body. A request with no body returns 500. You cannot move a task to another project or client.

FieldTypeRequiredDescription
namestringNoNew task name.
descriptionstring | nullNoNew task description.
isArchivedbooleanNoNew archive state.
autoAssignbooleanNoNew auto-assign state. You can set it to true only when the parent project has autoAssign: true. Otherwise the API returns 400.
billingCategory"BILLABLE" | "NON_BILLABLE" | nullNoNew billing category. Allowed only when the parent project’s billingCategory is null. Otherwise the task inherits the project’s value, and sending this field (even null) returns 400. Any other string returns 500.
{
"name": "Updated Task Name",
"description": "Updated task description"
}
Terminal window
curl -X PUT "https://api.crewsum.com/v1/tasks/tasks/task-pqr123stu4567890" \
-H "x-api-key: $CREWSUM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Updated Task Name",
"description": "Updated task description"
}'

On success, the API returns HTTP 200 OK.

{
"message": "Successfully updated task: task-pqr123stu4567890"
}
  • To change a task’s billing category while its project has one, update the project instead. A project’s billingCategory applies to all of its tasks. See Update Project.
  • Setting autoAssign to false does not remove existing user assignments.
  • If no task exists for the ID, the API returns 200 and changes nothing, unless the request includes billingCategory or autoAssign: true. In that case it returns one of the 400 errors below. No webhook is sent for an unknown ID.
  • After the task is updated, Crewsum emits the tasks.updated webhook event. A webhook delivery failure does not change the API response.
StatusMeaning
400The task ID was missing from the route.
400Cannot set task billingCategory while project billingCategory is set: you sent billingCategory, and the parent project has a billing category (or the task does not exist).
400Cannot auto assign task while project auto assign is disabled: you sent autoAssign: true, and the parent project has autoAssign: false (or the task does not exist).
500Crewsum could not update the task. The message is Error updating task <id>. This includes an invalid billingCategory and a request with no JSON body.

Authentication and scope failures are described in Errors.