API Keys
Create and manage API keys programmatically. Keys can only be viewed once at creation.
Manage API keys for your team programmatically. Each team can have a maximum of 10 API keys.
GET /api/v1/api-keys
Returns the API keys for your team. The key values themselves stay with you from creation; a listing carries the prefix, which is enough to identify a key.
This list is paginated. See Pagination for following the Link header to the next page.
Required scope: api-keys:read
Query Parameters
perPageintegerResults per page, 1-200 (default: 50)
cursorstringPage to fetch, taken from a
Linkheader
Response Fields
data.apiKeysarrayOne page of API keys
data.apiKeys[].idstringUnique identifier for the API key
data.apiKeys[].namestringDisplay name of the API key
data.apiKeys[].scopesarrayList of permission scopes granted to this key
data.apiKeys[].createdAtintegerUnix timestamp in milliseconds of the creation
data.apiKeys[].lastUsedAtinteger | nullUnix timestamp in milliseconds of the last use
data.apiKeys[].expiresAtinteger | nullUnix timestamp in milliseconds of the expiration
data.apiKeys[].keyPrefixstringFirst 15 characters of the key, for identification
meta.requestIdstringIdentifier for this request
meta.timestampstringISO 8601 timestamp of the response
meta.pagination.nextstring | nullCursor for the following page,
nullon the lastmeta.pagination.prevstring | nullCursor for the preceding page,
nullon the firstmeta.pagination.perPageintegerResults this page was built with
meta.pagination.totalintegerAPI keys matching, across every page
Errors (3)
| Status | Type | Meaning |
|---|---|---|
| 400 | bad-request | The request is malformed |
| 401 | unauthorized | The API key is missing or invalid |
| 403 | forbidden | The API key lacks the required scope |
Response fields (200)
dataobjectRequiredShow nested fields
apiKeysApiKey[]RequiredShow nested fields
idstringRequirednamestringRequiredscopesstring[]RequiredcreatedAtintegerRequiredEpoch milliseconds
lastUsedAtinteger | nullRequiredEpoch milliseconds
expiresAtinteger | nullRequiredNull for a key that never expires
keyPrefixstringRequiredThe key's first characters, to recognize it
metaobjectRequiredShow nested fields
requestIdstringRequiredFormat: uuid.
timestampstringRequiredFormat: date-time.
paginationobjectRequiredShow nested fields
nextstring | nullRequiredCursor of the following page
prevstring | nullRequiredCursor of the preceding page
perPageintegerRequiredtotalinteger
cURL
curl -i "https://uptime.sergiodxa.com/api/v1/api-keys?perPage=100" \
-H "Authorization: Bearer uptime_your_api_key"Response
{
"data": {
"apiKeys": [
{
"id": "key_abc123",
"name": "Production Integration",
"scopes": ["monitors:read", "monitors:write"],
"createdAt": 1768467600000,
"lastUsedAt": 1771065000000,
"expiresAt": null,
"keyPrefix": "uptime_a1b2c3d4"
},
{
"id": "key_def456",
"name": "CI/CD Pipeline",
"scopes": ["monitors:read"],
"createdAt": 1770301320000,
"lastUsedAt": null,
"expiresAt": 1785974400000,
"keyPrefix": "uptime_d4e5f6a7"
}
]
},
"meta": {
"requestId": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"timestamp": "2026-02-14T12:00:00.000Z",
"pagination": {
"next": null,
"prev": null,
"perPage": 100,
"total": 2
}
}
}POST /api/v1/api-keys
Creates a new API key for your team and answers 201 Created. A key can grant only scopes it holds itself.
Required scope: api-keys:write
Request Body
namestringRequiredDisplay name for the key (1-255 characters)
scopesarrayRequiredPermission scopes to grant (at least one required)
expiresAtstringDate/time for key expiration (e.g. ISO 8601)
Response Fields
data.apiKey.idstringUnique identifier for the API key
data.apiKey.namestringDisplay name of the API key
data.apiKey.scopesarrayList of permission scopes granted to this key
data.apiKey.createdAtintegerUnix timestamp in milliseconds of the creation
data.apiKey.lastUsedAtinteger | nullAlways
nullfor newly created keysdata.apiKey.expiresAtinteger | nullUnix timestamp in milliseconds of the expiration,
nullfor nonedata.apiKey.keyPrefixstringFirst 15 characters of the key, for identification
data.keystringThe full API key value. Only returned once at creation.
meta.requestIdstringIdentifier for this request
meta.timestampstringISO 8601 timestamp of the response
Errors (6)
| Status | Type | Meaning |
|---|---|---|
| 400 | validation-error | The request failed validation |
| 400 | limit-exceeded | The team has reached its limit for this resource |
| 400 | idempotency-key-invalid | The Idempotency-Key header is not valid |
| 401 | unauthorized | The API key is missing or invalid |
| 403 | forbidden | The API key lacks the required scope |
| 409 | idempotency-key-in-use | A request with this idempotency key is still being processed |
Response fields (201)
dataobjectRequiredShow nested fields
apiKeyobjectRequiredShow nested fields
idstringRequirednamestringRequiredscopesstring[]RequiredcreatedAtintegerRequiredEpoch milliseconds
lastUsedAtinteger | nullRequiredEpoch milliseconds
expiresAtinteger | nullRequiredNull for a key that never expires
keyPrefixstringRequiredThe key's first characters, to recognize it
keystringRequiredThe secret, shown only in this response
metaobjectRequiredShow nested fields
requestIdstringRequiredFormat: uuid.
timestampstringRequiredFormat: date-time.
cURL
Response
{
"data": {
"apiKey": {
"id": "key_ghi789",
"name": "GitHub Actions",
"scopes": ["monitors:read", "monitors:write"],
"createdAt": 1771066800000,
"lastUsedAt": null,
"expiresAt": 1802563200000,
"keyPrefix": "uptime_9f8e7d6c"
},
"key": "uptime_9f8e7d6c5b4a39281706f5e4d3c2b1a09f8e7d6c5b4a39281706f5e4d3c2b1a0"
},
"meta": {
"requestId": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"timestamp": "2026-02-14T11:00:00.000Z"
}
}DELETE /api/v1/api-keys/:id
Permanently deletes an API key. This action cannot be undone. Any integrations using this key will immediately lose access.
Required scope: api-keys:write
Path Parameters
idstringThe unique identifier of the API key to delete
Response Fields
data.deletedbooleanAlways
trueon successful deletion
Errors (4)
| Status | Type | Meaning |
|---|---|---|
| 400 | validation-error | The request failed validation |
| 401 | unauthorized | The API key is missing or invalid |
| 403 | forbidden | The API key lacks the required scope |
| 404 | not-found | The resource does not exist |
Response fields (200)
dataobjectRequiredShow nested fields
deletedtrueRequired
metaobjectRequiredShow nested fields
requestIdstringRequiredFormat: uuid.
timestampstringRequiredFormat: date-time.
cURL
Response
{
"data": {
"deleted": true
},
"meta": {
"requestId": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"timestamp": "2026-02-14T12:00:00.000Z"
}
}