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

# Complete task (client portal)

> Mark a client task as completed. Triggers next automation step if task belongs to a project, recalculates plan admin status for census tasks, and sends notifications to assignees.



## OpenAPI

````yaml /api-reference/cx/swagger.json post /cp/{client}/tasks/{task}/_done
openapi: 3.0.0
info:
  description: CX API.
  title: CX API
  contact:
    name: API Support
    url: https://stax.ai
    email: support@stax.ai
  version: '1.0'
servers:
  - url: https://api.cx.stax.ai
security: []
paths:
  /cp/{client}/tasks/{task}/_done:
    post:
      tags:
        - client-portal
      summary: Complete task (client portal)
      description: >-
        Mark a client task as completed. Triggers next automation step if task
        belongs to a project, recalculates plan admin status for census tasks,
        and sends notifications to assignees.
      parameters:
        - description: Client ID
          name: client
          in: path
          required: true
          schema:
            type: string
        - description: Task ID
          name: task
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Completion result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pkg_routes_cp_tasks.DoneTaskResponse'
        '400':
          description: Bad request - invalid client ID or task ID
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '403':
          description: Forbidden - no access to client
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '404':
          description: Client or task not found
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
      security:
        - ApiKeyAuth: []
components:
  schemas:
    pkg_routes_cp_tasks.DoneTaskResponse:
      type: object
      properties:
        ok:
          type: boolean
  securitySchemes:
    ApiKeyAuth:
      description: CX API key. Create one in CX under Settings → Advanced → API Keys.
      in: header
      name: x-api-key
      type: apiKey

````

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