Last updated

Updating & deleting cards

Rename, retune, or retire a card without reissuing it.

Updating a card

PATCH /v1/cards/{id} (scope cards:write) accepts any subset of name, metadata, and restrictions. Only the fields you send change.

curl -X PATCH \
  'https://public-sandbox.tryjeeves.com/v1/cards/123e4567-e89b-12d3-a456-426614174000' \
  -H "Authorization: Bearer $JEEVES_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Q4 Procurement Card",
    "restrictions": {
      "spendLimit": 10000,
      "merchantCategory": {
        "mode": "allow",
        "categoryIds": ["Software Expense", "Equipment Expense"]
      }
    }
  }'
FieldNotes
name1–60 chars, alphanumeric and spaces.
metadataReplaces the card's key-value metadata (max 10 pairs; keys ≤ 50 chars, values ≤ 255).
restrictionsSame shape as at creation: spendLimit, activeDateRangeUTC, maxTransactionCount (1–10), merchantCategory. See Spend controls & MCC.

Common patterns:

  • Effectively freeze a card — set activeDateRangeUTC.endDate to a past timestamp. Authorizations decline until you widen the window again.
  • Raise a limit mid-project — send a larger spendLimit; the next authorization sees it.
  • Tighten categories after misuse — switch merchantCategory.mode to allow with only the intended categories.

Deleting a card

DELETE /v1/cards/{id} (scope cards:write) permanently retires the card. It can no longer authorize.

curl -X DELETE \
  'https://public-sandbox.tryjeeves.com/v1/cards/123e4567-e89b-12d3-a456-426614174000' \
  -H "Authorization: Bearer $JEEVES_ACCESS_TOKEN"

Deletion is terminal — there is no undelete. If the card may be needed again, narrow its restrictions instead of deleting it. Settled transactions remain queryable through POST /v1/cards/transactions after deletion.

Errors to handle

StatusWhen
400 Bad RequestA field failed validation (pattern, range, or metadata limits).
401 UnauthorizedMissing/expired token or failed mTLS handshake.
403 ForbiddenToken lacks cards:write.
404 Not FoundThe card ID doesn't exist or belongs to another client.