Skip to main content

Update Task (v1)

Method + Path

PATCH /v1/workspace/:workspaceId/staff/tasks/:taskId

Actual backend path: /v1/workspace/:workspaceId/staff/tasks/:taskId

Description

Update an existing task. All fields are optional - only provided fields will be updated.

Authentication

Required - JWT token in Authorization header

Required Permissions:

  • staff.update or task-related permissions

Headers

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token: Bearer <token>
Content-TypestringYesapplication/json

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace identifier
taskIdstringYesTask identifier

Request Body

{
"title": "Updated task title",
"description": "Updated description",
"status": "in-progress",
"priority": "medium",
"dueAt": "2024-01-25T10:00:00Z",
"blockers": ["New blocker added"]
}

Body Parameters

ParameterTypeRequiredDescription
assigneeIdstringNoStaff member ID to assign the task to
titlestringNoTask title (minimum 1 character if provided)
descriptionstringNoTask description (maximum 2000 characters, can be null)
statusstringNoTask status. Valid values: pending, in-progress, blocked, completed
prioritystringNoTask priority. Valid values: low, medium, high
dueAtstringNoDue date in ISO 8601 format (without timezone offset, can be null)
blockersarrayNoArray of blocker descriptions (maximum 20, each max 200 characters)

Note: At least one field must be provided for update.

Response (200)

{
"task": {
"id": "507f1f77bcf86cd799439011",
"assigneeId": "507f1f77bcf86cd799439012",
"title": "Updated task title",
"description": "Updated description",
"status": "in-progress",
"priority": "medium",
"dueAt": "2024-01-25T10:00:00Z",
"blockers": ["New blocker added"],
"updatedAt": "2024-01-15T11:00:00Z"
}
}

Common Errors

  • 400 Bad Request: Invalid request body or no fields provided
  • 401 Unauthorized: Missing or invalid authentication token
  • 403 Forbidden: Insufficient permissions
  • 404 Not Found: Task or workspace not found
  • 422 Unprocessable Entity: Validation errors
  • 500 Internal Server Error: Server error