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

# Create Tasks - One-off

> Creates one or multiple tasks based on request payload.



## OpenAPI

````yaml POST /api/v1/task/createTask
openapi: 3.1.0
info:
  title: Xenia Team API - Create Task
  version: 1.0.0
  description: API to create one or more tasks in the workspace.
servers:
  - url: https://api.xenia.team
security: []
paths:
  /api/v1/task/createTask:
    post:
      tags:
        - Tasks
      summary: Create Task(s)
      description: Creates one or multiple tasks based on request payload.
      parameters:
        - in: header
          name: workspace-id
          required: true
          schema:
            type: string
            format: uuid
          description: Workspace ID for which the task is being created
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                description:
                  type: string
                priority:
                  type: string
                  enum:
                    - Low
                    - Medium
                    - High
                assignees:
                  type: array
                  items:
                    type: string
                    format: uuid
                locationIds:
                  type:
                    - array
                    - 'null'
                  items:
                    type: string
                    format: uuid
                AssetId:
                  type:
                    - string
                    - 'null'
                  format: uuid
                startTime:
                  type: string
                  format: date-time
                dueTime:
                  type: string
                  format: date-time
                isTimeBound:
                  type: boolean
                isMultiTasks:
                  type: boolean
                isAutoTagLocation:
                  type: boolean
                serviceTypeId:
                  type: string
                  format: uuid
                attachment:
                  type: array
                  items:
                    type: string
                    format: uri
                AutomationId:
                  type:
                    - string
                    - 'null'
                  format: uuid
                workspaceId:
                  type: string
                  format: uuid
                  description: UUID of the workspace.
                notification:
                  type: object
                  properties:
                    statusChange:
                      type: object
                      properties:
                        recipients:
                          type: array
                          items:
                            type: string
                            format: uuid
                    overdue:
                      type: object
                      properties:
                        recipients:
                          type: array
                          items:
                            type: string
                            format: uuid
              required:
                - title
                - description
                - assignees
                - priority
                - startTime
                - dueTime
                - workspaceId
            example:
              title: room inspection
              description: test description
              priority: High
              assignees:
                - dfea8b8a-5b22-4668-b68d-dc641eb3a101
                - b465548d-69fc-42e3-b406-6af3b9d2f62a
                - c027212e-eedd-4fdd-9317-27903b82ed6e
              locationIds: null
              AssetId: null
              startTime: '2025-06-24T00:00:00-11:00'
              dueTime: '2025-06-25T23:30:00-11:00'
              isTimeBound: true
              isMultiTasks: true
              isAutoTagLocation: true
              serviceTypeId: 263a3926-9cb1-4ad6-8969-ecfce1674cb7
              attachment:
                - >-
                  cb363f7e-c52a-4478-911d-f6a6f791090e/2025/6/24/88127020/screenshot-2020-07-28-at-12-14-39-pm.png
                - >-
                  cb363f7e-c52a-4478-911d-f6a6f791090e/2025/6/24/88127020/screenshot-2020-07-28-at-12-59-12-pm.png
              AutomationId: null
              workspaceId: cb363f7e-c52a-4478-911d-f6a6f791090e
              notification:
                statusChange:
                  recipients: []
                overdue:
                  recipients:
                    - e25dd448-7ae7-4588-8767-7e1a316547e5
      responses:
        '200':
          description: Task(s) created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Task'
                  extra_meta:
                    type: object
                    properties:
                      message:
                        type: string
        '400':
          description: Bad Request - Invalid input data.
        '401':
          description: Unauthorized - Missing or invalid authentication.
        '403':
          description: Forbidden - Insufficient permissions to create tasks.
        '404':
          description: Not Found - Workspace does not exist.
        '500':
          description: Internal Server Error.
      security:
        - clientKey: []
          clientSecret: []
components:
  schemas:
    Task:
      type: object
      properties:
        id:
          type: string
          format: uuid
        title:
          type: string
        description:
          type: string
        priority:
          type: string
        taskStatus:
          type: string
        startTime:
          type: string
          format: date-time
        dueTime:
          type: string
          format: date-time
        isTimeBound:
          type: boolean
        assignees:
          type: array
          items:
            type: string
            format: uuid
        notification:
          type: object
        attachment:
          type: array
          items:
            type: string
            format: uri
        LocationId:
          type:
            - string
            - 'null'
          format: uuid
        AssetId:
          type:
            - string
            - 'null'
          format: uuid
        timezone:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        taskNumber:
          type: string
        taskUniqueId:
          type: string
          format: uuid
      required:
        - id
        - title
        - description
        - startTime
        - dueTime
        - assignees
        - createdAt
        - updatedAt
  securitySchemes:
    clientKey:
      type: apiKey
      in: header
      name: x-client-key
    clientSecret:
      type: apiKey
      in: header
      name: x-client-secret

````