← All REST endpoints

DELETE /api/v1/agents/:key/credentials/:credential_id

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.

DELETE/api/v1/agents/:key/credentials/:credential_idstable

Revoke a credential

Parameters
NameInTypeRequiredDefaultAllowedDescription
keyquerystringrequired——The agent's agent_key (path segment).
credential_idquerystringrequired——UUID of the credential to revoke (path segment). A foreign id is the same 404 as a missing one.

Revokes a credential. Revocation is immediate: the next request bearing the old bearer is a flat 401.

Response

FieldTypeAllowedDescription
credential——The credential metadata with revoked_at set.
credential.idstring—Credential UUID.
credential.agent_idstring—UUID of the bound agent.
credential.kindstringapi_key, mcp_tokenapi_key mints a trm_api_… secret; mcp_token mints a trm_mk_… token.
credential.labelstring—Free-text label, or null.
credential.key_prefixstring—Leading characters of the minted secret, for recognition. Metadata only — the token hash is never echoed.
credential.writes_enabledboolean—Whether the credential may write memories (default false).
credential.last_used_atstring—Last successful use, or null.
credential.revoked_atstring—Revocation timestamp, or null while live.
credential.inserted_atstring—Mint timestamp (ISO-8601).
credential.updated_atstring—Last-update timestamp (ISO-8601).

Example

bash
curl -X DELETE https://therobot.is/api/v1/agents/project-aria/credentials/1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d \
  -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.

  • 422{ "errors": { "field": ["message", …] } }

    Validation failure, as a per-field message map.