Skip to content

List API keys

GET
/api/v1/api-keys
curl --request GET \
--url https://api.deploybase.eu/api/v1/api/v1/api-keys \
--header 'Authorization: <Authorization>'

Returns every API key of the current team, active, expired and revoked, newest first. Secrets are never returned; key_prefix identifies a key. expires_at is set only on agent keys. Each key carries last_event, its most recent request from the audit log (null when none in the 90-day retention), and requests_7d, its request count over the last 7 days; both include refused and failed requests. When activity cannot be read the keys are still returned, with activity_unavailable true.

OK

Media type application/json
object
data
meta
object
request_id
string
timestamp
string
trace_id
string
data
object
activity_unavailable

ActivityUnavailable is true when the keys’ activity could not be read: every last_event is then null and every requests_7d 0, which says nothing about usage.

boolean
api_keys
Array<object>
object
created_at
string
expires_at
string
id
string
key_prefix
string
kind
string
Allowed values: standard agent
last_event

LastEvent is the key’s most recent request in the audit log’s 90-day retention, failed ones included; null when it made none.

object
client

Client is the client the request claimed to come from (unverified); null when it named none.

string
Allowed values: dashboard cli mcp migrate
created_at

CreatedAt is when the request was made, in UTC.

string
id
string
method
string
outcome

Outcome is “done” below 400, “refused” for 4xx and “failed” for 5xx.

string
Allowed values: done refused failed
path

Path is the route pattern (“/api/v1/projects/:id”), never a concrete URL. Empty when the stored path is not a known pattern.

string
phrase

Phrase is lowercase-first plain English: “created a deployment of {project}”, or “tried to create a deployment of {project}” when the request was refused or failed. It holds “{project}” if and only if project is non-null; render the name there.

string
project

Project is the project the request acted on; null when unknown or deleted.

object
id
string
name
string
status_code
integer
last_used_at
string
name
string
requests_7d

Requests7d counts the key’s requests in the last 7 days (rolling), failed ones included. A lower bound: the audit writer sheds rows under load.

integer
revoked_at
string
rotated_at
string
scopes
Array<string>
team_id
string
updated_at
string

Example

{
"data": {
"api_keys": [
{
"kind": "standard",
"last_event": {
"client": "dashboard",
"method": "POST",
"outcome": "done",
"path": "/api/v1/deployments",
"phrase": "created a deployment of {project}",
"status_code": 201
},
"requests_7d": 42
}
]
}
}

Unauthorized

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string

Example generated

{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Forbidden

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string

Example generated

{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Internal Server Error

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string

Example generated

{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Live 174db30c built