Modulr Cards API

Cards API

Operations 51

PUT /cards/{cardId}/authentication Update card authentication #
GET /partners/{partnerId}/card-report-types/{reportType}/notifications Retrieve card report type notification configuration for partner #
POST /partners/{partnerId}/card-report-types/{reportType}/notifications Update report type notification configuration for partner #
DELETE /partners/{partnerId}/card-report-types/{reportType}/notifications Delete card report notification configuration for partner and report type #
POST /partners/{partnerId}/card-report-types/{reportType}/notifications/status Toggle card report notification for partner and report type #
POST /partner/{partnerId}/bulk-card-custom-fields Bulk create partner custom field keys #
GET /customers/{customerId}/card-report-types/{reportType}/notifications Retrieve card report type notification configuration for customer #
POST /customers/{customerId}/card-report-types/{reportType}/notifications Update report type notification configuration for customer #
DELETE /customers/{customerId}/card-report-types/{reportType}/notifications Delete card report notification configuration for customer and report type #
POST /customers/{customerId}/card-report-types/{reportType}/notifications/status Toggled notifications for customer and card report type #
POST /customer/{customerId}/bulk-card-custom-fields Bulk create customer custom field keys #
GET /cards/{cardId} View the details of an existing card #
POST /cards/{cardId} Update a card #
PATCH /cards/{cardId} Update card #
POST /cards/{cardId}/unsuspend [Restricted] Unsuspend a card #
POST /cards/{cardId}/unblock Unblock an existing card #
POST /cards/{cardId}/suspend [Restricted] Suspend an existing card #
POST /cards/{cardId}/secure-details-token Create secure card details token #
POST /cards/{cardId}/replace Replace a card #
GET /cards/{cardId}/pin Retrieve PIN #
POST /cards/{cardId}/pin Reset card PIN #
POST /cards/{cardId}/pin/unblock Unblock PIN #
POST /cards/{cardId}/in-app-provisioning/apple Get in-app provisioning data for Apple Pay #
POST /cards/{cardId}/custom-fields Update a card's custom fields #
POST /cards/{cardId}/cancel Cancel an existing card #
POST /cards/{cardId}/block Block an existing card #
POST /cards/{cardId}/activate Activate a physical card #
POST /cards/secure-pin-reset Reset card PIN #
POST /cards/enquiry Card enquiry #
POST /card-tokens/{tokenId}/unsuspend Unsuspend card token #
POST /card-tokens/{tokenId}/suspend Suspend card token #
POST /card-tokens/{tokenId}/deactivate Deactivate card token #
POST /authorisations/{authId}/expire [Restricted] Expire an existing authorisation #
POST /accounts/{accountId}/physical-cards Create a new physical card #
GET /accounts/{accountId}/cards View the details of existing cards by account #
POST /accounts/{accountId}/cards Create a new virtual card #
GET /partner/{partnerId}/card-custom-fields View existing partner card custom field keys #
GET /customer/{customerId}/card-custom-fields View existing customer card custom field keys #
GET /cards View the details of existing cards #
GET /cards/{cardId}/tokens Get card tokens #
GET /cards/secure-details Retrieve secure card details (PAN + CVV + PIN) #
GET /card-tokens/{tokenId}/otp Get card token OTP details #
GET /card-tasks Get tasks #
GET /card-reports Retrieve card reports #
GET /card-reports/{reportId}/report Download a specific card report #
GET /card-reports/{reportId}/download Download a specific card report #
GET /activities View activities for specific cards or over a date range #
GET /accounts/{accountId}/physical-card-request-tasks Get physical card create tasks by account #
DELETE /partner/{partnerId}/card-custom-fields/{key} Delete partner custom field key #
DELETE /customer/{customerId}/card-custom-fields/{key} Delete customer custom field key #
DELETE /cards/{cardId}/custom-fields/{key} Delete card custom field #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/modulr-cards-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

modulr-cards-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Modulr Cards API
  description: Modulr API
  license:
    name: © Modulr Finance
    url: https://www.modulrfinance.com
  version: '1.0'
servers:
- url: https://api-sandbox.modulrfinance.com/api-sandbox-token
security:
- modulo_security: []
tags:
- name: Cards
  description: Cards API
