curl --request POST \
--url https://api.redbark.com/v2/api_keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Redbark-Version: <api-key>' \
--data '
{
"name": "<string>",
"scopes": []
}
'const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Redbark-Version': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: '<string>', scopes: []})
};
fetch('https://api.redbark.com/v2/api_keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.redbark.com/v2/api_keys"
payload = {
"name": "<string>",
"scopes": []
}
headers = {
"Authorization": "Bearer <token>",
"Redbark-Version": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "key_3K1nTq8cZ5yWvR2mPd7Lx9",
"object": "api_key",
"name": "<string>",
"prefix": "<string>",
"scopes": [
"account:read"
],
"legacy": true,
"secret": "<string>",
"allowed_ips": [
"<string>"
],
"expires_at": "2026-08-21T09:30:00.000Z",
"expiring_at": "2026-08-21T09:30:00.000Z",
"last_used_at": "2026-08-21T09:30:00.000Z",
"rotated_from": "<string>",
"status": "active",
"metadata": {},
"livemode": true,
"created": "2026-08-21T09:30:00.000Z",
"updated": "2026-08-21T09:30:00.000Z"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}Create an API key
Creates a restricted key. Scopes are required and must be a subset of the calling key’s scopes. The secret is returned once, in this response only.
curl --request POST \
--url https://api.redbark.com/v2/api_keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Redbark-Version: <api-key>' \
--data '
{
"name": "<string>",
"scopes": []
}
'const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Redbark-Version': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: '<string>', scopes: []})
};
fetch('https://api.redbark.com/v2/api_keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.redbark.com/v2/api_keys"
payload = {
"name": "<string>",
"scopes": []
}
headers = {
"Authorization": "Bearer <token>",
"Redbark-Version": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "key_3K1nTq8cZ5yWvR2mPd7Lx9",
"object": "api_key",
"name": "<string>",
"prefix": "<string>",
"scopes": [
"account:read"
],
"legacy": true,
"secret": "<string>",
"allowed_ips": [
"<string>"
],
"expires_at": "2026-08-21T09:30:00.000Z",
"expiring_at": "2026-08-21T09:30:00.000Z",
"last_used_at": "2026-08-21T09:30:00.000Z",
"rotated_from": "<string>",
"status": "active",
"metadata": {},
"livemode": true,
"created": "2026-08-21T09:30:00.000Z",
"updated": "2026-08-21T09:30:00.000Z"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}Authorizations
Authorization: Bearer rbk_live_...
The API release your integration is built against, e.g. 2026-10-01.wattle. Required on every request.
Body
1 - 1001account:read, connections:read, connections:write, data:read, categories:read, categories:write, destinations:read, destinations:write, syncs:read, syncs:write, rules:read, rules:write, events:read, events:write, keys:write IPv4 addresses or CIDRs and exact IPv6 addresses (no IPv6 CIDR). IPv6 entries are normalized to canonical RFC 5952 form on write. Up to 20 entries.
20"2026-08-21T09:30:00.000Z"
Up to 50 string pairs. Set a key to null to unset it.
Show child attributes
Show child attributes
Response
The created key, with its secret
"key_3K1nTq8cZ5yWvR2mPd7Lx9"
api_key First 16 characters of the secret, for display
account:read, connections:read, connections:write, data:read, categories:read, categories:write, destinations:read, destinations:write, syncs:read, syncs:write, rules:read, rules:write, events:read, events:write, keys:write Created before scopes existed; holds every :read scope
Only present on create and rotate responses
IPv4 addresses or CIDRs and exact IPv6 addresses. IPv6 CIDR is not enforced and is rejected at create time. IPv6 entries are normalized to canonical RFC 5952 form (lowercase, compressed, no leading zeros) on write. Immutable after create.
"2026-08-21T09:30:00.000Z"
Set after rotate: when this key stops working
"2026-08-21T09:30:00.000Z"
"2026-08-21T09:30:00.000Z"
active, expiring, revoked, expired Up to 50 string pairs. Set a key to null in an update to unset it.
Show child attributes
Show child attributes
"2026-08-21T09:30:00.000Z"
"2026-08-21T09:30:00.000Z"

