List API keys
keyPrefix for identification, but never the full key value — Overwatch stores only a SHA-256 hash after creation.
Response
ApiKey[]
Array of API key metadata objects.
Example
Create an API key
Request body
string
required
A descriptive name for the key, e.g.
"CI deploy key" or "Grafana dashboard".string
Role to assign to the key:
owner, admin, or viewer. Defaults to your own role. You cannot create a key with a higher role than your own.string
Optional ISO 8601 date/time string after which the key is automatically rejected, e.g.
"2026-01-01T00:00:00.000Z". Omit for a non-expiring key.Response
Returns201 Created. The data object includes all the standard metadata fields plus a key field containing the full plaintext API key.
string
The full plaintext API key. This is the only time Overwatch returns the key value. Copy it now.
Overwatch stores only a SHA-256 hash of the key. If you lose the plaintext, you must revoke the key and create a new one.
Example
Update an API key
Path parameters
string
required
The API key ID.
Request body
string
New display name for the key.
string
New role:
owner, admin, or viewer. You cannot assign a role higher than your own.string | null
New expiration date as an ISO 8601 string, or
null to remove an existing expiration and make the key non-expiring.Response
Returns the updated key metadata with200 OK. The plaintext key is not included.
Example
Revoke an API key
401 Unauthorized immediately. This action is irreversible.
Path parameters
string
required
The API key ID.