GET /api/v1/agents/:key/credentials
Auth: Guardian JWT (Authorization: Bearer) from login or register. Machine credentials (trm_…) are not JWTs and never reach this surface — agents and credentials are managed by their human owner only.
GET
/api/v1/agents/:key/credentialsstableList an agent's credentials
| Name | In | Type | Required | Default | Allowed | Description |
|---|---|---|---|---|---|---|
key | query | string | required | — | — | The agent's agent_key (path segment). |
Lists the agent's machine credentials — metadata only. Revoked rows are included; token hashes are never echoed.
Response
| Field | Type | Allowed | Description |
|---|---|---|---|
credentials | — | — | Array of credential metadata, revoked rows included. |
credentials[].id | string | — | Credential UUID. |
credentials[].agent_id | string | — | UUID of the bound agent. |
credentials[].kind | string | api_key, mcp_token | api_key mints a trm_api_… secret; mcp_token mints a trm_mk_… token. |
credentials[].label | string | — | Free-text label, or null. |
credentials[].key_prefix | string | — | Leading characters of the minted secret, for recognition. Metadata only — the token hash is never echoed. |
credentials[].writes_enabled | boolean | — | Whether the credential may write memories (default false). |
credentials[].last_used_at | string | — | Last successful use, or null. |
credentials[].revoked_at | string | — | Revocation timestamp, or null while live. |
credentials[].inserted_at | string | — | Mint timestamp (ISO-8601). |
credentials[].updated_at | string | — | Last-update timestamp (ISO-8601). |
Example
curl https://therobot.is/api/v1/agents/project-aria/credentials \
-H "Authorization: Bearer EXAMPLE_JWT"Errors
401{ "error": "Authentication required" }A well-formed but unknown or revoked trm_ bearer. The response does not say which.
404{ "error": "not found" }Unknown or foreign agent key — at the agent level the two are deliberately the same answer, so no existence leaks.