Update a card group
curl --request PATCH \
--url https://api.slash.com/v2/card-groups/{cardGroupId} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--header 'x-legal-entity: <x-legal-entity>' \
--data '
{
"name": "<string>",
"controls": {
"limit": {
"amount": {
"amount": 500000,
"currency": "USD"
},
"period": "monthly"
},
"transactionLimit": {
"amount": 250000,
"currency": "USD"
},
"merchantCategoryCodes": {
"mode": "block",
"values": [
"7995"
]
}
}
}
'const options = {
method: 'PATCH',
headers: {
'x-legal-entity': '<x-legal-entity>',
'X-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
controls: {
limit: {amount: {amount: 500000, currency: 'USD'}, period: 'monthly'},
transactionLimit: {amount: 250000, currency: 'USD'},
merchantCategoryCodes: {mode: 'block', values: ['7995']}
}
})
};
fetch('https://api.slash.com/v2/card-groups/{cardGroupId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.slash.com/v2/card-groups/{cardGroupId}"
payload = {
"name": "<string>",
"controls": {
"limit": {
"amount": {
"amount": 500000,
"currency": "USD"
},
"period": "monthly"
},
"transactionLimit": {
"amount": 250000,
"currency": "USD"
},
"merchantCategoryCodes": {
"mode": "block",
"values": ["7995"]
}
}
}
headers = {
"x-legal-entity": "<x-legal-entity>",
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.slash.com/v2/card-groups/{cardGroupId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"controls\": {\n \"limit\": {\n \"amount\": {\n \"amount\": 500000,\n \"currency\": \"USD\"\n },\n \"period\": \"monthly\"\n },\n \"transactionLimit\": {\n \"amount\": 250000,\n \"currency\": \"USD\"\n },\n \"merchantCategoryCodes\": {\n \"mode\": \"block\",\n \"values\": [\n \"7995\"\n ]\n }\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-legal-entity", "<x-legal-entity>")
req.Header.Add("X-API-Key", "<api-key>")
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))
}{
"id": "card_group_2rj4l7hmrrrcv",
"name": "Marketing",
"status": "active",
"createdAt": "2023-11-07T05:31:56Z",
"controls": {
"limit": {
"amount": {
"amount": 500000,
"currency": "USD"
},
"period": "monthly"
},
"transactionLimit": {
"amount": 250000,
"currency": "USD"
},
"merchantCategoryCodes": {
"mode": "block",
"values": [
"7995"
]
}
}
}Authorizations
User API key authentication. Create a key under Settings → API keys in the Slash dashboard (https://app.slash.com/global-settings/api-keys) and send the x-legal-entity header naming the legal entity to act on with every request. Keys scoped to a legal entity are rejected with 403 user_api_key_required.
Headers
The legal entity to act on. Required on every request; a user API key can act on any legal entity its user has access to.
^le_[a-zA-Z0-9]+$Path Parameters
Card group id with the card_group_ prefix.
Body
Omitted fields keep their value; null controls clear them.
1 - 255What the group's cards may spend together; a group limit is shared across its cards. Replaced whole on update; null clears it.
Hide child attributes
Hide child attributes
How much may be spent per period.
Hide child attributes
Hide child attributes
Every period but lifetime resets at its boundary in timezone; lifetime never resets.
daily, weekly, monthly, yearly, lifetime Day the first period starts, today or earlier. Defaults to the start of the current period. Not used by daily.
"2026-09-01"
IANA timezone the period boundaries use. Defaults to UTC.
"America/Los_Angeles"
{
"limit": {
"amount": { "amount": 500000, "currency": "USD" },
"period": "monthly"
},
"transactionLimit": { "amount": 250000, "currency": "USD" },
"merchantCategoryCodes": { "mode": "block", "values": ["7995"] }
}
Response
The updated card group.
Card group id with the card_group_ prefix.
"card_group_2rj4l7hmrrrcv"
"Marketing"
active, archived What the group's cards may spend together; a group limit is shared across its cards. Replaced whole on update; null clears it.
Hide child attributes
Hide child attributes
How much may be spent per period.
Hide child attributes
Hide child attributes
Every period but lifetime resets at its boundary in timezone; lifetime never resets.
daily, weekly, monthly, yearly, lifetime Day the first period starts, today or earlier. Defaults to the start of the current period. Not used by daily.
"2026-09-01"
IANA timezone the period boundaries use. Defaults to UTC.
"America/Los_Angeles"
{
"limit": {
"amount": { "amount": 500000, "currency": "USD" },
"period": "monthly"
},
"transactionLimit": { "amount": 250000, "currency": "USD" },
"merchantCategoryCodes": { "mode": "block", "values": ["7995"] }
}
curl --request PATCH \
--url https://api.slash.com/v2/card-groups/{cardGroupId} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--header 'x-legal-entity: <x-legal-entity>' \
--data '
{
"name": "<string>",
"controls": {
"limit": {
"amount": {
"amount": 500000,
"currency": "USD"
},
"period": "monthly"
},
"transactionLimit": {
"amount": 250000,
"currency": "USD"
},
"merchantCategoryCodes": {
"mode": "block",
"values": [
"7995"
]
}
}
}
'const options = {
method: 'PATCH',
headers: {
'x-legal-entity': '<x-legal-entity>',
'X-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
controls: {
limit: {amount: {amount: 500000, currency: 'USD'}, period: 'monthly'},
transactionLimit: {amount: 250000, currency: 'USD'},
merchantCategoryCodes: {mode: 'block', values: ['7995']}
}
})
};
fetch('https://api.slash.com/v2/card-groups/{cardGroupId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.slash.com/v2/card-groups/{cardGroupId}"
payload = {
"name": "<string>",
"controls": {
"limit": {
"amount": {
"amount": 500000,
"currency": "USD"
},
"period": "monthly"
},
"transactionLimit": {
"amount": 250000,
"currency": "USD"
},
"merchantCategoryCodes": {
"mode": "block",
"values": ["7995"]
}
}
}
headers = {
"x-legal-entity": "<x-legal-entity>",
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.slash.com/v2/card-groups/{cardGroupId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"controls\": {\n \"limit\": {\n \"amount\": {\n \"amount\": 500000,\n \"currency\": \"USD\"\n },\n \"period\": \"monthly\"\n },\n \"transactionLimit\": {\n \"amount\": 250000,\n \"currency\": \"USD\"\n },\n \"merchantCategoryCodes\": {\n \"mode\": \"block\",\n \"values\": [\n \"7995\"\n ]\n }\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-legal-entity", "<x-legal-entity>")
req.Header.Add("X-API-Key", "<api-key>")
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))
}{
"id": "card_group_2rj4l7hmrrrcv",
"name": "Marketing",
"status": "active",
"createdAt": "2023-11-07T05:31:56Z",
"controls": {
"limit": {
"amount": {
"amount": 500000,
"currency": "USD"
},
"period": "monthly"
},
"transactionLimit": {
"amount": 250000,
"currency": "USD"
},
"merchantCategoryCodes": {
"mode": "block",
"values": [
"7995"
]
}
}
}