Skip to main content
POST
Rotate project API key

Authorizations

Authorization
string
header
required

Partner key, in the format rt_partner_..., sent as Authorization: Bearer <key>. It only works on the /v1/partner/* routes. A project key does not work on them, and a partner key does not work on any other route.

Scopes

api_keys:write

Path Parameters

projectId
string
required

Project ID (proj_...). Only a project created through the Partner API is accepted.

id
string
required

ID of the project API key (key_...).

Response

New key created. The secret is shown only once

id
string
required

Key ID.

Example:

"key_01J8ZK9M3Q7XABCDEFGHJKMNPQ"

project_id
string
required

Project the key belongs to.

Example:

"proj_01J8ZK9M3Q7XABCDEFGHJKMNPQ"

name
string | null
required

The name you gave the key, or null.

Example:

"Acme Store"

key_prefix
string
required

First characters of the key, safe to display.

Example:

"rt_live_abc"

last_four
string
required

Last four characters of the key.

Example:

"k3xQ"

scopes
enum<string>[]
required

Scopes granted to the project key.

Available options:
messages:read,
messages:write,
channels:read,
channels:write,
events:read,
webhooks:write,
usage:read,
templates:read,
templates:write,
media:read,
media:write
expires_at
string<date-time> | null
required

When the key expires, or null if it does not.

ip_allowlist
string[]
required

Allowed IP addresses or CIDR blocks. An empty list applies no restriction.

created_at
string<date-time>
required

When the key was created.

Example:

"2026-09-04T13:22:41.031Z"

revoked_at
string<date-time> | null
required

When the key was revoked, or null while it is active.

last_used_at
string<date-time> | null
required

Last use of the key, rounded to the minute, or null.

secret
string
required

The full API key. Shown only now. Store it safely.

Example:

"rt_live_..."