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

# Create card

> Create a card



## OpenAPI

````yaml POST /card
openapi: 3.1.0
info:
  title: OpenAPI Plant Store
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers: []
security:
  - ApiKeyAuth: []
paths:
  /card:
    post:
      description: Create a card
      requestBody:
        description: Card to add to the store
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCardBody'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Card'
        '400':
          $ref: '#/components/responses/400'
        '403':
          $ref: '#/components/responses/403'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
components:
  schemas:
    CreateCardBody:
      type: object
      properties:
        subAccountId:
          type: string
        name:
          type: string
        spendingConstraint:
          $ref: '#/components/schemas/SpendingConstraint'
        cardProductId:
          type: string
      required:
        - name
        - subAccountId
    Card:
      required:
        - id
        - last4
        - name
        - expiryMonth
        - expiryYear
        - status
        - createdAt
      type: object
      properties:
        id:
          description: Id of the card
          type: string
        last4:
          description: Last 4 digits of the card number
          type: string
        name:
          description: Name of the card holder
          type: string
        expiryMonth:
          description: Expiry month of the card
          type: string
        expiryYear:
          description: Expiry year of the card
          type: string
        status:
          description: Status of the card
          type: string
          enum:
            - active
            - paused
            - inactive
            - closed
        createdAt:
          description: Creation date of the card
          type: string
          format: date-time
        spendingConstraint:
          $ref: '#/components/schemas/SpendingConstraint'
    SpendingConstraint:
      description: Spending constraint of the card
      type: object
      properties:
        spendingRule:
          type: object
          properties:
            utilizationLimit:
              type: object
              properties:
                timezone:
                  type: string
                limitAmount:
                  type: object
                  properties:
                    amountCents:
                      type: number
                  required:
                    - amountCents
                preset:
                  type: string
                  enum:
                    - daily
                    - weekly
                    - monthly
                    - yearly
                    - collective
                startDate:
                  type: string
              required:
                - preset
            transactionSizeLimit:
              type: object
              properties:
                minimum:
                  type: object
                  properties:
                    amountCents:
                      type: number
                  required:
                    - amountCents
                maximum:
                  type: object
                  properties:
                    amountCents:
                      type: number
                  required:
                    - amountCents
    ErrorWithNoId:
      required:
        - status
        - code
        - message
      type: object
      properties:
        status:
          type: number
        code:
          type: string
        message:
          type: string
  responses:
    '400':
      description: Invalid Body/Query Parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorWithNoId'
    '403':
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorWithNoId'
    '429':
      description: Too many requests
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorWithNoId'
    '500':
      description: Unidentified Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorWithNoId'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````