API Overview
The AgenFleet REST API gives you programmatic access to your agents, cost analytics, workforce metrics, and audit data. Use it to integrate AgenFleet into your own systems, automate fleet management, or build reporting on top of the platform.
Base URL
Section titled “Base URL”https://api.agenfleet.ai/apiAll endpoints are prefixed with /api. Examples in this documentation use this base path.
Authentication
Section titled “Authentication”All API requests require a JWT Bearer token in the Authorization header. Obtain a token by authenticating via the portal or the /api/auth/login endpoint.
Authorization: Bearer <your-jwt-token>Authenticating via API
Section titled “Authenticating via API”POST /api/auth/loginContent-Type: application/json
{ "email": "you@yourcompany.com", "password": "..."}Response:
{ "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "user": { "id": "...", "email": "you@yourcompany.com", "role": "admin" }}Include the token value as your Bearer token on all subsequent requests.
Request format
Section titled “Request format”All request bodies must be JSON with Content-Type: application/json:
POST /api/agentsContent-Type: application/jsonAuthorization: Bearer <token>
{ "name": "Nova", "role": "Research Analyst"}Response format
Section titled “Response format”All responses return JSON. Successful responses use 2xx status codes.
Single resource:
{ "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Nova", "status": "online", "createdAt": "2026-01-15T09:00:00Z"}List response:
{ "data": [ ... ], "pagination": { "total": 42, "limit": 20, "offset": 0, "hasMore": true }}Error format
Section titled “Error format”All errors return a consistent JSON body:
{ "error": "No agent found with that ID"}HTTP status codes
Section titled “HTTP status codes”| HTTP status | Description |
|---|---|
| 400 | Request body failed validation |
| 401 | Missing or invalid token |
| 403 | Valid token but insufficient role/scope |
| 404 | Resource does not exist or belongs to another tenant |
| 429 | Too many requests — see rate limits below |
| 500 | Platform error — contact support |
Rate limits
Section titled “Rate limits”Rate limiting is enforced at the API layer using a sliding window:
| Limit type | Limit | Window |
|---|---|---|
| General API | 60 requests | per minute per IP |
| Auth endpoints | 10 attempts | per 15 minutes per IP |
| Billing endpoints | 5 requests | per minute per IP |
| MFA verification | 5 attempts | per 15 minutes per IP |
When rate limited, the response is 429 Too Many Requests. Back off and retry after a short delay.
Pagination
Section titled “Pagination”List endpoints support offset-based pagination via limit and offset query parameters:
GET /api/agents?limit=20&offset=40| Parameter | Default | Max | Description |
|---|---|---|---|
limit | 20 | 100 | Number of results to return |
offset | 0 | — | Number of results to skip |