Skip to main content
The Exo API provides REST endpoints for interacting with your resources and managing webhook subscriptions. All endpoints are JSON-based and require authentication.

Base URL

All API endpoints are prefixed with /exo-api (configurable via config('exo.route_prefix')):
https://your-app.com/exo-api

Authentication

Every request must include a Bearer token in the Authorization header:
curl -H "Authorization: Bearer YOUR_TOKEN" \
     https://your-app.com/exo-api/whoami
Tokens are Laravel Passport Personal Access Tokens. Create one using the exo:user command:
php artisan exo:user
Or create tokens programmatically through Passport.

Response format

Successful responses return JSON. Single records are returned directly, lists are paginated: Single record:
{
  "id": 1,
  "name": "Jane Smith",
  "email": "[email protected]",
  "created_at": "2026-03-28T14:30:00+00:00"
}
Paginated list:
{
  "data": [
    { "id": 1, "name": "Jane Smith" },
    { "id": 2, "name": "John Doe" }
  ],
  "current_page": 1,
  "last_page": 5,
  "per_page": 15,
  "total": 72,
  "next_page_url": "https://your-app.com/exo-api/resources/contact?page=2",
  "prev_page_url": null
}

Error responses

Errors return a JSON object with a message field:
Status codeMeaning
401Missing or invalid token
403Authenticated but not authorized to access this record
404Resource or record not found
405Operation not supported (e.g. creation disabled on this resource)
422Validation errors
Validation error example:
{
  "message": "The name field is required.",
  "errors": {
    "name": ["The name field is required."],
    "email": ["The email field must be a valid email address."]
  }
}

Endpoints overview

Resources

MethodEndpointDescription
GET/exo-api/whoamiGet the authenticated user’s identity
GET/exo-api/resourcesList all registered resources
GET/exo-api/resources/{name}List records for a resource (paginated)
GET/exo-api/resources/{name}/{id}Get a single record
POST/exo-api/resources/{name}Create a new record
PUT/exo-api/resources/{name}/{id}Update a record
DELETE/exo-api/resources/{name}/{id}Delete a record

Webhooks

MethodEndpointDescription
GET/exo-api/webhooksList your webhook subscriptions
POST/exo-api/webhooksCreate a webhook subscription
GET/exo-api/webhooks/{id}Get a webhook subscription
PUT/exo-api/webhooks/{id}Update a webhook subscription
DELETE/exo-api/webhooks/{id}Delete a webhook subscription