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

# Create a task

> Creates a new task in the workspace.

<Accordion title="Required scope">
`tasks:write`
</Accordion>



## OpenAPI

````yaml /en/api-reference/openapi.json post /v1/tasks
openapi: 3.1.0
info:
  title: OAuth 2.1
  description: Endpoints for registering applications and managing OAuth 2.1 tokens.
  version: 1.0.0
  contact:
    name: Vendaze Support
    email: suporte@vendaze.com
servers:
  - url: https://api.vendaze.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: OAuth
  - name: People
  - name: Companies
  - name: Deals
  - name: Pipelines
  - name: Tasks
  - name: Task Types
  - name: Products
  - name: Tags
  - name: Lists
  - name: Custom Fields
  - name: Webhooks
paths:
  /v1/tasks:
    post:
      tags:
        - Tasks
      summary: Create a task
      description: |-
        Creates a new task in the workspace.

        <Accordion title="Required scope">
        `tasks:write`
        </Accordion>
      operationId: createTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTaskRequest'
      responses:
        '201':
          description: Task created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/InsufficientScope'
        '422':
          $ref: '#/components/responses/ValidationError'
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    CreateTaskRequest:
      type: object
      required:
        - title
        - due_date
      properties:
        title:
          type: string
          minLength: 1
          maxLength: 200
          description: Task title.
          example: Follow up with prospect
        due_date:
          type: string
          format: date-time
          description: ISO 8601 UTC datetime when the task is due.
          example: '2026-06-15T09:00:00Z'
        notes:
          type: string
          maxLength: 3000
          description: Optional notes.
          example: Send the proposal by Friday.
        type:
          type: string
          description: >-
            Task type `id` (UUID) or `key` (string). The API resolves it to the
            internal type ID. Use `GET /v1/task-types` to list available types.
          example: call
        person_id:
          type: string
          format: uuid
          description: UUID of the person to associate with this task.
        company_id:
          type: string
          format: uuid
          description: UUID of the company to associate with this task.
        deal_id:
          type: string
          format: uuid
          description: UUID of the deal to associate with this task.
        owner_email:
          type: string
          format: email
          description: >-
            Email of the workspace member to set as owner. The API resolves it
            to the internal user ID.
          example: john@company.com
        priority:
          type: string
          enum:
            - high
            - medium
            - low
          description: Priority level.
          example: high
    TaskResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TaskWithEmbedded'
    TaskWithEmbedded:
      type: object
      description: >-
        Task object returned by POST and PATCH. Includes full embedded objects
        for person, company, and deal instead of plain IDs.
      properties:
        id:
          type: string
          format: uuid
        title:
          type: string
          maxLength: 200
          example: Follow up with prospect
        notes:
          type: string
          nullable: true
          maxLength: 3000
        due_date:
          type: string
          format: date-time
        type:
          $ref: '#/components/schemas/TaskType'
        person:
          $ref: '#/components/schemas/PersonEmbedded'
        company:
          $ref: '#/components/schemas/CompanyEmbedded'
        deal:
          $ref: '#/components/schemas/DealEmbedded'
        owner:
          $ref: '#/components/schemas/Owner'
        priority:
          type: string
          nullable: true
          enum:
            - high
            - medium
            - low
        completed:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            request_id:
              type: string
              format: uuid
    ValidationErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: validation_error
            message:
              type: string
              example: Validation failed.
            fields:
              type: object
              additionalProperties:
                type: string
            request_id:
              type: string
              format: uuid
    TaskType:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the task type.
        title:
          type: string
          maxLength: 40
          example: Call
          description: Display name of the task type.
        color:
          type: string
          pattern: ^#[0-9a-fA-F]{6}$
          description: Display color in hex RGB format.
          example: '#463dfb'
        key:
          type: string
          nullable: true
          maxLength: 40
          description: >-
            Identifier key for the task type. Unique within the workspace. Used
            in the `type` field when creating or updating tasks.
          example: call
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    PersonEmbedded:
      type: object
      nullable: true
      description: Person associated with the task. `null` when no person is assigned.
      properties:
        id:
          type: string
          format: uuid
        full_name:
          type: string
          example: Jane Doe
        emails:
          type: array
          nullable: true
          items:
            type: object
            properties:
              email:
                type: string
              type:
                type: string
        phones:
          type: array
          nullable: true
          items:
            type: object
            properties:
              phone:
                type: string
              type:
                type: string
        ranking:
          type: number
        position:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    CompanyEmbedded:
      type: object
      nullable: true
      description: Company associated with the task. `null` when no company is assigned.
      properties:
        id:
          type: string
          format: uuid
        full_name:
          type: string
          example: Acme Corp
        emails:
          type: array
          nullable: true
          items:
            type: object
            properties:
              email:
                type: string
              type:
                type: string
        phones:
          type: array
          nullable: true
          items:
            type: object
            properties:
              phone:
                type: string
              type:
                type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    DealEmbedded:
      type: object
      nullable: true
      description: >-
        Deal associated with the task. `null` when no deal is assigned. Value
        fields follow the same format as `GET /v1/deals`.
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          example: Enterprise Plan Q3
        amount:
          type: integer
          description: Deal value in cents.
          example: 250000
        currency:
          type: string
          description: ISO 4217 currency code.
          example: BRL
        formatted_amount:
          type: string
          nullable: true
          description: Deal value formatted using the currency's symbol and separators.
          example: R$ 2.500,00
        pipeline:
          type: object
          nullable: true
          properties:
            id:
              type: string
              format: uuid
            name:
              type: string
        stage:
          type: object
          nullable: true
          properties:
            id:
              type: string
              format: uuid
            name:
              type: string
            type:
              type: string
              enum:
                - open
                - win
                - lost
        source:
          type: string
        forecast_date:
          type: string
          format: date-time
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Owner:
      type: object
      nullable: true
      description: >-
        Workspace member responsible for this task. `null` when no owner is
        assigned.
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          example: John Smith
        email:
          type: string
          format: email
          example: john@company.com
  responses:
    BadRequest:
      description: 'Malformed request body or empty update. Error code: `bad_request`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: bad_request
              message: Request body must be valid JSON.
              request_id: 550e8400-e29b-41d4-a716-446655440000
    Unauthorized:
      description: >-
        Token missing, invalid, or expired. Possible error codes:
        `unauthorized`, `token_expired`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: unauthorized
              message: Missing or invalid Authorization header.
              request_id: 550e8400-e29b-41d4-a716-446655440000
    InsufficientScope:
      description: 'Token lacks the required scope. Error code: `insufficient_scope`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: insufficient_scope
              message: This endpoint requires the 'webhooks:read' scope.
              request_id: 550e8400-e29b-41d4-a716-446655440000
    ValidationError:
      description: >-
        Input validation failed. Error code: `validation_error`. The `fields`
        object maps each invalid field to a description of the problem.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationErrorResponse'
          example:
            error:
              code: validation_error
              message: Validation failed.
              fields:
                url: url must use HTTPS.
                events: At least one event is required.
              request_id: 550e8400-e29b-41d4-a716-446655440000
    RateLimitExceeded:
      description: 'Rate limit exceeded. Error code: `rate_limit_exceeded`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: rate_limit_exceeded
              message: Rate limit exceeded. Try again in 60 seconds.
              request_id: 550e8400-e29b-41d4-a716-446655440000
    InternalError:
      description: 'Unexpected server error. Error code: `internal_error`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: internal_error
              message: An unexpected error occurred.
              request_id: 550e8400-e29b-41d4-a716-446655440000
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: OAuth 2.1 access token.

````