> ## 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.

## Overview

Create a ready task for an existing person. The task is initially assigned to
the user associated with your API key. Use this endpoint to add follow-up work
from another system, such as reviewing a new trial signup or calling a qualified
lead.

## Examples

Set `UNIFY_API_KEY` to your API key.

> [accordion] Create an action item
>
> Replace the example IDs with records from
> your workspace.
>
> ```bash theme={null}
> curl --request POST \
>   --url "https://api.unifygtm.com/tasks/v1/tasks" \
>   --header "X-Api-Key: $UNIFY_API_KEY" \
>   --header "Content-Type: application/json" \
>   --data '{
>   "type": "ACTION_ITEM",
>   "person_id": "bf3f4d5e-c995-496f-8774-5a1c58d05197",
>   "priority": "HIGH",
>   "due_at": "2030-01-15T17:00:00Z",
>   "note_content": "Review the trial signup and prepare questions for the discovery call."
> }'
> ```
>
> The response contains the new task in `data`. Save `data.id` if you need to
> [update](https://docs.unifygtm.com/developers/api/tasks/tasks/update.md) or
> [complete](https://docs.unifygtm.com/developers/api/tasks/tasks/complete.md) it later.

> [accordion] Create a call task
>
> Use `PHONE_CALL` when the follow-up should appear as a call task. Creating the
> task adds work to the queue. A user can then place the call in Unify.
>
> ```bash theme={null}
> curl --request POST \
>   --url "https://api.unifygtm.com/tasks/v1/tasks" \
>   --header "X-Api-Key: $UNIFY_API_KEY" \
>   --header "Content-Type: application/json" \
>   --data '{
>   "type": "PHONE_CALL",
>   "person_id": "bf3f4d5e-c995-496f-8774-5a1c58d05197",
>   "note_content": "Follow up on the requested product demonstration."
> }'
> ```
>
> To assign either task to another user, create it first, then
> [update its assignee](https://docs.unifygtm.com/developers/api/tasks/tasks/update.md).


## OpenAPI

````yaml POST /tasks/v1/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
    variables: {}
security:
  - ApiKeyAuth: []
tags:
  - name: Tasks
paths:
  /tasks/v1/tasks:
    post:
      tags:
        - Tasks
      description: Create a task for a person.
      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: '#/components/schemas/CreateEmailTaskRequest'
          ACTION_ITEM: '#/components/schemas/CreateActionItemTaskRequest'
          PHONE_CALL: '#/components/schemas/CreatePhoneCallTaskRequest'
          LINKEDIN_SEND_MESSAGE: '#/components/schemas/CreateLinkedinSendMessageTaskRequest'
          LINKEDIN_SEND_CONNECTION_REQUEST: '#/components/schemas/CreateLinkedinSendConnectionRequestTaskRequest'
          LINKEDIN_VIEW_PROFILE: '#/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:
          $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'
          description: >-
            Note content for tasks that support notes. This is null until the
            note is ready and is omitted for email tasks.
        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

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.