Update card
curl --request PATCH \
--url https://api.getlemma.com/v0/cards/{card_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"status": {},
"authorization_controls": {
"usage": {
"category": {},
"multi_use": {
"spending_limits": [
{
"interval": {},
"amount": 123
}
]
}
},
"merchant_category_code": {
"allowed": {},
"blocked": {}
}
}
}
'import requests
url = "https://api.getlemma.com/v0/cards/{card_id}"
payload = {
"status": {},
"authorization_controls": {
"usage": {
"category": {},
"multi_use": { "spending_limits": [
{
"interval": {},
"amount": 123
}
] }
},
"merchant_category_code": {
"allowed": {},
"blocked": {}
}
}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
status: {},
authorization_controls: {
usage: {category: {}, multi_use: {spending_limits: [{interval: {}, amount: 123}]}},
merchant_category_code: {allowed: {}, blocked: {}}
}
})
};
fetch('https://api.getlemma.com/v0/cards/{card_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getlemma.com/v0/cards/{card_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'status' => [
],
'authorization_controls' => [
'usage' => [
'category' => [
],
'multi_use' => [
'spending_limits' => [
[
'interval' => [
],
'amount' => 123
]
]
]
],
'merchant_category_code' => [
'allowed' => [
],
'blocked' => [
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getlemma.com/v0/cards/{card_id}"
payload := strings.NewReader("{\n \"status\": {},\n \"authorization_controls\": {\n \"usage\": {\n \"category\": {},\n \"multi_use\": {\n \"spending_limits\": [\n {\n \"interval\": {},\n \"amount\": 123\n }\n ]\n }\n },\n \"merchant_category_code\": {\n \"allowed\": {},\n \"blocked\": {}\n }\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.getlemma.com/v0/cards/{card_id}")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": {},\n \"authorization_controls\": {\n \"usage\": {\n \"category\": {},\n \"multi_use\": {\n \"spending_limits\": [\n {\n \"interval\": {},\n \"amount\": 123\n }\n ]\n }\n },\n \"merchant_category_code\": {\n \"allowed\": {},\n \"blocked\": {}\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getlemma.com/v0/cards/{card_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": {},\n \"authorization_controls\": {\n \"usage\": {\n \"category\": {},\n \"multi_use\": {\n \"spending_limits\": [\n {\n \"interval\": {},\n \"amount\": 123\n }\n ]\n }\n },\n \"merchant_category_code\": {\n \"allowed\": {},\n \"blocked\": {}\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "card_Bx5nTm8hKw3p",
"created_at": "2026-07-28T18:45:00Z",
"entity_id": "entity_k7mXp2vR9nTf",
"bank_account_id": "account_Qz8mVn2xTk6p",
"nickname": "Acme ops card",
"last_4": "4242",
"status": "active",
"authorization_controls": {
"usage": {
"category": "multi_use",
"multi_use": {
"spending_limits": [
{ "interval": "per_day", "amount": 300000, "merchant_category_codes": ["6010", "6011"] },
{ "interval": "per_transaction", "amount": 25000, "merchant_category_codes": null }
]
}
},
"merchant_acceptor_identifier": null,
"merchant_category_code": { "allowed": ["6300", "8011", "8021"], "blocked": null },
"merchant_country": null
}
}
{
"message": [
"authorization_controls.merchant_category_code must set exactly one of allowed or blocked"
],
"error": "Bad Request",
"statusCode": 400
}
{
"message": "Insufficient permissions to update cards for this entity",
"error": "Forbidden",
"statusCode": 403
}
{
"message": "Card not found",
"error": "Not Found",
"statusCode": 404
}
{
"message": "Card is canceled",
"error": "Conflict",
"statusCode": 409
}
Cards
Update card
Freeze or unfreeze a card, or change its spending limits or merchant category restrictions.
PATCH
/
v0
/
cards
/
{card_id}
Update card
curl --request PATCH \
--url https://api.getlemma.com/v0/cards/{card_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"status": {},
"authorization_controls": {
"usage": {
"category": {},
"multi_use": {
"spending_limits": [
{
"interval": {},
"amount": 123
}
]
}
},
"merchant_category_code": {
"allowed": {},
"blocked": {}
}
}
}
'import requests
url = "https://api.getlemma.com/v0/cards/{card_id}"
payload = {
"status": {},
"authorization_controls": {
"usage": {
"category": {},
"multi_use": { "spending_limits": [
{
"interval": {},
"amount": 123
}
] }
},
"merchant_category_code": {
"allowed": {},
"blocked": {}
}
}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
status: {},
authorization_controls: {
usage: {category: {}, multi_use: {spending_limits: [{interval: {}, amount: 123}]}},
merchant_category_code: {allowed: {}, blocked: {}}
}
})
};
fetch('https://api.getlemma.com/v0/cards/{card_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getlemma.com/v0/cards/{card_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'status' => [
],
'authorization_controls' => [
'usage' => [
'category' => [
],
'multi_use' => [
'spending_limits' => [
[
'interval' => [
],
'amount' => 123
]
]
]
],
'merchant_category_code' => [
'allowed' => [
],
'blocked' => [
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getlemma.com/v0/cards/{card_id}"
payload := strings.NewReader("{\n \"status\": {},\n \"authorization_controls\": {\n \"usage\": {\n \"category\": {},\n \"multi_use\": {\n \"spending_limits\": [\n {\n \"interval\": {},\n \"amount\": 123\n }\n ]\n }\n },\n \"merchant_category_code\": {\n \"allowed\": {},\n \"blocked\": {}\n }\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.getlemma.com/v0/cards/{card_id}")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": {},\n \"authorization_controls\": {\n \"usage\": {\n \"category\": {},\n \"multi_use\": {\n \"spending_limits\": [\n {\n \"interval\": {},\n \"amount\": 123\n }\n ]\n }\n },\n \"merchant_category_code\": {\n \"allowed\": {},\n \"blocked\": {}\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getlemma.com/v0/cards/{card_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": {},\n \"authorization_controls\": {\n \"usage\": {\n \"category\": {},\n \"multi_use\": {\n \"spending_limits\": [\n {\n \"interval\": {},\n \"amount\": 123\n }\n ]\n }\n },\n \"merchant_category_code\": {\n \"allowed\": {},\n \"blocked\": {}\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "card_Bx5nTm8hKw3p",
"created_at": "2026-07-28T18:45:00Z",
"entity_id": "entity_k7mXp2vR9nTf",
"bank_account_id": "account_Qz8mVn2xTk6p",
"nickname": "Acme ops card",
"last_4": "4242",
"status": "active",
"authorization_controls": {
"usage": {
"category": "multi_use",
"multi_use": {
"spending_limits": [
{ "interval": "per_day", "amount": 300000, "merchant_category_codes": ["6010", "6011"] },
{ "interval": "per_transaction", "amount": 25000, "merchant_category_codes": null }
]
}
},
"merchant_acceptor_identifier": null,
"merchant_category_code": { "allowed": ["6300", "8011", "8021"], "blocked": null },
"merchant_country": null
}
}
{
"message": [
"authorization_controls.merchant_category_code must set exactly one of allowed or blocked"
],
"error": "Bad Request",
"statusCode": 400
}
{
"message": "Insufficient permissions to update cards for this entity",
"error": "Forbidden",
"statusCode": 403
}
{
"message": "Card not found",
"error": "Not Found",
"statusCode": 404
}
{
"message": "Card is canceled",
"error": "Conflict",
"statusCode": 409
}
Changes apply to every authorization from the moment the request succeeds, and the card keeps its number and history. If any part of the request is invalid, the whole request is rejected and the card stays as it was.
You can only update cards your platform issued: a card issued by the entity’s staff in the Lemma app returns a
404. A canceled card returns a 409.
Send one update to a card at a time. Each update starts from the card’s current controls, so two sent at once can overwrite each other.
Headers
string
required
A key that prevents applying the same update twice if the request is retried.
Reusing a key on the same card returns the card’s current state instead of
updating it again; reusing it on a different card returns a 422. See
Idempotency.
Path parameters
string
required
The card’s unique identifier.
Request body
Setstatus, authorization_controls, or both. A body with neither returns a
400.
enum
Freezes or unfreezes the card. Omit it to keep the card’s current status.
canceled is not accepted; use Cancel a card
instead.object
The controls to change. Omit it to keep every control. When sent, it must set
usage, merchant_category_code, or both, and the one you omit keeps its
current value.Show Authorization controls fields
Show Authorization controls fields
object
How many times this card can be used, and the controls for that usage.
Replaces the card’s current usage and spending limits. Omit it to keep
them.
Show Usage fields
Show Usage fields
enum
required
Whether the card is for a single use or multiple uses.
Show Available options
Show Available options
string
The card can be used for multiple authorizations. The only
category issuable today.
object
required
Controls for multi-use cards. Required if and only if
category is
multi_use.Show Multi-use fields
Show Multi-use fields
object[]
required
The spending limits to enforce on this card. Must contain at least
one limit and at most one limit per interval. Where several limits
apply to a transaction, the most restrictive one wins.
Show Limit object
Show Limit object
enum
required
integer
required
The cap on settled spend in this window, in cents. Must be
positive, and at least as large as the cap on every narrower
interval. A wider window capped below a narrower one can
never be reached, so it is rejected.
object | null
Restricts the card to, or bars it from, a list of merchant category codes
(MCCs). Set exactly one of
allowed or blocked: sending one clears the
other. Omit it to keep the card’s current restriction, or send null to
remove it.Show Merchant category code fields
Show Merchant category code fields
string[] | null
The only merchant category codes this card can be used at; every other
code is declined. Each code is a 4-digit string such as
"8011".
Ranges are not accepted, so list each code.string[] | null
Merchant category codes this card is declined at. Lemma adds
7995
and 6051 to every block list, and an allow list cannot contain
either code.Response
Returns the updated card object.string
Unique identifier for the card, prefixed with
card_.string
The ID of the entity that owns this card.
string
The bank account this card draws from.
string
The human-readable label for this card.
string
The last 4 digits of the card number.
enum
object
Every control restricting how this card can be used, including the ones Lemma
applies to every card it issues.
Show Authorization controls object
Show Authorization controls object
object
How many times this card can be used, and its controls.
Show Usage object
Show Usage object
enum
Whether the card is for a single use or multiple uses.
Show Available options
Show Available options
string
The card can be used for multiple authorizations. The only
category issuable today.
object
Controls for multi-use cards.
Show Multi-use object
Show Multi-use object
object[]
Every spending limit enforced on this card, including the ones
Lemma applies automatically.
Show Limit object
Show Limit object
enum
integer
Cap in cents.
string[] | null
Merchant category codes this limit applies to.
null applies
to all merchants.object | null
Restricts which Merchant Acceptor IDs this card may transact with.
null
when this dimension is unrestricted.object | null
Restricts which merchant categories this card may transact with, including
the categories Lemma blocks on every card it issues.
null when this
dimension is unrestricted.object | null
Restricts which merchant countries this card may transact with, as ISO
3166-1 alpha-2 codes.
null when this dimension is unrestricted.{
"id": "card_Bx5nTm8hKw3p",
"created_at": "2026-07-28T18:45:00Z",
"entity_id": "entity_k7mXp2vR9nTf",
"bank_account_id": "account_Qz8mVn2xTk6p",
"nickname": "Acme ops card",
"last_4": "4242",
"status": "active",
"authorization_controls": {
"usage": {
"category": "multi_use",
"multi_use": {
"spending_limits": [
{ "interval": "per_day", "amount": 300000, "merchant_category_codes": ["6010", "6011"] },
{ "interval": "per_transaction", "amount": 25000, "merchant_category_codes": null }
]
}
},
"merchant_acceptor_identifier": null,
"merchant_category_code": { "allowed": ["6300", "8011", "8021"], "blocked": null },
"merchant_country": null
}
}
{
"message": [
"authorization_controls.merchant_category_code must set exactly one of allowed or blocked"
],
"error": "Bad Request",
"statusCode": 400
}
{
"message": "Insufficient permissions to update cards for this entity",
"error": "Forbidden",
"statusCode": 403
}
{
"message": "Card not found",
"error": "Not Found",
"statusCode": 404
}
{
"message": "Card is canceled",
"error": "Conflict",
"statusCode": 409
}