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

# Update Task

> Update the status and delegation of a single daily task.

Move a task through its lifecycle (for example to `in_progress`,
`done`, or `dismissed`), reprioritize it (`priority`), delegate it to a
teammate (`assignee_user_id`), or change its `action_type`. Only the fields
sent are changed; sending `null` clears an assignee or action type. Send at
least one field.



## OpenAPI

````yaml /openapi.json patch /v1/tasks/{task_id}
openapi: 3.1.0
info:
  title: Lightsage Public API
  description: Public API for Lightsage CLI and external integrations.
  version: 1.0.0
servers:
  - url: https://api.lightsage.com
    description: Production
security: []
paths:
  /v1/tasks/{task_id}:
    patch:
      tags:
        - Tasks
      summary: Update Task
      description: >-
        Update the status and delegation of a single daily task.


        Move a task through its lifecycle (for example to `in_progress`,

        `done`, or `dismissed`), reprioritize it (`priority`), delegate it to a

        teammate (`assignee_user_id`), or change its `action_type`. Only the
        fields

        sent are changed; sending `null` clears an assignee or action type. Send
        at

        least one field.
      operationId: tasks_update
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
            title: Task Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTaskRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicTask'
        '404':
          description: The task does not exist or is not visible to this API key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                required:
                  - detail
              example:
                detail: Task not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - LightsageApiKeyAuth: []
components:
  schemas:
    UpdateTaskRequest:
      properties:
        status:
          type: string
          enum:
            - new
            - in_progress
            - added_to_sheet
            - done
            - dismissed
            - snoozed
          title: Status
        priority:
          type: string
          enum:
            - urgent
            - high
            - medium
            - low
          title: Priority
        assignee_user_id:
          type: string
          title: Assignee User Id
        action_type:
          type: string
          enum:
            - agent_discovery
            - agent_usability
          title: Action Type
      additionalProperties: false
      type: object
      title: UpdateTaskRequest
      description: >-
        Update the status and delegation of a single task.


        All fields are optional so status transitions and delegation can be
        changed

        independently. Only the fields present in the request body are changed;

        omitted fields are left unchanged. Setting `assignee_user_id` or

        `action_type` to `null` clears it. Send at least one field.
    PublicTask:
      properties:
        id:
          type: string
          title: Id
        action_date:
          type: string
          title: Action Date
        batch_number:
          type: integer
          title: Batch Number
        rank:
          type: integer
          title: Rank
        source_key:
          type: string
          title: Source Key
        task_type:
          type: string
          title: Task Type
        title:
          type: string
          title: Title
        why:
          type: string
          title: Why
        next_action:
          type: string
          title: Next Action
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        execution_prompt:
          type: string
          title: Execution Prompt
          description: Paste-ready instructions for an AI agent to execute this task.
        reasoning:
          anyOf:
            - type: string
            - type: 'null'
          title: Reasoning
        evidence:
          additionalProperties: true
          type: object
          title: Evidence
        score:
          type: number
          title: Score
        effort:
          type: string
          title: Effort
        priority:
          anyOf:
            - type: string
            - type: 'null'
          title: Priority
        status:
          type: string
          title: Status
        assignee_user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Assignee User Id
        function_area:
          anyOf:
            - type: string
            - type: 'null'
          title: Function Area
        action_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Action Type
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
        source_type:
          type: string
          title: Source Type
        source_refs:
          additionalProperties: true
          type: object
          title: Source Refs
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
        updated_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Updated At
      additionalProperties: true
      type: object
      required:
        - id
        - action_date
        - batch_number
        - rank
        - source_key
        - task_type
        - title
        - why
        - next_action
        - execution_prompt
        - score
        - effort
        - status
        - source_type
      title: PublicTask
      description: A single persisted daily task in the public contract shape.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    LightsageApiKeyAuth:
      type: apiKey
      in: header
      name: X-Lightsage-Api-Key

````