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

# Set Default

> Sets a specific card or payment method as the default for the user.



## OpenAPI

````yaml PATCH /set-default/{id}
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:
  /set-default/{id}:
    patch:
      summary: Set Default
      description: Sets a specific card or payment method as the default for the user.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the card or payment method to set as default.
          schema:
            type: string
            example: card_abc123
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetDefaultRequest'
      responses:
        '200':
          description: Card successfully set as default
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SetDefaultResponse'
        '400':
          description: Invalid request or card not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    SetDefaultRequest:
      type: object
      required:
        - user_id
      properties:
        user_id:
          type: string
          example: user_12345
          description: The ID of the user for whom the card will be set as default.
    SetDefaultResponse:
      type: object
      properties:
        status:
          type: string
          example: success
          description: Indicates whether the default setting was successful.
        default_card_id:
          type: string
          example: card_abc123
          description: The ID of the card now 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

````