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

# create task

> Creates a new task. Requires the `tasks:write` scope.



## OpenAPI

````yaml /api/v2/openapi.json post /tasks
openapi: 3.1.0
info:
  title: Klipy API
  version: '2'
  description: Klipy public CRM API, version 2.
servers:
  - url: https://api.klipy.ai/api/v2
security:
  - ApiKeyHeader: []
  - BearerAuth: []
paths:
  /tasks:
    post:
      tags:
        - tasks
      summary: create task
      description: Creates a new task. Requires the `tasks:write` scope.
      operationId: create_tasks
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                company_id:
                  type: string
                deal_id:
                  type: string
                description:
                  type: string
                done:
                  type: boolean
                due_date:
                  type: number
                main_assignee_id:
                  type: string
                name:
                  type: string
                person_id:
                  type: string
                urgency:
                  enum:
                    - low
                    - medium
                    - high
                    - critical
              required:
                - name
      responses:
        '201':
          $ref: '#/components/responses/Created'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/ValidationFailed'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  responses:
    Created:
      description: Resource created.
      headers:
        Location:
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SuccessEnvelope'
    Unauthorized:
      description: Authentication failed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Forbidden:
      description: Insufficient scope or forbidden operation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    ValidationFailed:
      description: Request body validation failed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    RateLimited:
      description: Rate limit exceeded.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    InternalError:
      description: Internal server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  schemas:
    SuccessEnvelope:
      type: object
      properties:
        data:
          type: object
        meta:
          $ref: '#/components/schemas/Meta'
        object:
          type: string
    ErrorEnvelope:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            details:
              type: array
              items:
                type: object
            message:
              type: string
        meta:
          $ref: '#/components/schemas/Meta'
        object:
          type: string
    Meta:
      type: object
      properties:
        api_version:
          type: string
        request_id:
          type: string
        timestamp:
          type: string
          format: date-time
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-Klipy-Api-Key
    BearerAuth:
      type: http
      scheme: bearer

````