Roll an API key.
const url = 'https://api.siteqwality.com/v1/api-keys/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/roll';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"overlap_hours":null}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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 }'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Header Parameters
Section titled “Header Parameters ”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.
Request Body
Section titled “Request Body ”Optional
Responses
Section titled “ Responses ”The new key and its secret, shown once
object
One API key in list responses. Never contains the secret: after creation the secret exists only in the customer’s hands.
object
First 8 characters of the secret, kept in plaintext for display.
Last 4 characters of the secret, kept in plaintext for display.
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.
Empty means unrestricted.
Allowed ingest signals; empty means all. New values use logs, traces, metrics order.
Stored default service for ingest; does not grant a signal permission.
Stored default environment for ingest; does not grant a signal permission.
Lifecycle state of a key, derived rather than stored so it can never disagree with the timestamps.
Shown exactly once.
When the old key stops working.
Example
{ "api_key": { "key_type": "ingest", "status": "active" }}Missing or invalid credentials
An RFC 9457 problem, the body of every /v1 error.
object
https://docs.siteqwality.com/errors/ and the failure’s code, such as not_found.
urn:uuid: and the request id.
The invalid fields, when the request body was refused.
One validation failure; pointer is an RFC 6901 pointer into the request body.
object
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
An RFC 9457 problem, the body of every /v1 error.
object
https://docs.siteqwality.com/errors/ and the failure’s code, such as not_found.
urn:uuid: and the request id.
The invalid fields, when the request body was refused.
One validation failure; pointer is an RFC 6901 pointer into the request body.
object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "errors": [ { "pointer": "example", "detail": "example" } ]}No such key in this account
An RFC 9457 problem, the body of every /v1 error.
object
https://docs.siteqwality.com/errors/ and the failure’s code, such as not_found.
urn:uuid: and the request id.
The invalid fields, when the request body was refused.
One validation failure; pointer is an RFC 6901 pointer into the request body.
object
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
An RFC 9457 problem, the body of every /v1 error.
object
https://docs.siteqwality.com/errors/ and the failure’s code, such as not_found.
urn:uuid: and the request id.
The invalid fields, when the request body was refused.
One validation failure; pointer is an RFC 6901 pointer into the request body.
object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "errors": [ { "pointer": "example", "detail": "example" } ]}Invalid overlap_hours
An RFC 9457 problem, the body of every /v1 error.
object
https://docs.siteqwality.com/errors/ and the failure’s code, such as not_found.
urn:uuid: and the request id.
The invalid fields, when the request body was refused.
One validation failure; pointer is an RFC 6901 pointer into the request body.
object
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
An RFC 9457 problem, the body of every /v1 error.
object
https://docs.siteqwality.com/errors/ and the failure’s code, such as not_found.
urn:uuid: and the request id.
The invalid fields, when the request body was refused.
One validation failure; pointer is an RFC 6901 pointer into the request body.
object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "errors": [ { "pointer": "example", "detail": "example" } ]}