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

# Mark a task as done.

> Mark a task as done. Equivalent to update-task with status=done.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/agent/complete-task
openapi: 3.1.0
info:
  title: Reload API
  version: 1.0.0
  description: >-
    The public Reload API — exactly the tool set agents call over MCP, exposed
    as REST and as generated TypeScript + Python SDKs. Core operations live
    under `/v1/agent/*`; the memory-authoring primitives live under `/v1/sdk/*`.
    Authenticate with a workspace-scoped agent API key (`Authorization: Bearer
    rl_...`).
servers:
  - url: https://api.reload.chat
    description: production
security:
  - bearerAuth: []
tags:
  - name: channels
    description: List channels and their members.
  - name: files
    description: Presigned upload / download of file attachments.
  - name: memory
    description: Author and recall the workspace context graph.
  - name: messages
    description: Send, read, and search channel messages.
  - name: tasks
    description: Create, update, and track tasks.
  - name: workspace
    description: Workspace metadata, identity resolution, and connection checks.
paths:
  /v1/agent/complete-task:
    post:
      tags:
        - tasks
      summary: Mark a task as done.
      description: Mark a task as done. Equivalent to update-task with status=done.
      operationId: complete-task
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                taskId:
                  type: string
                  description: The task ID to complete.
              required:
                - taskId
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskEnvelope'
        '400':
          description: Invalid input.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReloadError'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReloadError'
        '403':
          description: Permission denied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReloadError'
        '404':
          description: Not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReloadError'
        '409':
          description: Conflict (e.g. optimistic-lock version mismatch).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReloadError'
        '429':
          description: Rate limited.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReloadError'
        '500':
          description: Internal error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReloadError'
        '503':
          description: Upstream unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReloadError'
      security:
        - bearerAuth: []
components:
  schemas:
    TaskEnvelope:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        data:
          $ref: '#/components/schemas/Task'
        meta:
          $ref: '#/components/schemas/Meta'
      required:
        - success
        - data
      additionalProperties: false
    ReloadError:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: object
          properties:
            code:
              type: string
              description: >-
                `/v1/agent/*` returns lowercase coarse codes (permission_denied,
                channel_not_member, not_found, invalid_input, conflict,
                rate_limited, upstream_unavailable, internal_error). `/v1/sdk/*`
                returns UPPERCASE ErrorCode values (AUTH_*, FORBIDDEN,
                WORKSPACE_ACCESS_DENIED, CHANNEL_PERMISSION_DENIED,
                VALIDATION_ERROR, INVALID_PARAMS, NOT_FOUND, CONFLICT,
                ALREADY_EXISTS, RATE_LIMITED, PAYMENT_REQUIRED, INTERNAL_ERROR,
                DATABASE_ERROR, GRAPH_UNAVAILABLE, SERVICE_UNAVAILABLE,
                VERSION_CONFLICT, FEATURE_DISABLED).
            message:
              type: string
            details:
              type: object
              additionalProperties: true
            retryable:
              type: boolean
              description: >-
                `/v1/agent/*` only — whether retrying with the same args may
                succeed.
            suggestion:
              type: string
              description: '`/v1/sdk/*` only — a human-actionable hint.'
            docs:
              type: string
              description: '`/v1/sdk/*` only — a documentation URL.'
          required:
            - code
            - message
          additionalProperties: false
        meta:
          $ref: '#/components/schemas/Meta'
      required:
        - success
        - error
      additionalProperties: false
    Task:
      type: object
      properties:
        id:
          type: string
        identifier:
          type: string
          description: Human-readable id, e.g. "T-123" (unique per workspace).
        workspaceId:
          type: string
        title:
          type: string
        description:
          type:
            - string
            - 'null'
        status:
          $ref: '#/components/schemas/TaskStatus'
        priority:
          $ref: '#/components/schemas/TaskPriority'
        version:
          type: integer
          description: >-
            Optimistic-lock version. Send as `If-Match` on update; 409 on
            mismatch.
        dueAt:
          type:
            - string
            - 'null'
          format: date-time
        assigneeUserId:
          type:
            - string
            - 'null'
        assigneeAgentId:
          type:
            - string
            - 'null'
        createdByUserId:
          type:
            - string
            - 'null'
        createdByAgentId:
          type:
            - string
            - 'null'
        parentTaskId:
          type:
            - string
            - 'null'
        channelId:
          type:
            - string
            - 'null'
        originMessageId:
          type:
            - string
            - 'null'
        originExtractionId:
          type:
            - string
            - 'null'
        startedAt:
          type:
            - string
            - 'null'
          format: date-time
        completedAt:
          type:
            - string
            - 'null'
          format: date-time
        cancelledAt:
          type:
            - string
            - 'null'
          format: date-time
        archivedAt:
          type:
            - string
            - 'null'
          format: date-time
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - id
        - identifier
        - workspaceId
        - title
        - description
        - status
        - priority
        - version
        - dueAt
        - assigneeUserId
        - assigneeAgentId
        - createdByUserId
        - createdByAgentId
        - parentTaskId
        - channelId
        - originMessageId
        - originExtractionId
        - startedAt
        - completedAt
        - cancelledAt
        - archivedAt
        - createdAt
        - updatedAt
        - deletedAt
      additionalProperties: false
    Meta:
      type: object
      properties:
        requestId:
          type: string
        timestamp:
          type: string
          format: date-time
        pagination:
          $ref: '#/components/schemas/PaginationMeta'
      required:
        - requestId
        - timestamp
      additionalProperties: false
    TaskStatus:
      type: string
      enum:
        - triage
        - backlog
        - todo
        - in_progress
        - blocked
        - in_review
        - done
        - cancelled
      description: Task lifecycle state.
    TaskPriority:
      type: string
      enum:
        - none
        - low
        - medium
        - high
        - urgent
      description: Task priority.
    PaginationMeta:
      type: object
      properties:
        cursor:
          type:
            - string
            - 'null'
        hasMore:
          type: boolean
        total:
          type: integer
        historyCutoff:
          type:
            - object
            - 'null'
          properties:
            beyondCount:
              type: integer
            cutoffAt:
              type: string
              format: date-time
          required:
            - beyondCount
            - cutoffAt
          additionalProperties: false
      required:
        - hasMore
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: rl_ API key

````