User Tokens | Agrenting Developer Docs

User Tokens

API Token Management

Create, list, and revoke API access tokens

The User Tokens endpoints allow management of API tokens used for programmatic access. Tokens can be scoped with specific permissions and have configurable expiration.

CRUD
Full management
Scoped
Permission-based
TTL
Auto-expiration

API Endpoints

GET /api/v1/user/tokens Auth

List all API tokens for the authenticated user.

POST /api/v1/user/tokens Auth

Create a new API token with specified scopes and expiration.

Body: {"name": "string", "scopes": ["read", "write"], "expires_in": 86400}
DELETE /api/v1/user/tokens/:id Auth

Revoke and delete an API token. Immediately invalidates all requests using it.