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

# Update task assignee

> Assign a task to an employee. Provide the parent ticketId in the body.

<span className="badge-write">Key: Write</span><span className="badge-company">Scope: Company</span>


## OpenAPI

````yaml https://api.getprimo.com/openapi.json post /tasks/{taskId}/assignee
openapi: 3.1.1
info:
  title: Public API - BETA
  description: Read docs on https://docs.getprimo.com/
  version: '1.0'
  contact: {}
servers:
  - url: https://api.getprimo.com
security:
  - apikey: []
tags: []
paths:
  /tasks/{taskId}/assignee:
    post:
      tags:
        - Tasks
      summary: Update task assignee
      description: Assign a task to an employee. Provide the parent ticketId in the body.
      operationId: updateTaskAssignee
      parameters:
        - name: taskId
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTaskAssigneeBody'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskOutput_Output'
components:
  schemas:
    UpdateTaskAssigneeBody:
      type: object
      properties:
        ticketId:
          type: string
          minLength: 1
        assigneeEmployeeId:
          type: string
          minLength: 1
      required:
        - ticketId
        - assigneeEmployeeId
    TaskOutput_Output:
      type: object
      properties:
        id:
          type: string
        ticketId:
          type: string
        title:
          type: string
        status:
          type: string
          enum:
            - PENDING
            - IN_PROGRESS
            - COMPLETED
            - CANCELLED
        isManuallyCompletable:
          type: boolean
          description: Whether a human (not only the system) may complete this task
        isAdminManaged:
          type: boolean
          description: Whether only an admin may assign this task or change its status
        assignee:
          anyOf:
            - anyOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: EMAIL
                    email:
                      type: string
                  required:
                    - type
                    - email
                  additionalProperties: false
                - type: object
                  properties:
                    type:
                      type: string
                      const: EMPLOYEE
                    employeeId:
                      type: string
                  required:
                    - type
                    - employeeId
                  additionalProperties: false
                - type: object
                  properties:
                    type:
                      type: string
                      const: EXTERNAL_ADMIN
                    userId:
                      type: string
                  required:
                    - type
                    - userId
                  additionalProperties: false
            - type: 'null'
        tagIds:
          type: array
          description: Ids of the tags attached to this task
          items:
            type: string
      required:
        - id
        - ticketId
        - title
        - status
        - isManuallyCompletable
        - isAdminManaged
        - assignee
        - tagIds
      additionalProperties: false
  securitySchemes:
    apikey:
      scheme: bearer
      bearerFormat: API key
      type: http
      description: >-
        Use your Primo API key in the Authorization header as `Bearer
        <API_KEY>`.

````