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

# Create or update a task checklist action

> Upsert a checklist action on a task. There is no separate create endpoint — PUT is used for both create and update.

Omit `id` to create a new action (the server assigns one); pass an existing `id` to update that action. `description` is required on every write, including updates that only change `done`.

The response echoes back the action as submitted, not the stored record — it does not reflect how a partial update merged with the existing action.



## OpenAPI

````yaml /api-reference/endpoint/workspaces/openapi.json put /workspaces/task/{task_id}/action
openapi: 3.0.3
info:
  title: Workspaces Service API
  version: 1.0.0
  description: API for managing workspaces, tasks, and comments
servers:
  - url: https://api.quiva.ai
    description: Production API server
security:
  - bearerAuth: []
  - apiKeyAuth: []
paths:
  /workspaces/task/{task_id}/action:
    put:
      tags:
        - Task Actions
      summary: Create or update a task checklist action
      description: >-
        Upsert a checklist action on a task. There is no separate create
        endpoint — PUT is used for both create and update.


        Omit `id` to create a new action (the server assigns one); pass an
        existing `id` to update that action. `description` is required on every
        write, including updates that only change `done`.


        The response echoes back the action as submitted, not the stored record
        — it does not reflect how a partial update merged with the existing
        action.
      operationId: setTaskAction
      parameters:
        - name: task_id
          in: path
          required: true
          description: Task id the action hangs off.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskAction'
      responses:
        '200':
          description: The action as submitted (echoed back, not read back from storage).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskAction'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    TaskAction:
      type: object
      required:
        - description
      description: >-
        A checklist item on a task. `description` is required on every write,
        not only on create — an update that only flips `done` still has to
        resend it.
      properties:
        id:
          type: string
          description: >-
            Action id. Omit on create and the server assigns one; pass an
            existing id to update that action.
          example: ta_a1b2c3
        description:
          type: string
          minLength: 1
          description: What the action is. Required on every write.
          example: Confirm the report has been proofread
        done:
          type: boolean
          description: Whether the item is ticked off.
        resources:
          type: array
          items:
            $ref: '#/components/schemas/TaskActionResource'
          description: Platform resources linked from this action.
    TaskActionResource:
      type: object
      required:
        - resource_id
        - resource_type
      description: >-
        A platform resource linked from a checklist action. Both fields are
        free-form strings — the resource is not validated to exist.
      properties:
        resource_id:
          type: string
          example: onboarding-checklist
        resource_type:
          type: string
          example: record-config
        metadata:
          type: object
          additionalProperties: true
          description: Free-form metadata carried alongside the link.
    Error:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
          description: Stable machine code. Branch on this, not on `error`.
      required:
        - error
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT Authorization header using the Bearer scheme
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.