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.updateor task-related permissions
Headers
| Header | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Bearer token: Bearer <token> |
Content-Type | string | Yes | application/json |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace identifier |
taskId | string | Yes | Task 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
| Parameter | Type | Required | Description |
|---|---|---|---|
assigneeId | string | No | Staff member ID to assign the task to |
title | string | No | Task title (minimum 1 character if provided) |
description | string | No | Task description (maximum 2000 characters, can be null) |
status | string | No | Task status. Valid values: pending, in-progress, blocked, completed |
priority | string | No | Task priority. Valid values: low, medium, high |
dueAt | string | No | Due date in ISO 8601 format (without timezone offset, can be null) |
blockers | array | No | Array 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