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

# Save a card definition draft

> Creates a draft card definition. Its card properties wait as pending changes, and it has no entries until it's activated. Every card property must point at an existing source. 409: the id is taken, also by an archived card definition.



## OpenAPI

````yaml /api-reference/openapi/configuration.json post /v1/card-definitions
openapi: 3.2.0
info:
  title: Configuration API
  description: >-
    Manages applications, sources, source properties, source folders, managed
    tags and their values, card definitions, their segments and relation
    definitions; manages destinations, their versions and endpoints, and
    publishes versions; and authors, previews and activates card lifecycles.
    Card property changes are saved as pending changes and take effect when the
    card definition is activated. Source property changes and source deletion
    can finish asynchronously. The tenant comes from the access token.
    Successful responses return the resource itself; lists return a page with
    `items`, the `after` cursor for the next page and, when asked for,
    `totalCount` (`limit` default 50, max 200; lifecycle lists default 25, max
    100). Application updates replace the settings and need the latest `etag`;
    secrets are returned only when created. Errors are problem details
    (`application/problem+json`). Values are PascalCase in REST and UPPER_CASE
    in GraphQL.
  version: 1.0.0
servers:
  - url: https://api.occtoo.com
security: []
tags:
  - name: Applications
  - name: Card definitions
  - name: Card exports
  - name: Destination endpoints
  - name: Destination versions
  - name: Destinations
  - name: Languages
  - name: Lifecycles
  - name: Managed tag values
  - name: Managed tags
  - name: Relation definitions
  - name: Segments
  - name: Sources
paths:
  /v1/card-definitions:
    post:
      tags:
        - Card definitions
      summary: Save a card definition draft
      description: >-
        Creates a draft card definition. Its card properties wait as pending
        changes, and it has no entries until it's activated. Every card property
        must point at an existing source. 409: the id is taken, also by an
        archived card definition.
      operationId: CreateCardDefinition
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCardDefinitionRequest'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CardDefinitionResponse'
        '400':
          description: Bad Request
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/HttpValidationProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '409':
          description: Conflict
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '429':
          description: Too Many Requests
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying.
              schema:
                minimum: 1
                type: integer
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: Internal Server Error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - kindeOAuth: []
        - bearerAuth: []
        - apiKey: []
