Skip to main content
POST
Rotate an API key

Authorizations

Authorization
string
header
required

Authorization: Bearer rbk_live_...

Redbark-Version
string
header
required

The API release your integration is built against, e.g. 2026-10-01.wattle. Required on every request.

Path Parameters

id
string
required

The id of the object.

Example:

"key_3K1nTq8cZ5yWvR2mPd7Lx9"

Response

The replacement key, with its secret

id
string
required
Example:

"key_3K1nTq8cZ5yWvR2mPd7Lx9"

object
enum<string>
required
Available options:
api_key
name
string
required
prefix
string
required

First 16 characters of the secret, for display

scopes
enum<string>[]
required
Available options:
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
legacy
boolean
required

Created before scopes existed; holds every :read scope

secret
string | null
required

Only present on create and rotate responses

allowed_ips
string[] | null
required
expires_at
string<date-time> | null
required
Example:

"2026-08-21T09:30:00.000Z"

expiring_at
string<date-time> | null
required

Set after rotate: when this key stops working

Example:

"2026-08-21T09:30:00.000Z"

last_used_at
string<date-time> | null
required
Example:

"2026-08-21T09:30:00.000Z"

rotated_from
string | null
required
status
enum<string>
required
Available options:
active,
expiring,
revoked,
expired
metadata
object | null
required

Up to 50 string pairs. Set a key to null in an update to unset it.

livemode
boolean
required
created
string<date-time>
required
Example:

"2026-08-21T09:30:00.000Z"

updated
string<date-time>
required
Example:

"2026-08-21T09:30:00.000Z"