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

# Cancel a card

> Cancel a card. Access is subject to the permissions, authentication, and branch requirements documented for this operation.



## OpenAPI

````yaml /openapi/tenant-staff-v1.openapi.yaml post /cards/{cardId}/cancel
openapi: 3.1.0
info:
  title: Anbyan Staff Session API
  version: 1.0.0
  description: >
    Human staff API authenticated with short-lived staff sessions. Login uses
    email and password, followed by MFA when required.
servers:
  - url: https://{tenantDomain}/api/v1/staff
    description: Staff session API on a tenant domain
    variables:
      tenantDomain:
        default: tenant.example.com
security:
  - bearerAuth: []
tags:
  - name: Auth
  - name: Ledger
  - name: Deposits
  - name: Withdrawals
  - name: Transfers
  - name: Vaults
  - name: Direct Deposits
  - name: Bank Migrations
  - name: Accounts
  - name: Account Products
  - name: Clients
  - name: Client Compliance
  - name: Product Applications
  - name: Card Programs
  - name: Card Design Sets
  - name: Cards
  - name: Dashboard
  - name: Simulator
  - name: Compliance Program
  - name: Staff
  - name: Incidents
  - name: Branches
  - name: Jurisdictions
  - name: Locations
  - name: Notifications
  - name: Settings
  - name: FX
  - name: Passbooks
  - name: Access Control
  - name: Users
  - name: Activity Logs
paths:
  /cards/{cardId}/cancel:
    post:
      tags:
        - Cards
      summary: Cancel a card
      description: >-
        Cancel a card. Access is subject to the permissions, authentication, and
        branch requirements documented for this operation.
      operationId: cancelCard
      parameters:
        - $ref: '#/components/parameters/CardId'
      requestBody:
        $ref: '#/components/requestBodies/UpdateCardStatusRequest'
      responses:
        '200':
          $ref: '#/components/responses/CardData'
components:
  parameters:
    CardId:
      name: cardId
      in: path
      required: true
      schema:
        type: string
  requestBodies:
    UpdateCardStatusRequest:
      required: false
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateCardStatusRequest'
  responses:
    CardData:
      description: Card response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CardData'
  schemas:
    UpdateCardStatusRequest:
      type: object
      properties:
        reason:
          type: string
        reasonCode:
          type: string
        preservePan:
          type: boolean
    CardData:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Card'
    Card:
      type: object
      additionalProperties: true
      properties:
        id:
          type: string
        accountId:
          type: string
        accountParticipantId:
          type:
            - string
            - 'null'
        cardProgramId:
          type:
            - string
            - 'null'
        issuer:
          type: string
        cardType:
          type: string
          enum:
            - debit
            - credit
            - prepaid
        productType:
          type:
            - string
            - 'null'
        formFactor:
          type:
            - string
            - 'null'
        network:
          type:
            - string
            - 'null'
        last4:
          type: string
        expiryMonth:
          type:
            - integer
            - 'null'
        expiryYear:
          type:
            - integer
            - 'null'
        cardholderName:
          type:
            - string
            - 'null'
        status:
          type: string
          enum:
            - active
            - inactive
            - locked
            - blocked
            - cancelled
            - expired
        issuedAt:
          type:
            - string
            - 'null'
          format: date-time
        activatedAt:
          type:
            - string
            - 'null'
          format: date-time
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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