paths:
  /cards/{cardId}/authentication:
    put:
      tags:
      - Cards
      summary: Update card authentication
      description: Support knowledge based authentication (KBA)
      operationId: updateCardAuthentication
      parameters:
      - name: cardId
        in: path
        description: The ID of the card which has authentication information to be updated
        required: true
        style: simple
        explode: false
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/card.UpdateCardAuthenticationRequest'
        required: true
      responses:
        '204':
          description: Card authentication updated
        '400':
          description: Invalid request
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/card.MessageResponse'
      security:
      - HMAC: []
      - TOKEN: []
  /partners/{partnerId}/card-report-types/{reportType}/notifications:
    get:
      tags:
      - Cards
      summary: Retrieve card report type notification configuration for partner
      operationId: getNotificationConfigurationsForAGivenPartnerAndReportType
      parameters:
      - name: partnerId
        in: path
        description: Id of partner to retrieve report type notification configuration for
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: reportType
        in: path
        description: Type of report partner wants to retrieve notification configuration for
        required: true
        style: simple
        explode: false
        schema:
          type: string
          enum:
          - DAILY_CARD_ACTIVITY
          - MONTHLY_CARD_ACTIVITY
          - DAILY_ACCOUNT_FUNDING
          - MONTHLY_ACCOUNT_FUNDING
          - DAILY_AUTH_WINDOW
      - name: page
        in: query
        description: Page to fetch (0 indexed)
        required: false
        style: form
        explode: true
        schema:
          type: integer
          format: int32
          default: 0
      - name: size
        in: query
        description: Size of page to fetch
        required: false
        style: form
        explode: true
        schema:
          type: integer
          format: int32
          default: 20
          maximum: 500
      responses:
        '200':
          description: Retrieved report type notification configuration for partner
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/card.ReportTypeNotificationPageResponse'
        '400':
          description: Invalid request
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/card.MessageResponse'
        '403':
          description: Partner can not access this data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/card.ReportTypeNotificationPageResponse'
      security:
      - HMAC: []
      - TOKEN: []
    post:
      tags:
      - Cards
      summary: Update report type notification configuration for partner
      operationId: updateNotificationConfigurationsForAGivenPartnerAndReportType
      parameters:
      - name: partnerId
        in: path
        description: Id of partner to set up notification for
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: reportType
        in: path
        description: Type of report partner wants notification sent for
        required: true
        style: simple
        explode: false
        schema:
          type: string
          enum:
          - DAILY_CARD_ACTIVITY
          - MONTHLY_CARD_ACTIVITY
          - DAILY_ACCOUNT_FUNDING
          - MONTHLY_ACCOUNT_FUNDING
          - DAILY_AUTH_WINDOW
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/card.NotificationRequest'
        required: true
      responses:
        '201':
          description: Updated report type notification configuration for partner
        '400':
          description: Invalid request
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/card.MessageResponse'
        '403':
          description: Partner can not update this data
      security:
      - HMAC: []
      - TOKEN: []
    delete:
      tags:
      - Cards
      summary: Delete card report notification configuration for partner and report type
      operationId: deleteAllNotificationConfigurationsForAGivenPartnerAndReportType
      parameters:
      - name: partnerId
        in: path
        description: Id of partner to remove notification for
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: reportType
        in: path
        description: Type of report partner is unsubscribing notification for
        required: true
        style: simple
        explode: false
        schema:
          type: string
          enum:
          - DAILY_CARD_ACTIVITY
          - MONTHLY_CARD_ACTIVITY
          - DAILY_ACCOUNT_FUNDING
          - MONTHLY_ACCOUNT_FUNDING
          - DAILY_AUTH_WINDOW
      responses:
        '204':
          description: Deleted report type notification configuration for partner
        '400':
          description: Invalid request
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/card.MessageResponse'
        '403':
          description: Partner can not update this data
      security:
      - HMAC: []
      - TOKEN: []
  /partners/{partnerId}/card-report-types/{reportType}/notifications/status:
    post:
      tags:
      - Cards
      summary: Toggle card report notification for partner and report type
      operationId: toggleNotificationsForAGivenPartnerAndReportType
      parameters:
      - name: partnerId
        in: path
        description: Id of partner to toggle notification for
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: reportType
        in: path
        description: Type of report partner wants notification toggled for
        required: true
        style: simple
        explode: false
        schema:
          type: string
          enum:
          - DAILY_CARD_ACTIVITY
          - MONTHLY_CARD_ACTIVITY
          - DAILY_ACCOUNT_FUNDING
          - MONTHLY_ACCOUNT_FUNDING
          - DAILY_AUTH_WINDOW
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/card.UpdateCardReportNotificationRequest'
        required: true
      responses:
        '204':
          description: Toggled notifications for partner and report type
        '400':
          description: Invalid request
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/card.MessageResponse'
        '403':
          description: Partner can not edit this data
      security:
      - HMAC: []
      - TOKEN: []
  /partner/{partnerId}/bulk-card-custom-fields:
    post:
      tags:
      - Cards
      summary: Bulk create partner custom field keys
      description: Bulk create partner custom field keys
      operationId: bulkCreatePartnerCustomFieldKeys
      parameters:
      - name: partnerId
        in: path
        description: Id of partner to create custom fields for
        required: true
        style: simple
        explode: false
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/card.BulkCreateCustomFieldKeysRequest'
        required: true
      responses:
        '201':
          description: Custom field keys created successfully
        '400':
          description: Invalid request
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/card.MessageResponse'
      security:
      - HMAC: []
      - TOKEN: []
  /customers/{customerId}/card-report-types/{reportType}/notifications:
    get:
      tags:
      - Cards
      summary: Retrieve card report type notification configuration for customer
      operationId: getNotificationConfigurationsForAGivenCustomerAndReportType
      parameters:
      - name: customerId
        in: path
        description: Id of customer to retrieve report type notification configuration for
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: reportType
        in: path
        description: Type of report customer wants to retrieve notification configuration for
        required: true
        style: simple
        explode: false
        schema:
          type: string
          enum:
          - DAILY_CARD_ACTIVITY
          - MONTHLY_CARD_ACTIVITY
          - DAILY_ACCOUNT_FUNDING
          - MONTHLY_ACCOUNT_FUNDING
          - DAILY_AUTH_WINDOW
      - name: page
        in: query
        description: Page to fetch (0 indexed)
        required: false
        style: form
        explode: true
        schema:
          type: integer
          format: int32
          default: 0
      - name: size
        in: query
        description: Size of page to fetch
        required: false
        style: form
        explode: true
        schema:
          type: integer
          format: int32
          default: 20
          maximum: 500
      responses:
        '200':
          description: Retrieved report type notification configuration for customer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/card.ReportTypeNotificationPageResponse'
        '400':
          description: Invalid request
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/card.MessageResponse'
        '403':
          description: Customer can not access this data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/card.ReportTypeNotificationPageResponse'
      security:
      - HMAC: []
      - TOKEN: []
    post:
      tags:
      - Cards
      summary: Update report type notification configuration for customer
      operationId: updateNotificationConfigurationsForAGivenCustomerAndReportType
      parameters:
      - name: customerId
        in: path
        description: Id of customer to set up notification for
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: reportType
        in: path
        description: Type of report customer wants notification sent for
        required: true
        style: simple
        explode: false
        schema:
          type: string
          enum:
          - DAILY_CARD_ACTIVITY
          - MONTHLY_CARD_ACTIVITY
          - DAILY_ACCOUNT_FUNDING
          - MONTHLY_ACCOUNT_FUNDING
          - DAILY_AUTH_WINDOW
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/card.NotificationRequest'
        required: true
      responses:
        '201':
          description: Created report type notification configuration for customer
        '400':
          description: Invalid request
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/card.MessageResponse'
        '403':
          description: Customer can not create this data
      security:
      - HMAC: []
      - TOKEN: []
    delete:
      tags:
      - Cards
      summary: Delete card report notification configuration for customer and report type
      operationId: deleteAllNotificationConfigurationsForAGivenCustomerAndReportType
      parameters:
      - name: customerId
        in: path
        description: Id of customer to remove notification for
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: reportType
        in: path
        description: Type of report customer is unsubscribing notification for
        required: true
        style: simple
        explode: false
        schema:
          type: string
          enum:
          - DAILY_CARD_ACTIVITY
          - MONTHLY_CARD_ACTIVITY
          - DAILY_ACCOUNT_FUNDING
          - MONTHLY_ACCOUNT_FUNDING
          - DAILY_AUTH_WINDOW
      responses:
        '204':
          description: Deleted report type notification configuration for customer
        '400':
          description: Invalid request
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/card.MessageResponse'
        '403':
          description: Customer can not update this data
      security:
      - HMAC: []
      - TOKEN: []
  /customers/{customerId}/card-report-types/{reportType}/notifications/status:
    post:
      tags:
      - Cards
      summary: Toggled notifications for customer and card report type
      operationId: toggleNotificationsForAGivenCustomerAndReportType
      parameters:
      - name: customerId
        in: path
        description: Id of customer to toggle notification for
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: reportType
        in: path
        description: Type of report customer wants notification toggled for
        required: true
        style: simple
        explode: false
        schema:
          type: string
          enum:
          - DAILY_CARD_ACTIVITY
          - MONTHLY_CARD_ACTIVITY
          - DAILY_ACCOUNT_FUNDING
          - MONTHLY_ACCOUNT_FUNDING
          - DAILY_AUTH_WINDOW
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/card.UpdateCardReportNotificationRequest'
        required: true
      responses:
        '204':
          description: Toggled notifications for customer and report type
        '400':
          description: Invalid request
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/card.MessageResponse'
        '403':
          description: Customer can not edit this data
      security:
      - HMAC: []
      - TOKEN: []
  /customer/{customerId}/bulk-card-custom-fields:
    post:
      tags:
      - Cards
      summary: Bulk create customer custom field keys
      description: Bulk create customer custom field keys
      operationId: bulkCreateCustomerCustomFieldKeys
      parameters:
      - name: customerId
        in: path
        description: Id of customer to create custom fields for
        required: true
        style: simple
        explode: false
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/card.BulkCreateCustomFieldKeysRequest'
        required: true
      responses:
        '201':
          description: Custom field keys created successfully
        '400':
          description: Invalid request
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/card.MessageResponse'
      security:
      - HMAC: []
      - TOKEN: []
  /cards/{cardId}:
    get:
      tags:
      - Cards
      summary: View the details of an existing card
      operationId: getCard
      parameters:
      - name: cardId
        in: path
        description: The ID of the card to view
        required: true
        style: simple
        explode: false
        schema:
          type: string
      responses:
        '200':
          description: Card returned successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/card.CardResponse'
        '400':
          description: Invalid request
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/card.MessageResponse'
      security:
      - HMAC: []
      - TOKEN: []
    post:
      tags:
      - Cards
      summary: Update a card
      description: Update card and cardholder details
      operationId: update
      parameters:
      - name: cardId
        in: path
        description: The ID of the card to be updated
        required: true
        style: simple
        explode: false
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/card.UpdateCardRequest'
        required: true
      responses:
        '204':
          description: Card updated successfully
        '400':
          description: Invalid request
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/card.MessageResponse'
      security:
      - HMAC: []
      - TOKEN: []
    patch:
      tags:
      - Cards
      summary: Update card
      description: Update card - for now, the removal of cancellationDate, authWindowStartDate and authWindowEndDate fields and the update of frequencyUsage field are the only allowed actions
      operationId: updateCard
      parameters:
      - name: cardId
        in: path
        required: true
        style: simple
        explode: false
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                oneOf:
                - $ref: '#/components/schemas/card.Add'
                - $ref: '#/components/schemas/card.Copy'
                - $ref: '#/components/schemas/card.Move'
                - $ref: '#/components/schemas/card.Remove'
                - $ref: '#/components/schemas/card.Replace'
                - $ref: '#/components/schemas/card.Test'
        required: true
      responses:
        '204':
          description: Card updated successfully
        '400':
          description: Invalid request
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/card.MessageResponse'
        '403':
          description: Forbidden. Token may be missing or invalid
      security:
      - HMAC: []
      - TOKEN: []
  /cards/{cardId}/unsuspend:
    post:
      tags:
      - Cards
      summary: '[Restricted] Unsuspend a card'
      description: 'Restores a previously suspended card to the status it was in prior to being suspended as applied by the issuer or program manager.

        Use of this endpoint is `Restricted`, depending on access being granted through contractual setup with Modulr.'
      operationId: unsuspendCard
      parameters:
      - name: cardId
        in: path
        description: The ID of the card which should no longer be suspended
        required: true
        style: simple
        explode: false
        schema:
          type: string
      responses:
        '204':
          description: Card unsuspended successfully
        '400':
          description: Invalid request
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/card.MessageResponse'
      security:
      - HMAC: []
      - TOKEN: []
  /cards/{cardId}/unblock:
    post:
      tags:
      - Cards
      summary: Unblock an existing card
      description: Unblocking a card re-enables normal authorisation processing.
      operationId: unblockCard
      parameters:
      - name: cardId
        in: path
        description: The ID of the card which should be unblocked
        required: true
        style: simple
        explode: false
        schema:
          type: string
      responses:
        '200':
          description: Card unblocked successfully
        '400':
          description: Invalid request
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/card.MessageResponse'
      security:
      - HMAC: []
      - TOKEN: []
  /cards/{cardId}/suspend:
    post:
      tags:
      - Cards
      summary: '[Restricted] Suspend an existing card'
      description: 'Suspends a card to temporarily prevent any new authorisations as applied by the issuer or the program manager (i.e. not cardholder elective). This means that all new authorisations will be immediately declined. Outstanding authorisations are unaffected and settlement, chargebacks, refunds, etc will continue to function as normal.

        Use of this endpoint is `Restricted`, depending on access being granted through contractual setup with Modulr.'
      operationId: suspendCard
      parameters:
      - name: cardId
        in: path
        description: The ID of the card which should be suspended
        required: true
        style: simple
        explode: false
        schema:
          type: string
      responses:
        '204':
          description: Card suspended successfully
        '400':
          description: Invalid request
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/card.MessageResponse'
      security:
      - HMAC: []
      - TOKEN: []
  /cards/{cardId}/secure-details-token:
    post:
      tags:
      - Cards
      summary: Create secure card details token
      description: Create a token that is used as a parameter to retrieve secure card details (PAN, CVV, and PIN) or to perform PIN alterations. This token is to be retrieved by the partner and pushed to the cardholder device where the call is made. The token will be valid for 60 seconds.
      operationId: generateCardHolderToken
      parameters:
      - name: X-MOD-CARD-MGMT-TOKEN
        in: header
        description: Card Management Token required when the token will be used to alter card details
        required: false
        style: simple
        explode: false
        schema:
          type: string
      - name: cardId
        in: path
        description: The ID of the card to generate the token
        required: true
        style: simple
        explode: false
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/card.OneTimeTokenRequest'
      responses:
        '200':
          description: Card token generated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/card.OneTimeTokenResponse'
        '400':
          description: Invalid request
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/card.MessageResponse'
      security:
      - HMAC: []
      - TOKEN: []
  /cards/{cardId}/replace:
    post:
      tags:
      - Cards
      summary: Replace a card
      description: Replace a card, with a reason STOLEN, DAMAGED, LOST, RENEW.
      operationId: replaceCard
      parameters:
      - name: cardId
        in: path
        description: The ID of the card
        required: true
        style: simple
        explode: false
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/card.CardReplacementRequest'
        required: true
      responses:
        '201':
          description: Card replaced successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/card.CardReplacementResponse'
        '400':
          description: Invalid request
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/card.MessageResponse'
      security:
      - HMAC: []
      - TOKEN: []
  /cards/{cardId}/pin:
    get:
      tags:
      - Cards
      summary: Retrieve PIN
      description: Retrieves the PIN for a card, as a reminder for the cardholder
      operationId: retrievePIN
      parameters:
      - name: X-MOD-CARD-MGMT-TOKEN
        in: header
        description: Card Management Token required for API users for additional security when managing sensitive card data
        required: false
        style: simple
        explode: false
        schema:
          type: string
      - name: cardId
        in: path
        description: The ID of the card to retrieve the PIN for
        required: true
        style: simple
        explode: false
        schema:
          type: string
      responses:
        '200':
          description: PIN retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/card.CardPinResponse'
        '400':
          description: Invalid request
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/card.MessageResponse'
        '403':
          description: Forbidden. `Card Management Token` may be missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/card.CardPinResponse'
      security:
      - HMAC: []
      - TOKEN: []
    post:
      tags:
      - Cards
      summary: Reset card PIN
      description: Reset the card's PIN for a specific card
      operationId: resetPin
      parameters:
      - name: X-MOD-CARD-MGMT-TOKEN
        in: header
        description: Card Management Token required for API users for additional security when managing sensitive card data
        required: false
        style: simple
        explode: false
        schema:
          type: string
      - name: cardId
        in: path
        description: The ID of the card to reset the PIN for
        required: true
        style: simple
        explode: false
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/card.ResetCardPinRequest'
        required: true
      responses:
        '204':
          description: PIN changed successfully
        '400':
          description: Invalid request
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/card.MessageResponse'
        '403':
          description: Forbidden. `Card Management Token` may be missing or invalid
      security:
      - HMAC: []
      - TOKEN: []
  /cards/{cardId}/pin/unblock:
    post:
      tags:
      - Cards
      summary: Unblock PIN
      description: Unblock the card's PIN so that it can be used by the cardholder. CVC2 will also be unblocked, where required.
      operationId: unblockPin
      parameters:
      - name: cardId
        in: path
        description: The ID of the card to unblock the PIN (and/or CVC2) against
        required: true
        style: simple
        explode: false
        schema:
          type: string
      responses:
        '204':
          description: Unblocked successfully
        '400':
          description: Invalid request
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/card.MessageResponse'
      security:
      - HMAC: []
      - TOKEN: []
  /cards/{cardId}/in-app-provisioning/apple:
    post:
      tags:
      - Cards
      summary: Get in-app provisioning data for Apple Pay
      description: Retrieves and encrypts the data needed for the client application to provision a card to Apple Pay
      operationId: getInAppProvisioningForApple
      parameters:
      - name: cardId
        in: path
        description: Card ID
        required: true
        style: simple
        explode: false
        schema:
          type: string
        example: V110000001
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/card.AppleInAppProvisioningRequest'
        required: true
      responses:
        '200':
          description: In app provisioning data for Apple Pay retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/card.AppleInAppProvisioningResponse'
        '400':
          description: Invalid request
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/card.MessageResponse'
      security:
      - HMAC: []
      - TOKEN: []
  /cards/{cardId}/custom-fields:
    post:
      tags:
      - Cards
      summary: Update a card's custom fields
      description: Replace the values of a card's custom fields if they exist or create new custom fields with the given values if they do not exist
      operationId: updateCardCustomFields
      parameters:
      - name: cardId
        in: path
        description: Id of the card for which the custom fields should be updated
        required: true
        style: simple
        explode: false
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/card.UpdateCardCustomFieldsRequest'
        required: true
      responses:
        '204':
          description: Custom fields updated successfully
        '400':
          description: Invalid request
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/card.MessageResponse'
      security:
      - HMAC: []
      - TOKEN: []
  /cards/{cardId}/cancel:
    post:
      tags:
      - Cards
      summary: Cancel an existing card
      description: Cancelling a card _**permanently**_ disables authorisation processing & _**destroys**_ the card from the card scheme perspective. This means that all _new_ authorisations will be immediately declined and this cannot be reversed. Outstanding authorisations are unaffected and settlement, chargebacks, refunds, etc will continue to function as normal.
      operationId: cancelCard
      parameters:
      - name: cardId
        in: path
        description: The ID of the card which should be cancelled
        required: true
        style: simple
        explode: false
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/card.CancelCardRequest'
      responses:
        '200':
          description: Card cancelled successfully
        '400':
          description: Invalid request
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/card.MessageResponse'
      security:
      - HMAC: []
      - TOKEN: []
  /cards/{cardId}/block:
    post:
      tags:
      - Cards
      sum

# --- truncated at 32 KB (124 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/modulr/refs/heads/main/openapi/modulr-cards-api-openapi.yml