Create a card group
curl --request POST \
--url https://api.slash.com/v2/card-groups \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--header 'X-Idempotency-Key: <x-idempotency-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: 'POST',
headers: {
'X-Idempotency-Key': '<x-idempotency-key>',
'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', 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"
payload = {
"name": "<string>",
"controls": {
"limit": {
"amount": {
"amount": 500000,
"currency": "USD"
},
"period": "monthly"
},
"transactionLimit": {
"amount": 250000,
"currency": "USD"
},
"merchantCategoryCodes": {
"mode": "block",
"values": ["7995"]
}
}
}
headers = {
"X-Idempotency-Key": "<x-idempotency-key>",
"x-legal-entity": "<x-legal-entity>",
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(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"
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("POST", url, payload)
req.Header.Add("X-Idempotency-Key", "<x-idempotency-key>")
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
Unique caller-generated key for one create request. Once an authenticated, schema-valid request reaches the operation, the key is permanently consumed for that operation and legal entity whether the operation succeeds or fails. Reusing it in that scope returns 409 and never replays a response, unlike API v1, which replays the original response for a matching key.
1 - 255The 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]+$Body
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 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 POST \
--url https://api.slash.com/v2/card-groups \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--header 'X-Idempotency-Key: <x-idempotency-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: 'POST',
headers: {
'X-Idempotency-Key': '<x-idempotency-key>',
'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', 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"
payload = {
"name": "<string>",
"controls": {
"limit": {
"amount": {
"amount": 500000,
"currency": "USD"
},
"period": "monthly"
},
"transactionLimit": {
"amount": 250000,
"currency": "USD"
},
"merchantCategoryCodes": {
"mode": "block",
"values": ["7995"]
}
}
}
headers = {
"X-Idempotency-Key": "<x-idempotency-key>",
"x-legal-entity": "<x-legal-entity>",
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(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"
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("POST", url, payload)
req.Header.Add("X-Idempotency-Key", "<x-idempotency-key>")
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"
]
}
}
}