> ## 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.

# Update Task



## OpenAPI

````yaml POST /api/v1/task/editTask
openapi: 3.1.0
info:
  title: Xenia Team API - Update Task
  version: 1.0.0
  description: Update an existing task with new metadata, dates, assignees, priority, etc.
servers:
  - url: https://api.xenia.team
security: []
paths:
  /api/v1/task/editTask:
    post:
      tags:
        - Task
      summary: Edit a task
      operationId: editTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EditTaskRequest'
            example:
              id: 45b6ccf5-2d69-4981-9826-d9b7389d041e
              title: room inspection - edit
              description: test description edit
              priority: Medium
              taskStatus: Open
              startDate: '2025-06-23T19:00:00.000Z'
              dueDate: '2025-06-25T18:30:00.000Z'
              startTime: '2025-06-24T08:00:00-11:00'
              dueTime: '2025-06-26T07:30:00-11:00'
              isTimeBound: true
              isChecklistRequired: false
              timezone: Asia/Karachi
              AssetId: 640c4797-7141-4419-b14f-d632ed5aabfd
              LocationId: 62c70dc8-f8ce-4dfe-a798-844197610e11
              ServiceId: 50d9f381-eba0-41b0-b26b-70a47a854252
              CompletedBy: dfea8b8a-5b22-4668-b68d-dc641eb3a101
              assignees:
                - b465548d-69fc-42e3-b406-6af3b9d2f62a
                - dfea8b8a-5b22-4668-b68d-dc641eb3a101
              locationIds:
                - b9164b03-60c2-4500-89a4-f490e38c9872
              attachment:
                - https://cdn.xenia.team/.../screenshot1.png
                - https://cdn.xenia.team/.../screenshot2.png
              notification:
                overdue:
                  recipients:
                    - e25dd448-7ae7-4588-8767-7e1a316547e5
                statusChange:
                  recipients: []
      responses:
        '200':
          description: Task updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EditTaskResponse'
        '400':
          description: Bad Request - Invalid input data.
        '401':
          description: Unauthorized - Missing or invalid authentication.
        '403':
          description: Forbidden - Insufficient permissions to update task.
        '404':
          description: Not Found - Task does not exist.
        '500':
          description: Internal Server Error.
      security:
        - clientKey: []
          clientSecret: []
components:
  schemas:
    EditTaskRequest:
      type: object
      properties:
        id:
          type: string
          format: uuid
        title:
          type: string
        description:
          type: string
        priority:
          type: string
          enum:
            - Low
            - Medium
            - High
            - Critical
        taskStatus:
          type: string
          enum:
            - Open
            - In Progress
            - On Hold
            - Closed
            - Cancelled
        startDate:
          type: string
          format: date-time
        dueDate:
          type: string
          format: date-time
        startTime:
          type: string
          format: date-time
        dueTime:
          type: string
          format: date-time
        endTime:
          type: string
          format: date-time
          nullable: true
        timezone:
          type: string
        isTimeBound:
          type: boolean
        isChecklistRequired:
          type: boolean
        AssetId:
          type: string
          format: uuid
        LocationId:
          type: string
          format: uuid
        ServiceId:
          type: string
          format: uuid
        CompletedBy:
          type: string
          format: uuid
        assignees:
          type: array
          items:
            type: string
            format: uuid
        locationIds:
          type: array
          items:
            type: string
            format: uuid
        attachment:
          type: array
          items:
            type: string
            format: uri
        notification:
          type: object
          properties:
            overdue:
              type: object
              properties:
                recipients:
                  type: array
                  items:
                    type: string
                    format: uuid
            statusChange:
              type: object
              properties:
                recipients:
                  type: array
                  items:
                    type: string
                    format: uuid
      required:
        - id
        - title
        - taskStatus
        - startDate
        - dueDate
    EditTaskResponse:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
              title:
                type: string
              description:
                type: string
              priority:
                type: string
              taskStatus:
                type: string
              startDate:
                type: string
                format: date-time
              dueDate:
                type: string
                format: date-time
              startTime:
                type: string
                format: date-time
              dueTime:
                type: string
                format: date-time
              timezone:
                type: string
              isTimeBound:
                type: boolean
              isChecklistRequired:
                type: boolean
              assignees:
                type: array
                items:
                  type: string
                  format: uuid
              AssetId:
                type: string
                format: uuid
              LocationId:
                type: string
                format: uuid
              ServiceId:
                type: string
                format: uuid
              CompletedBy:
                type: string
                format: uuid
              attachment:
                type: array
                items:
                  type: string
                  format: uri
              notification:
                type: object
                properties:
                  overdue:
                    type: object
                    properties:
                      recipients:
                        type: array
                        items:
                          type: string
                          format: uuid
                  statusChange:
                    type: object
                    properties:
                      recipients:
                        type: array
                        items:
                          type: string
                          format: uuid
        extra_meta:
          type: object
          properties:
            message:
              type: string
              example: Task updated successfully
  securitySchemes:
    clientKey:
      type: apiKey
      in: header
      name: x-client-key
    clientSecret:
      type: apiKey
      in: header
      name: x-client-secret

````