{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-cards/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Updating & deleting cards","description":"Start today using our public API to power your next project."},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"updating--deleting-cards"},"children":["Updating & deleting cards"]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Rename, retune, or retire a card without reissuing it."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"updating-a-card"},"children":["Updating a card"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PATCH /v1/cards/{id}"]}," (scope ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cards:write"]},") accepts any subset of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["metadata"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["restrictions"]},". Only the fields you send change."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X PATCH \\\n  'https://public-sandbox.tryjeeves.com/v1/cards/123e4567-e89b-12d3-a456-426614174000' \\\n  -H \"Authorization: Bearer $JEEVES_ACCESS_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"name\": \"Q4 Procurement Card\",\n    \"restrictions\": {\n      \"spendLimit\": 10000,\n      \"merchantCategory\": {\n        \"mode\": \"allow\",\n        \"categoryIds\": [\"Software Expense\", \"Equipment Expense\"]\n      }\n    }\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Notes"},"children":["Notes"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["1–60 chars, alphanumeric and spaces."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["metadata"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Replaces the card's key-value metadata (max 10 pairs; keys ≤ 50 chars, values ≤ 255)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["restrictions"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Same shape as at creation: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["spendLimit"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["activeDateRangeUTC"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["maxTransactionCount"]}," (1–10), ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchantCategory"]},". See ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/cards/card-management/spend-controls"},"children":["Spend controls & MCC"]},"."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Common patterns:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Effectively freeze a card"]}," — set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["activeDateRangeUTC.endDate"]}," to a past timestamp. Authorizations decline until you widen the window again."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Raise a limit mid-project"]}," — send a larger ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["spendLimit"]},"; the next authorization sees it."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Tighten categories after misuse"]}," — switch ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchantCategory.mode"]}," to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["allow"]}," with only the intended categories."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"deleting-a-card"},"children":["Deleting a card"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DELETE /v1/cards/{id}"]}," (scope ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cards:write"]},") permanently retires the card. It can no longer authorize."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X DELETE \\\n  'https://public-sandbox.tryjeeves.com/v1/cards/123e4567-e89b-12d3-a456-426614174000' \\\n  -H \"Authorization: Bearer $JEEVES_ACCESS_TOKEN\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["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 ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/cards/transactions/reconciliation"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /v1/cards/transactions"]}]}," after deletion."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"errors-to-handle"},"children":["Errors to handle"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Status"},"children":["Status"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"When"},"children":["When"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400 Bad Request"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["A field failed validation (pattern, range, or metadata limits)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["401 Unauthorized"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Missing/expired token or failed mTLS handshake."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["403 Forbidden"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Token lacks ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cards:write"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["404 Not Found"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The card ID doesn't exist or belongs to another client."]}]}]}]}]}]},"headings":[{"value":"Updating & deleting cards","id":"updating--deleting-cards","depth":1},{"value":"Updating a card","id":"updating-a-card","depth":2},{"value":"Deleting a card","id":"deleting-a-card","depth":2},{"value":"Errors to handle","id":"errors-to-handle","depth":2}],"frontmatter":{"seo":{"title":"Updating & deleting cards"}},"lastModified":"2026-10-28T18:10:31.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/cards/card-management/managing-cards","userData":{"isAuthenticated":false,"teams":["anonymous"]}}