components:
  schemas:
    CreateCardDefinitionRequest:
      required:
        - id
        - name
      type: object
      properties:
        id:
          type: string
          description: Starts with a lowercase letter, then letters and digits. Immutable.
        name:
          type: string
          description: Name of the card definition, shown in Studio.
        description:
          type:
            - 'null'
            - string
          description: Free-text note about the card definition.
        tags:
          type:
            - 'null'
            - array
          items:
            type: string
          description: Labels for grouping and filtering card definitions.
        displayOptions:
          type:
            - 'null'
            - object
          additionalProperties:
            type: string
          description: >-
            Card properties that present each card, keyed by role (`name`,
            `description` or `image`); each value is a card property id.
        propertyGroups:
          type:
            - 'null'
            - array
          items:
            $ref: '#/components/schemas/PropertyGroup'
          description: >-
            Groups that arrange the card definition's card properties in Studio.
            A card property can be in one group only.
        properties:
          type:
            - 'null'
            - array
          items:
            $ref: '#/components/schemas/CardProperty'
          description: >-
            First card properties. They wait as pending changes until the first
            activation.
      description: Holds a new card definition draft.
    CardDefinitionResponse:
      required:
        - id
        - name
        - description
        - tags
        - status
        - etag
        - displayOptions
        - propertyGroups
        - properties
        - pendingChanges
        - createdAt
        - updatedAt
      type: object
      properties:
        id:
          type: string
          description: >-
            Raw id of the card definition (e.g. `products`). Use with
            `/v1/card-definitions/{cardId}`.
        name:
          type: string
          description: Name of the card definition, shown in Studio.
        description:
          type:
            - 'null'
            - string
          description: Free-text note about the card definition.
        tags:
          type: array
          items:
            type: string
          description: Labels for grouping and filtering card definitions.
        status:
          $ref: '#/components/schemas/CardDefinitionStatus'
          description: State of the card definition. See `CardDefinitionStatus`.
        etag:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          description: >-
            Version of the card definition. Send it quoted in `If-Match` (e.g.
            `"3"`).
          format: uint32
        displayOptions:
          type: object
          additionalProperties:
            type: string
          description: >-
            Card properties that present each card, keyed by role (`name`,
            `description` or `image`); each value is a card property id.
        propertyGroups:
          type: array
          items:
            $ref: '#/components/schemas/PropertyGroup'
          description: >-
            Groups that arrange the card definition's card properties in Studio.
            A card property can be in one group only.
        properties:
          type: array
          items:
            $ref: '#/components/schemas/CardProperty'
          description: Active card properties. Empty until the first activation completes.
        pendingChanges:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/CardPropertyChanges'
              description: >-
                Saved card property changes that aren't active yet. Null when
                there are none.
          description: >-
            Saved card property changes that aren't active yet. Null when there
            are none.
        createdAt:
          type: string
          description: When the card definition was created (UTC).
          format: date-time
        updatedAt:
          type: string
          description: When the card definition last changed (UTC).
          format: date-time
      description: >-
        Shapes the entries of one or more sources into cards: picks source
        properties as card properties and sets the data type each exposes.
    HttpValidationProblemDetails:
      type: object
      properties:
        type:
          type:
            - 'null'
            - string
        title:
          type:
            - 'null'
            - string
        status:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - 'null'
            - integer
            - string
          format: int32
        detail:
          type:
            - 'null'
            - string
        instance:
          type:
            - 'null'
            - string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
    ProblemDetails:
      type: object
      properties:
        type:
          type:
            - 'null'
            - string
        title:
          type:
            - 'null'
            - string
        status:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - 'null'
            - integer
            - string
          format: int32
        detail:
          type:
            - 'null'
            - string
        instance:
          type:
            - 'null'
            - string
    PropertyGroup:
      type: object
      properties:
        name:
          type: string
          description: Name of the group.
        propertyIds:
          type: array
          items:
            type: string
          description: >-
            Ids of the source properties or card properties in the group: source
            property ids on a source or folder, card property ids on a card
            definition.
      description: >-
        Names a group that arranges source properties or card properties in
        Studio: source properties on a source or folder, card properties on a
        card definition.
    CardProperty:
      required:
        - id
        - sourceId
        - sourcePropertyId
        - type
      type: object
      properties:
        id:
          type: string
          description: Starts with a lowercase letter, then letters and digits. Immutable.
        sourceId:
          type: string
          description: The source the value comes from.
        sourcePropertyId:
          type: string
          description: The source property the value comes from.
        type:
          $ref: '#/components/schemas/PropertyDataType'
          description: >-
            Must match the type of the source property. Can't change once the
            card property is active.
        name:
          type:
            - 'null'
            - object
          additionalProperties:
            type: string
          description: Display name per language code.
        description:
          type:
            - 'null'
            - object
          additionalProperties:
            type: string
          description: Description per language code.
        settings:
          type:
            - 'null'
            - object
          additionalProperties:
            type: string
          description: >-
            Extra settings of the card property, keyed by name. The platform
            reads `timestampFormat`.
        delimiter:
          type:
            - 'null'
            - string
          description: Required for `List` and `LocalizedList`.
        order:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          type:
            - number
            - string
          description: >-
            Position among the card definition's card properties. 0 keeps the
            position of an active card property; a card property added to an
            existing card definition is appended.
          format: double
          default: 0
        isHidden:
          type: boolean
          description: True if Studio hides the card property.
          default: false
        isEditable:
          type: boolean
          description: True if enrichment can change the card property's values.
          default: false
        managedTagList:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/ManagedTagListValueSource'
              description: >-
                Managed tag list whose values fill this card property on
                enrichment.
          description: Managed tag list whose values fill this card property on enrichment.
      description: >-
        Describes a card property of a card definition: the source property it
        reads and the data type it exposes.
    CardDefinitionStatus:
      enum:
        - Draft
        - Active
        - Updating
        - Archived
        - Archiving
        - PendingChanges
      description: Tracks whether a card definition is live, being changed or archived.
      x-enum-descriptions:
        Draft: >-
          Not live: the card definition has never been activated, or was
          restored. Its card properties are pending changes until it's
          activated.
        Active: 'Live: the cards expose the card definition''s current card properties.'
        Updating: >-
          In progress: changed card properties are being indexed. It turns
          active when indexing finishes.
        Archived: >-
          Not live: the card definition is archived. Restoring it makes it a
          draft again.
        Archiving: 'In progress: the card definition is being archived.'
        PendingChanges: >-
          Live: active, with saved card property changes not applied yet.
          Filtering `status` on it matches nothing; such card definitions match
          the active status.
    CardPropertyChanges:
      type: object
      properties:
        set:
          type:
            - 'null'
            - array
          items:
            $ref: '#/components/schemas/CardProperty'
          description: >-
            Card properties to add or change. One that isn't active yet is
            added; an active one is changed.
        remove:
          type:
            - 'null'
            - array
          items:
            type: string
          description: Ids of active card properties to remove.
      description: Holds card property changes that wait for activation.
    PropertyDataType:
      enum:
        - Text
        - LocalizedText
        - List
        - LocalizedList
        - Boolean
        - Timestamp
        - Integer
        - Decimal
        - Wildcard
        - null
      description: >-
        Sets the data type of a source property or card property, which decides
        the shape of its values.
      x-enum-descriptions:
        Text: Plain text, as a string.
        LocalizedText: >-
          Text per language, as an object of language code to string. Example:
          `{ "en": "Hello", "fr": "Bonjour" }`.
        List: List of strings.
        LocalizedList: >-
          List of strings per language, as an object of language code to array
          of strings. Example: `{ "en": ["Red", "Blue"], "fr": ["Rouge", "Bleu"]
          }`.
        Boolean: True or false.
        Timestamp: Date and time, as an ISO 8601 string (e.g. `2026-11-19T12:00:00Z`).
        Integer: Whole number.
        Decimal: Number with decimal places.
        Wildcard: Not in use; will be removed.
    ManagedTagListValueSource:
      required:
        - listId
        - valueType
      type: object
      properties:
        listId:
          type: string
          description: >-
            Raw id (a UUID) of the managed tag list, as
            `/v1/managed-tags/{managedTagId}` takes it.
          format: uuid
        valueType:
          $ref: '#/components/schemas/ManagedTagValueType'
          description: >-
            Whether the card property stores the tag's key or its value. See
            `ManagedTagValueType`.
      description: >-
        Names the managed tag list a card property takes its values from, and
        whether it stores the tag's key or its value.
    ManagedTagValueType:
      enum:
        - Value
        - Key
      description: >-
        Tells which part of a managed tag a card property stores: its key or its
        value.
      x-enum-descriptions:
        Value: >-
          The card property stores the tag's text. A text or list card property
          needs a text list; a localized text or localized list card property
          needs a localized text list.
        Key: >-
          The card property stores the tag's `key`. Works for text, list,
          localized text and localized list card properties, whatever the list's
          `type`.
  securitySchemes:
    kindeOAuth:
      type: oauth2
      description: >-
        Sign in with the existing Occtoo Studio identity and selected
        organization.
      flows:
        authorizationCode:
          authorizationUrl: >-
            https://auth.occtoo.com/oauth2/auth?audience=https%3A%2F%2Fapi-weu.occtoo.com
          tokenUrl: https://auth.occtoo.com/oauth2/token
          scopes:
            openid: Authenticate the user with OpenID Connect.
            profile: Read the user's basic profile.
            email: Read the user's email address.
            offline: Refresh the access token without another interactive sign-in.
          x-usePkce: SHA-256
          x-scalar-redirect-uri: https://api.occtoo.com/docs/
    bearerAuth:
      type: http
      description: >-
        Tenant-scoped Occtoo access token, including Kinde machine-to-machine
        application tokens.
      scheme: bearer
      bearerFormat: JWT
    apiKey:
      type: apiKey
      description: Occtoo organization API key.
      name: x-api-key
      in: header

````

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