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

# Update Card

> Update details for a specific card.



## OpenAPI

````yaml openapi.json put /cards/{id}
openapi: 3.1.0
info:
  title: Sudo Sandbox API
  version: '1.0'
servers:
  - url: https://api.sandbox.sudo.cards
security:
  - sec0: []
paths:
  /cards/{id}:
    put:
      summary: Update Card
      description: Update details for a specific card.
      operationId: update-card
      parameters:
        - name: id
          in: path
          description: The `_id` of the card to update.
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - status
              properties:
                fundingSourceId:
                  type: string
                  description: >-
                    The funding source `_id`. Required if you wish to map card
                    to an existing funding source.
                status:
                  type: string
                  description: The card status.
                  default: active
                  enum:
                    - active
                    - inactive
                    - canceled
                metadata:
                  type: string
                  description: >-
                    The metadata object to attach to the card. Stored in
                    key-value pair
                  format: json
                spendingControls:
                  type: object
                  description: >-
                    Card spending controls.  Default usage limits will be
                    applied if non is provided.
                  properties:
                    allowedCategories:
                      type: array
                      description: Array of allowed categories (MCC).
                      default: []
                      items:
                        type: string
                    blockedCategories:
                      type: array
                      description: Array of blocked categories (MCC).
                      default: []
                      items:
                        type: string
                    channels:
                      type: object
                      description: Channels allowed to use card on
                      properties:
                        atm:
                          type: boolean
                          description: >-
                            Set to `true` to allow atm transactions. Otherwise,
                            set to `false`.
                          default: true
                        pos:
                          type: boolean
                          description: >-
                            Set to `true` to allow pos transactions. Otherwise,
                            set to `false`.
                          default: true
                        web:
                          type: boolean
                          description: >-
                            Set to `true` to allow web transactions. Otherwise,
                            set to `false`.
                          default: true
                        mobile:
                          type: boolean
                          description: Set to `true` to allow mobile transactions.
                          default: true
                    spendingLimits:
                      type: array
                      description: Array of spending limit objects.
                      items:
                        properties:
                          amount:
                            type: integer
                            description: The amount to set as limit.
                            format: int32
                          interval:
                            type: string
                            description: The limit interval.
                            default: daily
                            enum:
                              - daily
                              - weekly
                              - monthly
                              - yearly
                        required:
                          - amount
                          - interval
                        type: object
                cancellationReason:
                  type: string
                  description: Required if status is set to `canceled`
                  enum:
                    - lost
                    - stolen
                creditAccountId:
                  type: string
                  description: >-
                    The credit account `_id`. Required for `canceled` status
                    only.
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: bearer
      x-default: '{{APIKey}}'

````