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

# Update a task

> Updates a task and keeps its card-checklist mirror entry in sync.

The update is attributed to a user who must belong to the company. With a
delegate token the user is taken from the token. With an API key (no
associated user), supply `userId` in the body — it must belong to the
company or the request is rejected.




## OpenAPI

````yaml /openapi.yaml put /api/tasks/{taskId}
openapi: 3.0.3
info:
  title: Aptly API
  version: '1.0'
  description: >
    The Aptly API lets you read and write cards on any Aptly board from external
    systems.


    All requests require an API key passed as the `x-token` header.

    API keys are scoped to your company and work across all boards.
servers:
  - url: https://core-api.getaptly.com
    description: Production
security:
  - ApiKeyHeader: []
paths:
  /api/tasks/{taskId}:
    put:
      tags:
        - Tasks
      summary: Update a task
      description: >
        Updates a task and keeps its card-checklist mirror entry in sync.


        The update is attributed to a user who must belong to the company. With
        a

        delegate token the user is taken from the token. With an API key (no

        associated user), supply `userId` in the body — it must belong to the

        company or the request is rejected.
      operationId: updateTask
      parameters:
        - name: taskId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                userId:
                  type: string
                  description: >
                    Acting user the update is attributed to. Required with
                    API-key

                    auth (must belong to the company); ignored with a delegate

                    token, which supplies the user itself.
                title:
                  type: string
                description:
                  type: string
                checked:
                  type: boolean
                dueAt:
                  type: string
                  format: date-time
                status:
                  type: string
                  description: One of backlog|notStarted|inProgress|onHold|completed.
                priority:
                  type: string
                  description: One of asap|high|medium|low.
                assigneeId:
                  type: string
                archived:
                  type: boolean
                archivedAt:
                  type: string
                  format: date-time
                startedAt:
                  type: string
                  format: date-time
                checkedAt:
                  type: string
                  format: date-time
                pinned:
                  type: boolean
                rank:
                  type: number
                attachmentIds:
                  type: array
                  items:
                    type: string
                outcomeType:
                  type: string
                aptletInstanceId:
                  type: string
                fieldId:
                  type: string
            example:
              title: Renamed task
              checked: true
              status: completed
              priority: high
      responses:
        '200':
          description: Task updated.
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
        '400':
          description: Missing or invalid field.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Invalid or missing credential.
        '404':
          description: Task not found.
      security:
        - ApiKeyHeader: []
        - DelegateToken: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: x-token
    DelegateToken:
      type: apiKey
      in: header
      name: Authorization
      description: 'Delegate token issued by the platform. Format: `DelegateToken <token>`'

````