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

# Create task

> Create a task for a person.



## OpenAPI

````yaml POST /tasks
openapi: 3.1.0
info:
  title: Unify Tasks API
  summary: List and manage tasks within the Unify platform.
  version: '1'
  termsOfService: https://www.unifygtm.com/legal/terms-and-conditions
  contact:
    name: Unify Support
    url: https://www.unifygtm.com/support
    email: support@unifygtm.com
servers:
  - url: https://api.unifygtm.com/tasks/v1
    variables: {}
security:
  - ApiKeyAuth: []
tags:
  - name: Tasks
paths:
  /tasks:
    post:
      tags:
        - Tasks
      operationId: create_task
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTaskRequest'
      responses:
        '201':
          description: >-
            The request has succeeded and a new resource has been created as a
            result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateTaskResponse'
        '400':
          description: Response for any operation that results in a bad request error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                properties:
                  status:
                    type: string
                    enum:
                      - bad_request
                  errors:
                    type: array
                    items:
                      $ref: '#/components/schemas/UResponses.BadRequestError'
                  message:
                    type: string
                description: >-
                  Response for any operation that results in a bad request
                  error.
        '401':
          description: Response for any operation that results in an unauthorized error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - message
                properties:
                  status:
                    type: string
                    enum:
                      - unauthorized
                  message:
                    type: string
                description: >-
                  Response for any operation that results in an unauthorized
                  error.
        '403':
          description: Response for any operation that results in a forbidden error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - message
                properties:
                  status:
                    type: string
                    enum:
                      - forbidden
                  message:
                    type: string
                description: Response for any operation that results in a forbidden error.
        '404':
          description: Response for any operation that results in a not found error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - message
                properties:
                  status:
                    type: string
                    enum:
                      - not_found
                  message:
                    type: string
                description: Response for any operation that results in a not found error.
        '409':
          description: Response for any operation that results in a conflict error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - message
                properties:
                  status:
                    type: string
                    enum:
                      - conflict
                  message:
                    type: string
                description: Response for any operation that results in a conflict error.
        '429':
          description: Response for any operation that exceeds a rate limit.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - message
                properties:
                  status:
                    type: string
                    enum:
                      - rate_limited
                  message:
                    type: string
                description: Response for any operation that exceeds a rate limit.
        '500':
          description: Response for any operation that results in an internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - message
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                description: >-
                  Response for any operation that results in an internal server
                  error.
