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

# Create a new task

> Creates a new task for the authenticated user. The task can be associated with a contact or customer, and assigned to one or more responsible users. Due dates can be specified with optional time and timezone information.



## OpenAPI

````yaml /openapi.json post /api/public/tasks
openapi: 3.0.0
info:
  title: Vambe AI API
  description: Vambe AI documentation
  version: '1.0'
  contact: {}
servers:
  - url: https://api.vambe.me
    description: Production Server
security: []
tags:
  - name: Vambe AI
    description: ''
paths:
  /api/public/tasks:
    post:
      tags:
        - tasks
      summary: Create a new task
      description: >-
        Creates a new task for the authenticated user. The task can be
        associated with a contact or customer, and assigned to one or more
        responsible users. Due dates can be specified with optional time and
        timezone information.
      operationId: TaskPublicController_create
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTaskPublicDto'
      responses:
        '201':
          description: Task created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResponseDto'
        '400':
          description: >-
            Invalid request body - Check that all required fields are provided
            and valid
        '401':
          description: Unauthorized - Invalid or missing authentication token
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResponseDto'
components:
  schemas:
    CreateTaskPublicDto:
      type: object
      properties:
        title:
          type: string
          minLength: 1
        description:
          type: string
          nullable: true
        dueDate:
          type: string
          nullable: true
        dueTime:
          type: string
          nullable: true
        timezone:
          type: string
          nullable: true
        responsibleIds:
          type: array
          items:
            type: string
        aiContactId:
          type: string
          nullable: true
        aiCustomerId:
          type: string
          nullable: true
        priority:
          type: string
          enum:
            - '0'
            - '1'
            - '2'
        associateToCalendar:
          default: false
          type: boolean
      required:
        - title
        - description
        - dueDate
        - dueTime
        - timezone
        - responsibleIds
        - aiContactId
        - aiCustomerId
        - priority
    TaskResponseDto:
      type: object
      properties: {}

````