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

# Update task

> Update a task's assignee, priority, or due date.

## Overview

Change a task's assignee, priority, or due date. Include the fields you want to
change. Set `assigned_user_id` or `due_at` to `null` to clear that value.

## Examples

Set `UNIFY_API_KEY` to your API key.

> [accordion] Prioritize a follow-up
>
> Replace the example IDs with records from
> your workspace. This request marks an existing task urgent and changes its due date.
>
> ```bash theme={null}
> curl --request PATCH \
>   --url "https://api.unifygtm.com/tasks/v1/tasks/02db977b-1df7-4c91-bd5c-9b3f5284aa57" \
>   --header "X-Api-Key: $UNIFY_API_KEY" \
>   --header "Content-Type: application/json" \
>   --data '{
>   "priority": "URGENT",
>   "due_at": "2030-01-16T17:00:00Z"
> }'
> ```

> [accordion] Reassign a task
>
> Use the teammate's Unify user ID as `assigned_user_id`:
>
> ```json theme={null}
> {
>   "assigned_user_id": "21fe3c71-6f4a-4089-a80b-f56873ae27f8"
> }
> ```
>
> The response returns the updated task in `data`. Use
> [Complete task](https://docs.unifygtm.com/developers/api/tasks/tasks/complete.md) when the work is finished.


## OpenAPI

````yaml PATCH /tasks/v1/tasks/{id}
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/{id}:
    patch:
      tags:
        - Tasks
      description: Update a task by its ID.
      operationId: update_task
      parameters:
        - name: id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/uuid'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTaskRequest'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateTaskResponse'
        '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:
    uuid:
      type: string
      format: uuid
    UpdateTaskRequest:
      anyOf:
        - type: object
          properties:
            assigned_user_id:
              anyOf:
                - $ref: '#/components/schemas/uuid'
                - type: 'null'
            priority:
              $ref: '#/components/schemas/TaskPriority'
            due_at:
              anyOf:
                - type: string
                  format: date-time
                - type: 'null'
          required:
            - assigned_user_id
        - type: object
          properties:
            assigned_user_id:
              anyOf:
                - $ref: '#/components/schemas/uuid'
                - type: 'null'
            priority:
              $ref: '#/components/schemas/TaskPriority'
            due_at:
              anyOf:
                - type: string
                  format: date-time
                - type: 'null'
          required:
            - priority
        - type: object
          properties:
            assigned_user_id:
              anyOf:
                - $ref: '#/components/schemas/uuid'
                - type: 'null'
            priority:
              $ref: '#/components/schemas/TaskPriority'
            due_at:
              anyOf:
                - type: string
                  format: date-time
                - type: 'null'
          required:
            - due_at
      description: |-
        Request body for updating a task. At least one of `assigned_user_id`,
        `priority`, or `due_at` must be provided.
    UpdateTaskResponse:
      type: object
      allOf:
        - type: object
          required:
            - status
            - data
          properties:
            status:
              type: string
              enum:
                - success
            data:
              $ref: '#/components/schemas/Task'
          description: Response for a successful update 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.
    TaskPriority:
      type: string
      enum:
        - LOW
        - MEDIUM
        - HIGH
        - URGENT
    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
    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
  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.