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

# Update Card on Exception File

> Updates an existing card record on the exception file

Use this endpoint to change the action code or purge date of a card that is already on the exception file.
To add a card that isn't on the exception file yet, send a `POST` request.

The Marqeta platform processes this request asynchronously.
Subscribe to the `pan.exception_file.updated` webhook event to confirm when the card network completes the action.


## OpenAPI

````yaml PUT /exception-file/{cardToken}
openapi: 3.0.3
info:
  title: Exception File Management
  description: >-
    Marqeta's Exception File Management service enables you to manage cards on
    the exception file.
  version: 0.0.1
  x-docs-collection: Core API
  contact:
    name: Marqeta
    url: https://www.marqeta.com
servers:
  - url: https://sandbox-api.marqeta.com/v3
security: []
tags:
  - name: Exception File
    description: >-
      Marqeta's Exception File Management service enables you to manage card
      entries on the exception file.
paths:
  /exception-file/{cardToken}:
    put:
      tags:
        - Exception File
      summary: Updates a card on the exception file
      description: Updates an existing card record on the exception file.
      operationId: updateCardOnExceptionFile
      parameters:
        - name: cardToken
          in: path
          required: true
          schema:
            type: string
            x-allowableValues: Valid card token
          description: Card token to be updated on the exception file.
        - $ref: '#/components/parameters/programHeaderParam'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExceptionFileMgmtRequest'
            example:
              action_date: '2027-01-01'
              action_code: EXPC
        required: true
      responses:
        '202':
          description: >-
            Request accepted for processing. The card is updated on the
            exception file asynchronously.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionFileMgmtResponse'
              example:
                message: Request accepted for processing
        '400':
          description: Program is not onboarded for the exception file Management feature
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionFileMgmtResponse'
              example:
                message: >-
                  Program is not onboarded for the Exception File Management
                  feature
        '404':
          description: Card token is not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionFileMgmtResponse'
              example:
                message: Card token is not found
        '422':
          description: No exception file entry exists for the specified card token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionFileMgmtResponse'
              example:
                message: >-
                  No exception file entry exists for the specified card token.
                  Use POST to create a new entry.
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionFileMgmtResponse'
              example:
                message: Unable to process the request. Please retry later
      security:
        - zionToken: []
        - oauth2:
            - exception-file-mgmt-service:write
components:
  parameters:
    programHeaderParam:
      name: X-Marqeta-Program-Short-Code
      description: Program short code of the program managing the card.
      in: header
      example: sqc9
      required: true
      schema:
        type: string
        x-allowableValues: Valid program short code
  schemas:
    ExceptionFileMgmtRequest:
      required:
        - action_code
      type: object
      description: Request to add or update a card on the exception file.
      properties:
        action_date:
          type: string
          format: date
          pattern: ^\d{4}-\d{2}-\d{2}$
          description: >-
            Purge date of the record in exception file, in YYYY-MM-DD format.
            Evaluated in UTC. Must be between 30 days and 24 months from the
            current date. Defaults to 90 days from the current date if not
            provided.
        action_code:
          type: string
          description: >
            Code representing the action to be taken on the card.

            - `CLOS` - Card terminated / closed account

            - `LCPU` - Lost card

            - `SCPU` - Stolen card

            - `INVA` - Invalid / not found account

            - `PUWF` - Fraud pickup (non-specific)

            - `PUNF` - Pickup (no fraud)

            - `EXPC` - Expired card (authorization only; declines with response
            code 54)

            - `DNTH` - General block (authorization only; declines with response
            code 05)
          enum:
            - CLOS
            - LCPU
            - SCPU
            - INVA
            - PUWF
            - PUNF
            - EXPC
            - DNTH
    ExceptionFileMgmtResponse:
      type: object
      properties:
        message:
          type: string
          description: Human-readable message describing the result of the request.
  securitySchemes:
    zionToken:
      type: http
      scheme: basic
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://internal-auth.mq01-dev.marqeta.io/oauth/token
          scopes:
            exception-file-mgmt-service:read: Read exception file records
            exception-file-mgmt-service:write: Create, update, or delete exception file records

````

## Related topics

- [Exception File Management](/docs/core-api/exception-file-management.md)
- [Retrieve Card from Exception File](/docs/core-api/exception-file-retrieve.md)
- [Add Card to Exception File](/docs/core-api/exception-file-add.md)
- [Remove Card from Exception File](/docs/core-api/exception-file-remove.md)
- [Event Types](/docs/core-api/event-types.md)
