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

# Update Task Assignee

> Change assignee for this task

## Overview

Update the assignee of a specific task. This endpoint allows you to reassign tasks to different team members or unassign tasks.

## Path Parameters

<ParamField path="taskId" type="integer" required>
  The unique identifier of the task to update the assignee for.

  **Example:** `456`
</ParamField>

## Request Body

<ParamField body="assignee" type="integer" required>
  User ID of the person to assign this task to. Set to `null` to unassign the task.

  **Example:** `5`
</ParamField>

<ParamField body="comment" type="string">
  Optional comment to include in the assignment notification.

  **Example:** `"This task is high priority. Please review by EOD."`
</ParamField>

## Response

<ResponseField name="id" type="integer">
  The unique identifier of the task.
</ResponseField>

<ResponseField name="task_name" type="string">
  The name of the task.
</ResponseField>

<ResponseField name="project_id" type="integer">
  The ID of the project this task belongs to.
</ResponseField>

<ResponseField name="assignee" type="integer">
  User ID of the person now assigned to this task.
</ResponseField>

<ResponseField name="updated_at" type="string">
  The timestamp when the assignee was updated (ISO 8601 format).
</ResponseField>

## Example Request

```bash theme={null}
```


## OpenAPI

````yaml POST /api/taskmanager/v1/task/updateAssignee/{taskId}
openapi: 3.1.0
info:
  title: Thareja API Documentation
  description: A comprehensive API for team and task management
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://app.thareja.ai
security:
  - bearerAuth: []
tags:
  - name: Teams
    description: Team management endpoints
  - name: Tasks
    description: Task management endpoints
  - name: Projects
    description: Project management endpoints
  - name: Comments
    description: Comment management endpoints
paths:
  /api/taskmanager/v1/task/updateAssignee/{taskId}:
    post:
      tags:
        - Tasks
      summary: Update task assignee
      description: Change assignee for this task
      parameters:
        - name: taskId
          in: path
          required: true
          description: The unique identifier of the task
          schema:
            type: integer
            format: int64
            example: 456
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/updateAssignee'
        required: true
      responses:
        '200':
          description: Update assignee response
          content:
            application/json:
              schema:
                $ref: f6be54fb-0e6f-4a05-9f4e-ca6c5d288dcc
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Task not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    updateAssignee:
      required:
        - assignee
      type: object
      properties:
        assignee:
          description: User ID of the person to assign this task to
          type: integer
          format: int64
          example: 5
        comment:
          description: Optional comment about the assignment change
          type: string
          example: This task is high priority. Please review by EOD.
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
          example: 400
        message:
          type: string
          example: Invalid request parameters
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````