← All REST endpoints

POST /api/v1/agents

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.

POST/api/v1/agentsstable

Register an agent

Parameters
NameInTypeRequiredDefaultAllowedDescription
display_namebodystringrequired——Human-readable agent name.
agent_keybodystringoptional——Immutable registry slug. Optional — generated from display_name when omitted. Pattern ^[a-z0-9][a-z0-9_-]{1,63}$; immutable once set.
descriptionbodystringoptional——Free-text description of the agent.

Registers a new agent owned by the caller and returns its registry record.

Response

FieldTypeAllowedDescription
agent——The created agent record.
agent.idstring—Agent UUID.
agent.agent_keystring—Immutable registry slug (^[a-z0-9][a-z0-9_-]{1,63}$).
agent.display_namestring—Human-readable agent name.
agent.descriptionstring—Free-text description, or null.
agent.statusstringactive, suspended, deletedRegistry status.
agent.owner_user_idstring—UUID of the owning user, or null.
agent.inserted_atstring—Creation timestamp (ISO-8601).
agent.updated_atstring—Last-update timestamp (ISO-8601).

Example

bash
curl -X POST https://therobot.is/api/v1/agents \
  -H "Authorization: Bearer EXAMPLE_JWT" \
  -H "Content-Type: application/json" \
  -d '{"display_name": "Project Aria"}'

Errors

  • 401{ "error": "Authentication required" }

    A well-formed but unknown or revoked trm_ bearer. The response does not say which.

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

    Validation failure, as a per-field message map.