> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xenia.team/llms.txt
> Use this file to discover all available pages before exploring further.

# Change Task Status

> Set a task's status. Requires Change Task Status (or Change Work Order Status for a work order). Without Change Status of Others' Tasks the key may only re-status records assigned to its user, their teams, their locations or their role.



## OpenAPI

````yaml PATCH /api/v1/ops/workspaces/{workspaceId}/tasks/{taskId}/status
openapi: 3.1.0
info:
  title: Xenia Team API - Change Task Status
  version: 1.0.0
  description: >-
    Changes a task's status. The body field is `status` - not `taskStatus`,
    which is the create-body field.
servers:
  - url: https://api.xenia.team
security: []
paths:
  /api/v1/ops/workspaces/{workspaceId}/tasks/{taskId}/status:
    patch:
      tags:
        - Tasks
      summary: Change Task Status
      description: >-
        Set a task's status. Requires Change Task Status (or Change Work Order
        Status for a work order). Without Change Status of Others' Tasks the key
        may only re-status records assigned to its user, their teams, their
        locations or their role.
      parameters:
        - name: workspaceId
          in: path
          required: true
          description: UUID of the workspace. Must be your key's own workspace.
          schema:
            type: string
            format: uuid
            example: cb363f7e-c52a-4478-911d-f6a6f791090e
        - name: taskId
          in: path
          required: true
          description: UUID of the task.
          schema:
            type: string
            format: uuid
            example: 232154c0-c239-48f8-b670-0e5d12fd64d0
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - status
              properties:
                status:
                  type: string
                  enum:
                    - Open
                    - In Progress
                    - On Hold
                    - Paused
                    - Completed
                  description: >-
                    The new status. Note the field is `status`, not
                    `taskStatus`.
            example:
              status: Completed
      responses:
        '200':
          description: Status updated.
        '400':
          description: Bad request - missing or invalid fields.
        '401':
          description: >-
            Unauthorized - invalid client credentials, or the key does not
            belong to this workspace.
        '403':
          description: >-
            Forbidden - API key not authorized for this route, or the key's user
            lacks the required permission.
        '404':
          description: Task not found.
        '405':
          description: >-
            Completion blocked - the task requires a template submission that
            has not been submitted yet ("Completion of template is required to
            finish this task").
        '500':
          description: Internal server error.
      security:
        - clientKey: []
          clientSecret: []
components:
  securitySchemes:
    clientKey:
      type: apiKey
      in: header
      name: x-client-key
    clientSecret:
      type: apiKey
      in: header
      name: x-client-secret

````