> ## Documentation Index
> Fetch the complete documentation index at: https://gnosispay-feat-v2-auth-module.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Set Card Daily Spending Limit

> Sets the daily spending limit for a card. `amount` is in the currency's
smallest unit - for USD that means cents, so to set a $10.00 limit send
`1000`, and the maximum allowed value `1000000` corresponds to $10,000.00.
Must be in (0, 1,000,000]. Only USD is currently accepted. The card must
belong to the authenticated user. The response returns the new limit
immediately with `syncStatus: pending` and transitions to `synced` once the
change has been applied downstream.



## OpenAPI

````yaml https://core.prod.gnosispay.com/user-api/openapi.json put /cards/{cardId}/limit
openapi: 3.1.0
info:
  title: User Service
  version: 0.0.0
servers: []
security: []
tags:
  - name: Health
  - name: Auth
  - name: User
  - name: Cards
  - name: Phone
  - name: PCI
  - name: Terms
  - name: Source of Funds
paths:
  /cards/{cardId}/limit:
    put:
      tags:
        - Cards
      summary: Set Card Daily Spending Limit
      description: >-
        Sets the daily spending limit for a card. `amount` is in the currency's

        smallest unit - for USD that means cents, so to set a $10.00 limit send

        `1000`, and the maximum allowed value `1000000` corresponds to
        $10,000.00.

        Must be in (0, 1,000,000]. Only USD is currently accepted. The card must

        belong to the authenticated user. The response returns the new limit

        immediately with `syncStatus: pending` and transitions to `synced` once
        the

        change has been applied downstream.
      operationId: Cards_setCardLimit
      parameters:
        - name: cardId
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/uuid'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetCardLimitRequest'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CardLimit'
        '400':
          description: The server could not understand the request due to invalid syntax.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CardLimitBadRequestBody'
        '401':
          description: Unauthorized - Invalid JWT
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SetCardLimitBadGateway'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - BearerAuth: []
components:
  schemas:
    uuid:
      type: string
      format: uuid
    SetCardLimitRequest:
      type: object
      required:
        - amount
        - currency
      properties:
        amount:
          type: integer
          format: int64
          minimum: 1
          maximum: 1000000
          description: >-
            Daily limit in the currency's smallest unit (e.g. cents for USD).
            For USD:

            send 1000 to set a $10.00 limit, send 1000000 to set the $10,000.00
            cap.

            Must be in (0, 1,000,000].
        currency:
          type: string
          description: ISO-4217 currency code. Only `USD` is currently accepted.
    CardLimit:
      type: object
      required:
        - spentToday
        - remaining
      properties:
        spentToday:
          type: integer
          format: int64
          description: >-
            Amount spent today against this card's limit, in the currency's
            smallest

            unit (e.g. cents for USD). Resets at the start of each calendar day.
        remaining:
          type: integer
          format: int64
          description: >-
            Remaining headroom today, in the currency's smallest unit. Equals
            max(0,

            amount - spentToday).
      allOf:
        - $ref: '#/components/schemas/CardLimitSummary'
    CardLimitBadRequestBody:
      type: object
      oneOf:
        - $ref: '#/components/schemas/CardLimitValidationError'
        - $ref: '#/components/schemas/CardLimitBusinessError'
      discriminator:
        propertyName: kind
        mapping:
          validation:
            $ref: '#/components/schemas/CardLimitValidationError'
          business:
            $ref: '#/components/schemas/CardLimitBusinessError'
      description: >-
        Discriminated 400 body for card limit routes. The `kind` field is
        additive

        and not a breaking change. Clients can keep reading `success` and
        `error`.
    Error:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: string
    SetCardLimitBadGateway:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: string
    CardLimitSummary:
      type: object
      required:
        - amount
        - currency
        - decimals
        - syncStatus
        - updatedAt
      properties:
        amount:
          type: integer
          format: int64
          description: >-
            Daily limit in the currency's smallest unit (e.g. cents for USD).
            Divide by

            10^decimals to get the major-unit value. For USD (decimals=2):
            amount=1000

            means $10.00, amount=1000000 means $10,000.00.
        currency:
          type: string
          description: ISO-4217 currency code, e.g. USD.
        decimals:
          type: integer
          format: int32
          description: Number of decimal places for this currency (e.g. 2 for USD).
        syncStatus:
          allOf:
            - $ref: '#/components/schemas/CardLimitSyncStatus'
          description: >-
            Replication state of the limit. 'pending' immediately after an
            update,

            'synced' once the change has been applied downstream, 'failed' if
            the change

            could not be applied after retries.
        updatedAt:
          type: string
          format: date-time
          description: Last time this limit was modified.
    CardLimitValidationError:
      type: object
      required:
        - kind
        - success
        - error
      properties:
        kind:
          type: string
          enum:
            - validation
        success:
          type: boolean
          enum:
            - false
        error:
          $ref: '#/components/schemas/ValidationErrorDetail'
    CardLimitBusinessError:
      type: object
      required:
        - kind
        - success
        - error
      properties:
        kind:
          type: string
          enum:
            - business
        success:
          type: boolean
          enum:
            - false
        error:
          type: string
    CardLimitSyncStatus:
      type: string
      enum:
        - pending
        - synced
        - failed
    ValidationErrorDetail:
      type: object
      required:
        - name
        - message
      properties:
        name:
          type: string
          enum:
            - ValidationError
        message:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: Bearer

````