> ## 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 many tasks

> Applies one update to up to 100 tasks: either an explicit `taskIds` list (archived
tasks included, so they can be un-archived), or every non-archived task on a card
(`aptletInstanceId`) — open tasks only unless `includeCompleted` is true. Each task is updated exactly as `PUT /api/tasks/{taskId}` would update it
(card checklist, assignment notifications and completion workflows included).

Use `archived: true` to close or skip tasks, `checked: true` to complete them.
One task failing does not stop the others; it is listed in `failed`. A task on a
board outside an API key's board allowlist is reported as `FORBIDDEN`.




## OpenAPI

````yaml /openapi.yaml post /api/tasks/bulk-update
openapi: 3.0.3
info:
  title: Aptly API
  version: '1.1'
  description: |
    The Aptly API lets external systems work with boards, contacts, inboxes,
    tasks, files, and other Aptly resources.

    Most endpoints accept an API key in the `x-token` header. Some endpoints
    also accept a delegate token or partner bearer token, as shown in each
    operation's security requirements, and explicitly public endpoints require
    no credential. API keys are scoped to a company and may be restricted to
    specific boards and read, insert, or update permissions; requests outside
    those restrictions receive a 403 `FORBIDDEN` response.
servers:
  - url: https://core-api.getaptly.com
    description: Production
security:
  - ApiKeyHeader: []
paths:
  /api/tasks/bulk-update:
    post:
      tags:
        - Tasks
      summary: Update many tasks
      description: >
        Applies one update to up to 100 tasks: either an explicit `taskIds` list
        (archived

        tasks included, so they can be un-archived), or every non-archived task
        on a card

        (`aptletInstanceId`) — open tasks only unless `includeCompleted` is
        true. Each task is updated exactly as `PUT /api/tasks/{taskId}` would
        update it

        (card checklist, assignment notifications and completion workflows
        included).


        Use `archived: true` to close or skip tasks, `checked: true` to complete
        them.

        One task failing does not stop the others; it is listed in `failed`. A
        task on a

        board outside an API key's board allowlist is reported as `FORBIDDEN`.
      operationId: bulkUpdateTasks
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - update
              properties:
                userId:
                  type: string
                  description: >
                    Acting user the updates are attributed to. Required with
                    API-key auth;

                    ignored with a delegate token, which supplies the user
                    itself.
                taskIds:
                  type: array
                  maxItems: 100
                  items:
                    type: string
                  description: Tasks to update. Provide this or `aptletInstanceId`.
                aptletInstanceId:
                  type: string
                  description: Update every task on this card instead of a `taskIds` list.
                includeCompleted:
                  type: boolean
                  default: false
                  description: With `aptletInstanceId`, also update completed tasks.
                update:
                  type: object
                  additionalProperties: false
                  minProperties: 1
                  properties:
                    status:
                      type: string
                      enum:
                        - backlog
                        - notStarted
                        - inProgress
                        - onHold
                        - completed
                    priority:
                      type: string
                      enum:
                        - asap
                        - high
                        - medium
                        - low
                    dueAt:
                      type: string
                      format: date-time
                      nullable: true
                    assigneeId:
                      type: string
                    checked:
                      type: boolean
                    archived:
                      type: boolean
            example:
              aptletInstanceId: a1b2c3d4e5f6
              update:
                archived: true
      responses:
        '200':
          description: Which tasks were updated and which were not.
          content:
            application/json:
              schema:
                type: object
                properties:
                  updated:
                    type: array
                    items:
                      type: string
                  failed:
                    type: array
                    items:
                      type: object
                      properties:
                        taskId:
                          type: string
                        code:
                          type: string
                          example: FORBIDDEN
                        message:
                          type: string
        '400':
          description: Invalid body, no target given, or more than 100 matching tasks.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Invalid or missing credential.
      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>`'

````

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