Create a new token for an agent. The full token is only returned once.
cURL
curl --request POST \ --url https://api.ledger.so/v1/agents/{agentId}/tokens \ --header 'Api-Key: <api-key>' \ --header 'Content-Type: application/json' \ --data ' { "name": "<string>", "expiresAt": 123 } '
{ "object": "agent_token", "id": "<string>", "agentId": "<string>", "tokenPrefix": "<string>", "isActive": true, "token": "<string>", "name": "<string>" }
API key for authentication. Get your key from the Dashboard.
The agent ID
Optional name for the token
Optional expiration timestamp
Token created
agent_token
The full token (only returned once at creation)