FleetDeckDocs

API reference / Dashboard keys

List signed-in user’s keys

Dashboard management endpoint; bearer keys cannot manage keys.

GET/api/agent-keys

Authorization

Dashboard sessionDashboard session cookie

Use 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
Request · cURL
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
200 · success
{
  "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 present

User-created key metadata. Previously issued secret tokens are never returned.

View child fields
idstringalways present

Unique identifier of this resource. Use the returned value in subsequent requests.

min 1 charactersmax 128 characters
Example: "key_123"
Validation pattern^[A-Za-z0-9._:-]+$
namestringalways present

Name of the resource or operation. For commands with an enum, choose one of the listed values.

Example: "My agent"
prefixstringalways present

Nonsecret token prefix for identifying a key in the dashboard.

Example: "fd_example"
scopesstring[]always present

Permissions granted to the key. Operations can require more than one scope.

deviceIdsstring[]always present

Exact IDs of the devices this key may access.

expiresAtstring | nullalways present

Null means no expiry for this user-created key. The key remains revocable. Session and job-child expirations remain finite.

date-time
revokedAtstring | nullalways present

UTC instant the key was revoked, or null while it has not been revoked.

date-time
createdAtstringalways present

UTC instant when the record was created.

date-time
Example: "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.