---
title: "Migrate card mode [beta]"
method: PATCH
path: "/wallet/v2/cards/{cardId}/mode/{modeId}/program-migration"
tags: ["Migration"]
---

# Migrate card mode \[beta\]

`PATCH /wallet/v2/cards/{cardId}/mode/{modeId}/program-migration`

## Request

- Base URL: `https://sandbox.pismolabs.io`
- URL: `https://sandbox.pismolabs.io/wallet/v2/cards/{cardId}/mode/{modeId}/program-migration`
- Auth: HTTP bearer

Migrate a [card's mode](doc:cards-overview-1#create-a-combination-card-with-card-modes) to a different program.

Migrate a card's secondary mode (debit or credit) to a new program. If a combination card is initially created with a credit account (has a `CREDIT` mode), it gets migrated when the [Migrate card to different program](ref:patch-migrate-card) endpoint is called. However, if you wish to migrate the debit (secondary) mode, you need to call this endpoint. 

This endpoint generates a [Card migrated](https://developers.pismo.io/events/docs/cards-migration-1) event. 

**Note:** This endpoint **REQUIRES** an account token&mdash;an access token encoded with a Pismo account ID.

## Path parameters

- `cardId` string, required
- `modeId` string, required

## Request body

- MigrateCardToProgramRequest: Migrate card to different program object
  - `new_program_id` integer, required: Pismo program ID

## Response `202`

Success

## Other responses

- `400`: Bad Request, missing customer ID or program ID
- `401`: Access token is missing or invalid
- `403`: You don't have permission to access this resource
- `404`: The specified resource was not found
- `406`: Not accepetable
- `500`: Internal server error

---

[API](https://skmtc.dev/pismo/apis/card-issuing-cards.md) - [All operations](https://skmtc.dev/pismo/apis/card-issuing-cards/llms.txt) - [OpenAPI document](https://skmtc.dev/pismo/apis/card-issuing-cards/revisions/05611ac051b0?raw)
