API Keys
Update API key
Changed onRenames an active API key, changes its scopes, IP allowlist or monthly credit budget, or pauses or resumes it. Send any of name, scope, scopes, paused, allowedIps & monthlyBudgetCredits. Pausing again keeps the first pause time. Pausing or resuming a revoked or expired key answers 409.
patch/api/v1/api-keys/{id}
Request
- Base URLhttps://xquik.com
- URLhttps://xquik.com/api/v1/api-keys/{id}
- AuthAPI key in cookie __Host-xquik_session
Path parameters
idstring required
Resource ID returned by the matching create or list endpoint.
Request body
Example request
{
"name": "Analytics notebook",
"scope": "paid_reads",
"scopes": [
"read",
"monitors"
],
"allowedIps": [
"203.0.113.4",
"198.51.100.0/24"
],
"monthlyBudgetCredits": 50000,
"paused": true
}Response
API key updated
Example response
{
"id": "42",
"name": "My API Key",
"prefix": "xq_live_exam",
"scope": "paid_reads",
"scopes": [
"read"
],
"allowedIps": [
"203.0.113.4",
"198.51.100.0/24"
],
"isActive": true,
"createdAt": "2025-01-15T12:00:00Z",
"expiresAt": "2025-02-14T12:00:00Z",
"lastUsedAt": "2025-01-16T09:30:00Z",
"monthlyBudgetCredits": 50000,
"monthlySpentCredits": 1200,
"pausedAt": "2025-01-20T08:00:00Z"
}Changes
- info
endpoint added
- info
- breaking
api path removed without deprecation
- breaking