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

# Create tasks



## OpenAPI

````yaml /openapi/todo.json post /v1/todo/tasks/
openapi: 3.0.3
info:
  title: Yume API — Задачи
  version: 1.0.0
  description: Задачи сотрудников, напоминания и связи с сущностями.
servers:
  - url: https://api.yume.cloud
    description: Production
  - url: https://api.stage.yume.cloud
    description: Stage
security: []
paths:
  /v1/todo/tasks/:
    post:
      tags:
        - tasks
      summary: Create tasks
      operationId: tasks_create
      parameters:
        - $ref: '#/components/parameters/TenantId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskWrite'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TaskWrite'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TaskWrite'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskWrite'
          description: ''
      security:
        - jwtAuth: []
components:
  parameters:
    TenantId:
      name: X-Tenant-Id
      in: header
      required: false
      schema:
        type: integer
      description: >-
        Компания, в контексте которой выполняется запрос — её id из `GET
        /v1/tenant/`. Пользователь должен состоять в этой компании: чужой id
        доступа к данным не даёт. Без заголовка компания определяется по домену
        запроса.
  schemas:
    TaskWrite:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        title:
          type: string
          title: Заголовок
          maxLength: 255
        description:
          type: string
          title: Описание
        result:
          type: string
          readOnly: true
          title: Результат
        type:
          type: integer
          nullable: true
          title: Тип
        status:
          allOf:
            - $ref: '#/components/schemas/StatusEnum'
          title: Статус
        priority:
          nullable: true
          title: Приоритет
          minimum: 0
          maximum: 32767
          oneOf:
            - $ref: '#/components/schemas/PriorityEnum'
            - $ref: '#/components/schemas/NullEnum'
        assignee:
          type: integer
          nullable: true
          title: Исполнитель
        due_at:
          type: string
          format: date-time
          nullable: true
          title: Срок выполнения
        remind_at:
          type: string
          format: date-time
          nullable: true
          title: Напомнить
        extra:
          title: Доп. данные
        links:
          type: array
          items:
            $ref: '#/components/schemas/TaskLinkWrite'
        comment:
          type: string
          writeOnly: true
        author:
          type: integer
          readOnly: true
          nullable: true
          title: Автор
        finished_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
          title: Дата завершения
        reminded_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
          title: Напоминание отправлено
        overdue_notified_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
          title: Уведомление о просрочке отправлено
        created_at:
          type: string
          format: date-time
          readOnly: true
          title: Создан
        updated_at:
          type: string
          format: date-time
          readOnly: true
          title: Обновлен
      required:
        - author
        - created_at
        - finished_at
        - id
        - overdue_notified_at
        - reminded_at
        - result
        - title
        - updated_at
    StatusEnum:
      enum:
        - open
        - in_progress
        - done
        - cancelled
      type: string
      description: |-
        * `open` - Открыто
        * `in_progress` - В работе
        * `done` - Выполнено
        * `cancelled` - Отменено
    PriorityEnum:
      enum:
        - 1
        - 2
        - 3
        - 4
      type: integer
      description: |-
        * `1` - Низкий
        * `2` - Средний
        * `3` - Высокий
        * `4` - Срочный
    NullEnum:
      enum:
        - null
    TaskLinkWrite:
      type: object
      properties:
        content_type:
          type: string
        object_id:
          type: integer
          minimum: 1
        role:
          allOf:
            - $ref: '#/components/schemas/RoleEnum'
          default: secondary
      required:
        - content_type
        - object_id
    RoleEnum:
      enum:
        - main
        - secondary
      type: string
      description: |-
        * `main` - Основная
        * `secondary` - Дополнительная
  securitySchemes:
    jwtAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````