components:
  schemas:
    CreateTaskRequest:
      type: object
      oneOf:
        - $ref: '#/components/schemas/CreateEmailTaskRequest'
        - $ref: '#/components/schemas/CreateActionItemTaskRequest'
        - $ref: '#/components/schemas/CreatePhoneCallTaskRequest'
        - $ref: '#/components/schemas/CreateLinkedinSendMessageTaskRequest'
        - $ref: '#/components/schemas/CreateLinkedinSendConnectionRequestTaskRequest'
        - $ref: '#/components/schemas/CreateLinkedinViewProfileTaskRequest'
      discriminator:
        propertyName: type
        mapping:
          EMAIL:
            $ref: '#/components/schemas/CreateEmailTaskRequest'
          ACTION_ITEM:
            $ref: '#/components/schemas/CreateActionItemTaskRequest'
          PHONE_CALL:
            $ref: '#/components/schemas/CreatePhoneCallTaskRequest'
          LINKEDIN_SEND_MESSAGE:
            $ref: '#/components/schemas/CreateLinkedinSendMessageTaskRequest'
          LINKEDIN_SEND_CONNECTION_REQUEST:
            $ref: >-
              #/components/schemas/CreateLinkedinSendConnectionRequestTaskRequest
          LINKEDIN_VIEW_PROFILE:
            $ref: '#/components/schemas/CreateLinkedinViewProfileTaskRequest'
    CreateTaskResponse:
      type: object
      allOf:
        - type: object
          required:
            - status
            - data
          properties:
            status:
              type: string
              enum:
                - success
            data:
              $ref: '#/components/schemas/Task'
          description: Response for a successful create operation.
    UResponses.BadRequestError:
      type: object
      required:
        - code
      properties:
        code:
          type: string
        path:
          type: array
          items:
            anyOf:
              - type: string
              - type: integer
        object_api_name:
          type: string
        attribute_api_name:
          type: string
      allOf:
        - type: object
          unevaluatedProperties: {}
      description: Validation error detail returned for bad request responses.
    CreateEmailTaskRequest:
      type: object
      required:
        - type
        - mailbox_email
        - subject
        - content
      properties:
        type:
          type: string
          enum:
            - EMAIL
        mailbox_email:
          allOf:
            - $ref: '#/components/schemas/email'
          description: >-
            Email address of the mailbox used to send the email when the task is
            completed.
        subject:
          type: string
          description: Email subject. May be empty while the task is a draft.
        content:
          type: string
          description: Email body. May be empty while the task is a draft.
        cc_recipients:
          type: array
          items:
            $ref: '#/components/schemas/email'
          description: >-
            Additional email recipients. The task's person is the primary
            recipient.
        bcc_recipients:
          type: array
          items:
            $ref: '#/components/schemas/email'
          description: Blind-copy email recipients.
      allOf:
        - $ref: '#/components/schemas/BaseCreateTaskRequest'
    CreateActionItemTaskRequest:
      type: object
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - ACTION_ITEM
            note_content:
              anyOf:
                - type: string
                - type: 'null'
          allOf:
            - $ref: '#/components/schemas/BaseCreateTaskRequest'
    CreatePhoneCallTaskRequest:
      type: object
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - PHONE_CALL
            note_content:
              anyOf:
                - type: string
                - type: 'null'
          allOf:
            - $ref: '#/components/schemas/BaseCreateTaskRequest'
    CreateLinkedinSendMessageTaskRequest:
      type: object
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - LINKEDIN_SEND_MESSAGE
            note_content:
              anyOf:
                - type: string
                - type: 'null'
          allOf:
            - $ref: '#/components/schemas/BaseCreateTaskRequest'
    CreateLinkedinSendConnectionRequestTaskRequest:
      type: object
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - LINKEDIN_SEND_CONNECTION_REQUEST
            note_content:
              anyOf:
                - type: string
                - type: 'null'
          allOf:
            - $ref: '#/components/schemas/BaseCreateTaskRequest'
    CreateLinkedinViewProfileTaskRequest:
      type: object
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - LINKEDIN_VIEW_PROFILE
            note_content:
              anyOf:
                - type: string
                - type: 'null'
          allOf:
            - $ref: '#/components/schemas/BaseCreateTaskRequest'
    Task:
      type: object
      required:
        - id
        - type
        - status
        - priority
        - person_id
        - assigned_user_id
        - due_at
        - ended_at
        - created_at
        - updated_at
      properties:
        id:
          $ref: '#/components/schemas/uuid'
        type:
          $ref: '#/components/schemas/TaskType'
        status:
          $ref: '#/components/schemas/TaskStatus'
        priority:
          $ref: '#/components/schemas/TaskPriority'
        person_id:
          $ref: '#/components/schemas/uuid'
        assigned_user_id:
          anyOf:
            - $ref: '#/components/schemas/uuid'
            - type: 'null'
        due_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        ended_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        note_content:
          anyOf:
            - type: string
            - type: 'null'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    email:
      type: string
      format: email
    BaseCreateTaskRequest:
      type: object
      required:
        - person_id
      properties:
        person_id:
          $ref: '#/components/schemas/uuid'
        priority:
          $ref: '#/components/schemas/TaskPriority'
        due_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
    uuid:
      type: string
      format: uuid
    TaskType:
      type: string
      enum:
        - EMAIL
        - ACTION_ITEM
        - PHONE_CALL
        - LINKEDIN_SEND_MESSAGE
        - LINKEDIN_SEND_CONNECTION_REQUEST
        - LINKEDIN_VIEW_PROFILE
        - REPLY_TO_EMAIL
    TaskStatus:
      type: string
      enum:
        - NOT_READY
        - READY
        - COMPLETED
        - SKIPPED
        - CANCELED
    TaskPriority:
      type: string
      enum:
        - LOW
        - MEDIUM
        - HIGH
        - URGENT
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````