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

# Add New Card

> Adds a new payment card to the user's account. The card may be saved for future transactions and can be set as the default payment method.



## OpenAPI

````yaml POST /add-new-card/
openapi: 3.1.0
info:
  title: CloserX.ai API
  description: >-
    The CloserX.ai API provides programmatic access to manage AI-powered calling
    operations, including agent creation, campaign management, contact handling,
    telephony integration, and more. This API enables seamless automation and
    integration with CRM systems, telephony providers, and other third-party
    services for enhanced client communication and business operations.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://app.closerx.ai/api
security:
  - api_key: []
paths:
  /add-new-card/:
    post:
      summary: Add New Card
      description: >-
        Adds a new payment card to the user's account. The card may be saved for
        future transactions and can be set as the default payment method.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddNewCardRequest'
      responses:
        '200':
          description: Card added successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddNewCardResponse'
        '400':
          description: Invalid card details or failed to add card
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    AddNewCardRequest:
      type: object
      required:
        - user_id
        - card_number
        - exp_month
        - exp_year
        - cvc
      properties:
        user_id:
          type: string
          example: user_12345
          description: The ID of the user adding the card.
        card_number:
          type: string
          example: '4242424242424242'
          description: The card number.
        exp_month:
          type: integer
          example: 12
          description: Card expiry month (1-12).
        exp_year:
          type: integer
          example: 2027
          description: Card expiry year (4-digit).
        cvc:
          type: string
          example: '123'
          description: Card CVC/CVV security code.
        is_default:
          type: boolean
          example: true
          description: Whether this card should be set as the default payment method.
    AddNewCardResponse:
      type: object
      properties:
        status:
          type: string
          example: success
          description: Status of the card addition request.
        card_id:
          type: string
          example: card_abc123
          description: The unique ID of the newly added card.
        is_default:
          type: boolean
          example: true
          description: Whether this card is set as the default.
    Error:
      required:
        - success
        - message
        - data
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        data:
          type: object
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: api_key

````