# Update Task Update an existing task. This endpoint is accessible to Owners, Executive Managers, Project Managers, and Team Managers. Endpoint: PUT /tasks/{taskId} Version: 2.0.0 Security: oauth2, apiKey ## Path parameters: - `taskId` (integer, required) ID of the task Example: 500 ## Request fields (application/json): - `workspace_id` (integer, required) ID of the workspace (Team.id from owner_user_rel table) Example: 1 - `project_id` (integer, required) ID of the project Example: 100 - `title` (string) Task title Example: "Implement user authentication" - `description` (string,null) Task description Example: "Add OAuth2 authentication support" - `status` (integer) Task status: 0 = Incomplete, 10 = Doing, 20 = Done, 30 = Completed Enum: 0, 10, 20, 30 - `priority` (integer) Task priority: 10 = Urgent, 20 = High, 30 = Normal, 40 = Low Enum: 10, 20, 30, 40 - `start_date` (string,null) Task start date Example: "2024-01-15" - `end_date` (string,null) Task end date (must be after or equal to start_date) Example: "2024-01-30" ## Response 200 fields (application/json): - `success` (boolean) Example: true - `data` (object) - `data.id` (integer, required) Unique identifier for the task Example: 500 - `data.title` (string, required) Task title Example: "Implement user authentication" - `data.description` (string,null) Task description Example: "Add OAuth2 authentication support" - `data.project_id` (integer, required) ID of the project this task belongs to Example: 100 - `data.owner_id` (integer, required) ID of the workspace owner Example: 10 - `data.creator_id` (integer, required) ID of the user who created the task Example: 100 - `data.status` (integer, required) Task status: 0 = Incomplete, 10 = Doing, 20 = Done, 30 = Completed Enum: 0, 10, 20, 30 - `data.priority` (integer, required) Task priority: 10 = Urgent, 20 = High, 30 = Normal, 40 = Low Enum: 10, 20, 30, 40 - `data.start_date` (string,null) Task start date Example: "2024-01-15" - `data.end_date` (string,null) Task end date Example: "2024-01-30" - `data.completed_at` (string,null) Timestamp when task was completed Example: "2024-01-30T10:00:00Z" - `data.assignees` (array) List of users assigned to this task - `data.assignees.id` (integer, required) Unique identifier for the assignee Example: 100 - `data.assignees.firstname` (string,null) First name of the assigned user Example: "John" - `data.assignees.lastname` (string,null) Last name of the assigned user Example: "Doe" - `data.assignees.email` (string,null) Email of the assigned user Example: "john.doe@example.com" - `data.assignees.user_id` (integer,null) ID of the assigned user Example: 100 - `data.assignees.task_id` (integer,null) ID of the task Example: 500 - `data.assignees.assigner_id` (integer,null) ID of the user who assigned this task Example: 101 - `data.has_details` (boolean) Whether the task has detailed information - `data.created_at` (string,null) Timestamp when task was created Example: "2024-01-15T09:00:00Z" - `data.updated_at` (string,null) Timestamp when task was last updated Example: "2024-01-20T14:30:00Z" - `data.deleted_at` (string,null) Timestamp when task was deleted (soft delete) - `message` (string) Example: "Task updated successfully" - `meta` (object) - `meta.api_version` (string) Example: "2.0.0" - `meta.timestamp` (string) ## Response 400 fields (application/json): - `success` (boolean, required) - `message` (string, required) Error message describing what went wrong Example: "An error occurred" - `error` (string,null) Optional additional error details Example: "Internal Server Error" - `meta` (object, required) - `meta.api_version` (string) Example: "2.0.0" - `meta.timestamp` (string) ## Response 401 fields (application/json): - `success` (boolean, required) - `message` (string, required) Error message describing what went wrong Example: "An error occurred" - `error` (string,null) Optional additional error details Example: "Internal Server Error" - `meta` (object, required) - `meta.api_version` (string) Example: "2.0.0" - `meta.timestamp` (string) ## Response 403 fields (application/json): - `success` (boolean, required) - `message` (string, required) Error message describing what went wrong Example: "An error occurred" - `error` (string,null) Optional additional error details Example: "Internal Server Error" - `meta` (object, required) - `meta.api_version` (string) Example: "2.0.0" - `meta.timestamp` (string) ## Response 404 fields (application/json): - `success` (boolean, required) - `message` (string, required) Error message describing what went wrong Example: "An error occurred" - `error` (string,null) Optional additional error details Example: "Internal Server Error" - `meta` (object, required) - `meta.api_version` (string) Example: "2.0.0" - `meta.timestamp` (string) ## Response 422 fields (application/json): - `success` (boolean, required) - `message` (string, required) Example: "Validation failed" - `errors` (object, required) Object containing validation error messages for each field Example: {"email":["The email field is required.","The email must be a valid email address."],"firstname":["The firstname field is required."],"role":["The selected role is invalid."]} - `meta` (object, required) - `meta.api_version` (string) Example: "2.0.0" - `meta.timestamp` (string) ## Response 500 fields (application/json): - `success` (boolean, required) - `message` (string, required) Error message describing what went wrong Example: "An error occurred" - `error` (string,null) Optional additional error details Example: "Internal Server Error" - `meta` (object, required) - `meta.api_version` (string) Example: "2.0.0" - `meta.timestamp` (string)