> ## 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.

# Create or update a card

> Creates a new card on the board. Use field UUIDs (from the schema endpoint) as keys in the request body.

To update an existing card, include its `_id` in the request body. The card must belong to this board.
Fields not provided in the body are left unchanged on update.




## OpenAPI

````yaml /openapi.yaml post /api/board/{boardId}
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/board/{boardId}:
    post:
      tags:
        - Cards
      summary: Create or update a card
      description: >
        Creates a new card on the board. Use field UUIDs (from the schema
        endpoint) as keys in the request body.


        To update an existing card, include its `_id` in the request body. The
        card must belong to this board.

        Fields not provided in the body are left unchanged on update.
      operationId: createCard
      parameters:
        - name: boardId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                _id:
                  type: string
                  description: >-
                    Existing card ID. When provided, updates that card instead
                    of creating a new one.
                name:
                  type: string
                  description: Card title (also accepted as `title`).
              additionalProperties:
                description: Any board field UUID as key, with the field's value.
            example:
              name: John Smith
              abc123: john@example.com
              ghi789: 1500
      responses:
        '200':
          description: Card created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      _id:
                        type: string
                        description: ID of the created card.
        '401':
          description: Invalid or missing API key.
        '403':
          description: API access is disabled for this board.
        '404':
          description: Board not found.
      security:
        - ApiKeyHeader: []
        - DelegateToken: []
components:
  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>`'

````