Delete A Card From An External Account

If a card has erroneous details or is expired, you can delete the card and add a new one to an External Account. Because the API call does not contain card details, you will not be using the vault.moderntreasury.com subdomain.

Retrieve your External Account ID and Card ID:

There are two ways to retrieve the External Account ID of an existing External Account:

  1. Retrieve a single External Account ID and Card ID from the Dashboard, by navigating to the External Accounts page.
  2. List all External Accounts via the API to find the External Account ID and Card ID you are looking for:
curl --request GET \
  -u ORGANIZATION_ID:API_KEY \
  --url https://app.moderntreasury.com/api/external_accounts
{
    "id": "a3f2c891-6d4b-4e7a-9c15-8b3f2e6a91d4",
    "object": "external_account",
    "live_mode": true,
    "account_type": "other",
    "party_name": "John Smith",
    "party_type": "individual",
    "party_address": null,
    "account_details": [],
    "routing_details": [],
    "name": null,
    "metadata": {},
    "verification_status": "unverified",
    "verification_source": null,
    "external_id": null,
    "contact_details": [
        {
            "id": "6c2f8b41-9d3e-47a5-b81c-e5a942f7d360",
            "object": "contact_detail",
            "live_mode": true,
            "contact_identifier": "[email protected]",
            "contact_identifier_type": "email",
            "discarded_at": null,
            "created_at": "2026-08-17T17:06:17Z",
            "updated_at": "2026-08-17T17:06:17Z"
        }
    ],
    "ledger_account_id": null,
    "counterparty_id": "f47a9c31-8e5d-4b62-a19f-3d76c8e42f0a",
    "discarded_at": null,
    "created_at": "2026-08-17T17:06:17Z",
    "updated_at": "2026-08-17T17:06:17Z",
    "card_id": "5e93c274-8a1b-7d42-b3f6-91c4e7a58d2f"
    }

Delete Card:

curl --request DELETE \
  -u ORGANIZATION_ID:API_KEY \
  --url https://app.moderntreasury.com/api/external_accounts/a3f2c891-6d4b-4e7a-9c15-8b3f2e6a91d4/cards/5e93c274-8a1b-7d42-b3f6-91c4e7a58d2f
204 No Content

Next: add a card to an external account.