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

# Rename a card

> Changes the card's `alias`. Works on every card.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/card/update
openapi: 3.1.0
info:
  title: StableMesh Open API
  version: 1.0.0
  description: >-
    Issue and manage StableMesh cards from your own server. Every endpoint is
    `POST` with a JSON body, authenticated with your API key in `X-API-KEY`.
  contact:
    email: contact@stablemesh.io
servers:
  - url: https://api.stablemesh.io
    description: Production
security:
  - ApiKey: []
tags:
  - name: Account
    description: Your USD account.
  - name: Deposits
    description: Fund your USD account with stablecoins.
  - name: Cards
    description: Issue, fund and control cards.
  - name: Webhooks
    description: Configure event delivery.
  - name: Sandbox
    description: Simulate deposits and payments in the sandbox.
paths:
  /v1/card/update:
    post:
      tags:
        - Cards
      summary: Rename a card
      description: Changes the card's `alias`. Works on every card.
      operationId: v1_card_update
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                cardId:
                  type: string
                  description: The card's id, from `card/list` or `card/create`.
                  example: '2026100117908000004821'
                alias:
                  type: string
                  description: New label, 1–50 characters.
                  maxLength: 50
                  example: Google ads
              required:
                - cardId
                - alias
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: '`0` on success.'
                    example: 0
                  message:
                    type: string
                    description: '`ok` on success.'
                    example: ok
                  data:
                    $ref: '#/components/schemas/Card'
                required:
                  - code
                  - message
                  - data
        '400':
          description: Refused (bad parameter, business rule). Nothing changed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, invalid, revoked or expired API key (`11002`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Request from an IP not on the key's allowlist (`11003`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Over the per-key rate limit (`11004`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: >-
            Internal error (`9999`). The outcome may be unknown; check state
            before retrying.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Card:
      type: object
      properties:
        cardId:
          type: string
          description: The card's id, from `card/list` or `card/create`.
          example: '2026100117908000004821'
        binId:
          type: string
          description: The card's product id. See `card/products`.
          example: VISA-WSB-49372410
        productName:
          type:
            - string
            - 'null'
          description: Product display name.
          example: Visa Card
        network:
          type:
            - string
            - 'null'
          description: '`VISA` or `MASTERCARD`.'
          example: VISA
        last4:
          type:
            - string
            - 'null'
          description: Last four digits. `null` until the issuer has assigned the number.
          example: '4242'
        alias:
          type:
            - string
            - 'null'
          description: Your label for the card.
          example: Meta ads
        status:
          type: string
          description: Card status.
          enum:
            - PENDING
            - ACTIVE
            - FROZEN
            - CANCELLED
          example: ACTIVE
        pendingOperation:
          type:
            - string
            - 'null'
          description: A change still in progress at the issuer, or `null`.
          enum:
            - FREEZE
            - UNFREEZE
            - CANCEL
            - null
        balance:
          $ref: '#/components/schemas/Balance'
        createdAt:
          type: string
          description: ISO 8601, UTC.
          format: date-time
          example: '2026-10-01T08:30:00Z'
        operations:
          type: array
          description: >-
            Changes the API accepts on this card. Anything else answers `4011`;
            use the dashboard for it. The card's status still applies on top.
          items:
            type: string
            enum:
              - TOP_UP
              - WITHDRAW
              - FREEZE
              - UNFREEZE
              - CANCEL
          example:
            - TOP_UP
            - WITHDRAW
            - FREEZE
            - UNFREEZE
            - CANCEL
        retainedMinimum:
          type: string
          description: >-
            Only on `card/detail`: the amount the issuer keeps on the card,
            which can't be withdrawn. Decimal string.
          example: '0'
        heldAmount:
          type: string
          description: >-
            Only on `card/cancel`: the balance held for return while the
            cancellation completes. Decimal string.
          example: '25.5'
      required:
        - cardId
        - binId
        - productName
        - network
        - last4
        - alias
        - status
        - pendingOperation
        - balance
        - createdAt
        - operations
    Error:
      type: object
      properties:
        code:
          type: integer
          description: Non-zero error code. See [Errors](/api-reference/errors).
          example: 4011
        message:
          type: string
          description: Human-readable reason.
          example: >-
            This card can't be topped up through the API. Use the dashboard for
            this card.
        data:
          type: object
          description: >-
            Present only when the error carries something you need, e.g.
            `withdrawalId` on a `9999` from `card/withdraw`.
          additionalProperties: true
      required:
        - code
        - message
    Balance:
      type: object
      properties:
        available:
          type: string
          description: Spendable now. Decimal string.
          example: '100'
        frozen:
          type: string
          description: Held, e.g. for pending payments. Decimal string.
          example: '0'
        currency:
          type: string
          description: Always `USD`.
          example: USD
      required:
        - available
        - frozen
        - currency
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-API-KEY
      description: >-
        Create keys in the dashboard under **Settings → API keys**. Production
        keys start with `smk_live_`.

````

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