> ## 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 - Weekly Recurring

> Creates a task that recurs weekly on specific days (e.g., Mon, Wed, Fri).



## OpenAPI

````yaml POST /api/v1/task/createTask?weekly
openapi: 3.1.0
info:
  title: Xenia Team API - Create Weekly Recurring Task
  version: 1.0.0
  description: API to create weekly recurring tasks in the workspace.
servers:
  - url: https://api.xenia.team
security: []
paths:
  /api/v1/task/createTask?weekly:
    post:
      tags:
        - Tasks
      summary: Create Weekly Recurring Task
      description: >-
        Creates a task that recurs weekly on specific days (e.g., Mon, Wed,
        Fri).
      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
                recurringTask:
                  type: boolean
                  default: true
                requestThisTask:
                  type: string
                  enum:
                    - Weekly
                  default: Weekly
                recurringByEvery:
                  type: string
                  enum:
                    - Week1
                    - Weeks2
                    - Weeks3
                    - Weeks4
                    - Weeks5
                    - Weeks6
                  default: Week1
                intervalWeek:
                  type: array
                  items:
                    type: string
                  default:
                    - Mon
                    - Wed
                    - Fri
                editInstance:
                  type: string
                  enum:
                    - One
                  default: One
                endDate:
                  type: string
                  format: date-time
                instanceCadence:
                  type: object
                  properties:
                    value:
                      type: integer
                    unit:
                      type:
                        - string
                        - 'null'
                      enum:
                        - minute
                        - hour
                        - day
                        - week
                        - month
                        - null
                    field:
                      type:
                        - string
                        - 'null'
                      enum:
                        - startTime
                        - startDate
                        - dueTime
                        - dueDate
                        - beginningOfWorkDay
                        - null
                locationIds:
                  type: array
                  items:
                    type: string
                    format: uuid
                startTime:
                  type: string
                  format: date-time
                dueTime:
                  type: string
                  format: date-time
                isTimeBound:
                  type: boolean
                isMultiTasks:
                  type: boolean
                isAutoTagLocation:
                  type: boolean
                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
                - recurringTask
                - requestThisTask
                - intervalWeek
                - startTime
                - dueTime
                - workspaceId
            example:
              title: recurring task daily
              recurringTask: true
              requestThisTask: Weekly
              recurringByEvery: Week1
              intervalWeek:
                - Mon
                - Wed
                - Fri
              editInstance: One
              endDate: '2025-06-30T00:00:00-11:00'
              instanceCadence:
                value: 0
                unit: null
                field: null
              locationIds:
                - a13ddb59-3e5c-4bdd-8673-fc913b93b9db
              startTime: '2025-06-25T22:00:00-11:00'
              dueTime: '2025-06-25T23:30:00-11:00'
              AutomationId: null
              isTimeBound: false
              isMultiTasks: false
              isAutoTagLocation: false
              workspaceId: cb363f7e-c52a-4478-911d-f6a6f791090e
              notification:
                statusChange:
                  recipients: []
                overdue:
                  recipients: []
      responses:
        '200':
          description: Recurring 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
        startTime:
          type: string
          format: date-time
        dueTime:
          type: string
          format: date-time
        assignees:
          type: array
          items:
            type: string
            format: uuid
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        taskStatus:
          type: string
        recurringTask:
          type: boolean
      required:
        - id
        - title
        - startTime
        - dueTime
        - createdAt
        - updatedAt
  securitySchemes:
    clientKey:
      type: apiKey
      in: header
      name: x-client-key
    clientSecret:
      type: apiKey
      in: header
      name: x-client-secret

````