cards.save
Add a card or account number (kind card_last4 or account_last4 and four digits) to an account, or change its label, cardholder or whether it is on, with idempotencyKey (and id with expectedRevision for changes). Receipts paid with that card are placed on its account. A number active on another account is refused.
/api/v1/accounting/cards.savePermissions
Who can call it
Retries
MCP
accounting_cards_saveFields
idstring (ID)The record's ID.
expectedRevisionintegerThe record's current revision, from the last time you read it. If someone changed the record since, the request is refused with a conflict so you can reload and check before trying again.
at most 9007199254740991 · greater than 0
accountIdstring (ID)The ID of a bank, card or payment account, from accounts.list.
kindenumWhich kind of record or job this is.
card_last4account_last4valuestringFour-digit year
labelstringat most 80 characters
cardholderUserIdstringat most 200 characters
cardholderNamestringat most 120 characters
activebooleanWhether the record is turned on.
idempotencyKeystringRequiredAny unique text you generate once per intended change, so a retried request only happens once. Send it as the Idempotency-Key header instead if you prefer; if you send both they must match.
8–200 characters
Example
curl https://app.getoatmilk.com/api/v1/accounting/cards.save \
-H "Authorization: Bearer $OATMILK_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{}'{
"data": { … }
}This action checks your data too, so replace the example values with your own before sending it.
Try it
Try it
Checks your input with this action’s real schema and answers like the API, with synthetic data. No key needed, and nothing changes.
curl https://app.getoatmilk.com/api/v1/accounting/cards.save \
-H "Authorization: Bearer $OATMILK_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{}'More in Transactions.