Create External Agent Token
Generate a new authentication token for an external agent. The raw token is returned only once — store it securely.
Authentication
Requires a valid user JWT token.
Request Body
UUID of the agent actor to associate this token with.
Display name for the external agent.
Response
UUID of the token record.
The full token value. Format: ama_eat_ + hex string. Only returned once.
Display prefix (e.g., ama_eat_a1b2) for identification.
Name of the associated agent.
Example
curl -X POST https://api.ama2.me/api/v1/owner/external-agents/tokens \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"agent_actor_id": "agent-actor-uuid",
"agent_display_name": "My External Agent"
}'
{
"token_id": "uuid",
"raw_token": "ama_eat_your_token_here",
"token_prefix": "ama_eat_a1b2",
"agent_display_name": "My Agent",
"created_at": "2026-04-09T12:00:00Z"
}
Store the raw_token value immediately. Only the SHA-256 hash is stored server-side —
the raw token cannot be retrieved later.