API reference / Dashboard keys
List signed-in user’s keys
Dashboard management endpoint; bearer keys cannot manage keys.
/api/agent-keysAuthorization
Dashboard session cookieUse your signed-in dashboard session cookie. A FleetDeck API key cannot authenticate this endpoint. Browser requests must be same-origin; write requests require a matching Origin header. Authentication guide ↗
Request example
curl --request GET \
--url 'https://fleetdeck.co/api/agent-keys' \
--cookie "$FLEETDECK_DASHBOARD_COOKIE"Replace example IDs with returned values. Read credentials from your private environment.
Response examples
{
"keys": [
{
"id": "key_123",
"name": "My agent",
"prefix": "fd_example",
"scopes": [
"devices:read"
],
"deviceIds": [
"device_123"
],
"expiresAt": null,
"revokedAt": null,
"createdAt": "2030-01-01T10:00:00.000Z"
}
]
}Request body
This endpoint does not require a request body.
Behavior and limits
Dashboard management endpoint; bearer keys cannot manage keys. Returns at most 100 user-created keys, newest first, with metadata only. Ephemeral job-child credentials are hidden and do not consume the active user-key quota. Tokens and hashes are never returned by this endpoint.
Response 200
KeyList · application/json
keysobject[]always presentUser-created key metadata. Previously issued secret tokens are never returned.
View child fields
idstringalways presentUnique identifier of this resource. Use the returned value in subsequent requests.
"key_123"Validation pattern
^[A-Za-z0-9._:-]+$namestringalways presentName of the resource or operation. For commands with an enum, choose one of the listed values.
"My agent"prefixstringalways presentNonsecret token prefix for identifying a key in the dashboard.
"fd_example"scopesstring[]always presentPermissions granted to the key. Operations can require more than one scope.
deviceIdsstring[]always presentExact IDs of the devices this key may access.
expiresAtstring | nullalways presentNull means no expiry for this user-created key. The key remains revocable. Session and job-child expirations remain finite.
revokedAtstring | nullalways presentUTC instant the key was revoked, or null while it has not been revoked.
createdAtstringalways presentUTC instant when the record was created.
"2030-01-01T10:00:00.000Z"Errors
Expand a code for its recovery steps. Responses use error and code; validation errors also include issues.
401UNAUTHORIZEDMissing, malformed, expired or revoked credential; user verification/password state can also deny access.
Recovery: Use Authorization: Bearer with a valid scoped key. For dashboard routes, sign in. Job children require an active parent job and timely renewal.
Full error reference ↗500INTERNALUnexpected service error.
Recovery: Save nonsecret request context and time for support. Query action status before repeating a mutation; never assume it did not execute.
Full error reference ↗Example error messages are illustrative. Match the code and HTTP status; do not depend on exact message wording.
