Skip to content

Roll an API key.

POST
/v1/api-keys/{api_key_id}/roll
curl --request POST \
--url https://api.siteqwality.com/v1/api-keys/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/roll \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "overlap_hours": null }'
api_key_id
required
string format: uuid
Idempotency-Key
string
<= 255 characters

Makes a retry safe, but the new secret is shown once and never stored: a retry with the same key and body is refused with 409 secret_not_replayable instead of running again.

Optional

Media type application/json
One of:
object
overlap_hours

How long the old key keeps working: 0 to 168, default 24. Zero ends it now.

integer | null format: int64

The new key and its secret, shown once

Media type application/json
object
api_key
required

One API key in list responses. Never contains the secret: after creation the secret exists only in the customer’s hands.

object
id
required
string format: uuid
account_id
required
string format: uuid
friendly_name
string | null
key_prefix
required

First 8 characters of the secret, kept in plaintext for display.

string
key_last_four
required

Last 4 characters of the secret, kept in plaintext for display.

string
key_type
required

What a customer API key is allowed to do.

Mirrors the Datadog split between an API key (telemetry push) and an application key (full API access), collapsed into one credential with a type so the ingest path and the management path can share a table.

string
Allowed values: ingest full
scopes
required

Empty means unrestricted.

Array<string>
ingest_signals
required

Allowed ingest signals; empty means all. New values use logs, traces, metrics order.

Array<string>
ingest_default_service

Stored default service for ingest; does not grant a signal permission.

string | null
ingest_default_env

Stored default environment for ingest; does not grant a signal permission.

string | null
status
required

Lifecycle state of a key, derived rather than stored so it can never disagree with the timestamps.

string
Allowed values: active expired revoked
created_at
required
string format: date-time
last_used_at
string | null format: date-time
expires_at
string | null format: date-time
revoked_at
string | null format: date-time
secret
required

Shown exactly once.

string
previous_api_key_id
required
string format: uuid
previous_expires_at
required

When the old key stops working.

string format: date-time
Example
{
"api_key": {
"key_type": "ingest",
"status": "active"
}
}

Missing or invalid credentials

Media type application/problem+json

An RFC 9457 problem, the body of every /v1 error.

object
type
required

https://docs.siteqwality.com/errors/ and the failure’s code, such as not_found.

string
title
required
string
status
required
integer format: int32
detail
string | null
instance

urn:uuid: and the request id.

string | null
errors

The invalid fields, when the request body was refused.

array | null

One validation failure; pointer is an RFC 6901 pointer into the request body.

object
pointer
required
string
detail
required
string
Example generated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"errors": [
{
"pointer": "example",
"detail": "example"
}
]
}

The key or member may not do this, or lacks the scope it needs

Media type application/problem+json

An RFC 9457 problem, the body of every /v1 error.

object
type
required

https://docs.siteqwality.com/errors/ and the failure’s code, such as not_found.

string
title
required
string
status
required
integer format: int32
detail
string | null
instance

urn:uuid: and the request id.

string | null
errors

The invalid fields, when the request body was refused.

array | null

One validation failure; pointer is an RFC 6901 pointer into the request body.

object
pointer
required
string
detail
required
string
Example generated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"errors": [
{
"pointer": "example",
"detail": "example"
}
]
}

No such key in this account

Media type application/problem+json

An RFC 9457 problem, the body of every /v1 error.

object
type
required

https://docs.siteqwality.com/errors/ and the failure’s code, such as not_found.

string
title
required
string
status
required
integer format: int32
detail
string | null
instance

urn:uuid: and the request id.

string | null
errors

The invalid fields, when the request body was refused.

array | null

One validation failure; pointer is an RFC 6901 pointer into the request body.

object
pointer
required
string
detail
required
string
Example generated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"errors": [
{
"pointer": "example",
"detail": "example"
}
]
}

The key’s successor is already live, or an overlap would pass the active key limit

Media type application/problem+json

An RFC 9457 problem, the body of every /v1 error.

object
type
required

https://docs.siteqwality.com/errors/ and the failure’s code, such as not_found.

string
title
required
string
status
required
integer format: int32
detail
string | null
instance

urn:uuid: and the request id.

string | null
errors

The invalid fields, when the request body was refused.

array | null

One validation failure; pointer is an RFC 6901 pointer into the request body.

object
pointer
required
string
detail
required
string
Example generated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"errors": [
{
"pointer": "example",
"detail": "example"
}
]
}

Invalid overlap_hours

Media type application/problem+json

An RFC 9457 problem, the body of every /v1 error.

object
type
required

https://docs.siteqwality.com/errors/ and the failure’s code, such as not_found.

string
title
required
string
status
required
integer format: int32
detail
string | null
instance

urn:uuid: and the request id.

string | null
errors

The invalid fields, when the request body was refused.

array | null

One validation failure; pointer is an RFC 6901 pointer into the request body.

object
pointer
required
string
detail
required
string
Example generated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"errors": [
{
"pointer": "example",
"detail": "example"
}
]
}

Too many requests; wait for the time in Retry-After

Media type application/problem+json

An RFC 9457 problem, the body of every /v1 error.

object
type
required

https://docs.siteqwality.com/errors/ and the failure’s code, such as not_found.

string
title
required
string
status
required
integer format: int32
detail
string | null
instance

urn:uuid: and the request id.

string | null
errors

The invalid fields, when the request body was refused.

array | null

One validation failure; pointer is an RFC 6901 pointer into the request body.

object
pointer
required
string
detail
required
string
Example generated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"errors": [
{
"pointer": "example",
"detail": "example"
}
]
}