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

# Update a task

> Update a task: edit fields (action=update_fields), transition its status (action=transition_status), or (re)assign it (action=assign). All changes are reversible.



## OpenAPI

````yaml https://mcp.agent.writesonic.com/openapi.json post /api/v1/business/tasks/update
openapi: 3.1.0
info:
  title: hq-backend — Business API
  description: Public business tool endpoints (API-key auth).
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/business/tasks/update:
    post:
      tags:
        - business
      summary: Update a task
      description: >-
        Update a task: edit fields (action=update_fields), transition its status
        (action=transition_status), or (re)assign it (action=assign). All
        changes are reversible.
      operationId: update_task_api_v1_business_tasks_update_post
      parameters:
        - name: x-project-id
          in: header
          required: true
          schema:
            type: string
            format: uuid
            description: Project ID for tenant scoping
            title: X-Project-Id
          description: Project ID for tenant scoping
        - name: X-Workspace-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            description: Overrides the key's workspace
            title: X-Workspace-Id
          description: Overrides the key's workspace
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: User API key
            title: X-Api-Key
          description: User API key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskUpdateArgs'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    TaskUpdateArgs:
      properties:
        action:
          $ref: '#/components/schemas/TaskUpdateAction'
          description: Which mutation to apply to the task.
        task_id:
          type: string
          format: uuid
          title: Task Id
          description: Task to update.
        fields:
          anyOf:
            - $ref: '#/components/schemas/TaskUpdate'
            - type: 'null'
          description: >-
            Field edits for action=update_fields - only set what changes.
            Explicit null on title/priority/sort_order is rejected (they can't
            be cleared this way); omit instead.
        status:
          anyOf:
            - $ref: '#/components/schemas/TaskStatus'
            - type: 'null'
          description: New status for action=transition_status.
        assignee:
          anyOf:
            - $ref: '#/components/schemas/AssignTask'
            - type: 'null'
          description: Assignee for action=assign.
      type: object
      required:
        - action
        - task_id
      title: TaskUpdateArgs
    TaskResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        project_id:
          type: string
          format: uuid
          title: Project Id
        identifier:
          type: string
          title: Identifier
        title:
          type: string
          title: Title
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        status:
          $ref: '#/components/schemas/TaskStatus'
        priority:
          $ref: '#/components/schemas/TaskPriority'
        creator_type:
          $ref: '#/components/schemas/ActorType'
        creator_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Creator Id
        assignee_type:
          $ref: '#/components/schemas/ActorType'
        assignee_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Assignee Id
        parent_task_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parent Task Id
        page_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Page Id
        schedule_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Schedule Id
        due_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Due Date
        sort_order:
          type: number
          title: Sort Order
        started_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Started At
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
        comment_count:
          type: integer
          title: Comment Count
        last_comment_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Comment At
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - project_id
        - identifier
        - title
        - description
        - status
        - priority
        - creator_type
        - creator_id
        - assignee_type
        - assignee_id
        - parent_task_id
        - page_id
        - schedule_id
        - due_date
        - sort_order
        - started_at
        - completed_at
        - comment_count
        - last_comment_at
        - created_at
        - updated_at
      title: TaskResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TaskUpdateAction:
      type: string
      enum:
        - update_fields
        - transition_status
        - assign
      title: TaskUpdateAction
    TaskUpdate:
      properties:
        title:
          anyOf:
            - type: string
              maxLength: 500
              minLength: 1
            - type: 'null'
          title: Title
          description: New title.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: New description.
        priority:
          anyOf:
            - $ref: '#/components/schemas/TaskPriority'
            - type: 'null'
          description: New priority.
        due_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Due Date
          description: New due date.
        sort_order:
          anyOf:
            - type: number
            - type: 'null'
          title: Sort Order
          description: New manual sort position within its list.
        parent_task_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parent Task Id
          description: >-
            New parent task, to make this task a subtask; set to null to
            un-parent.
      type: object
      title: TaskUpdate
    TaskStatus:
      type: string
      enum:
        - backlog
        - todo
        - in_progress
        - pending_human_approval
        - in_review
        - done
        - cancelled
      title: TaskStatus
    AssignTask:
      properties:
        assignee_type:
          $ref: '#/components/schemas/ActorType'
          description: human, ai_agent, or system (system means unassigned).
        assignee_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Assignee Id
          description: >-
            Required unless assignee_type is system - the user id for human, or
            the agent's UUID (as a string) for ai_agent.
      type: object
      required:
        - assignee_type
      title: AssignTask
    TaskPriority:
      type: string
      enum:
        - urgent
        - high
        - medium
        - low
        - none
      title: TaskPriority
    ActorType:
      type: string
      enum:
        - human
        - ai_agent
        - system
      title: ActorType
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````