C ChatPro AI
Docs API Reference

API Reference

REST endpoints for the widget and admin APIs.

API Reference

Widget API (public)

Base URL: /api/v1/widget/{widgetId}

Method Path Description
GET /config Fetch widget configuration
POST /session Create or resume a widget session
GET /session?session_token=… Session state + open conversation
POST /conversations Start a conversation
POST /messages Send a message (non-streaming)
POST /messages/stream Send a message (SSE streaming)
GET /messages Fetch conversation history
POST /handoff Request human handoff

Admin API (authenticated)

Base URL: /api/v1/admin. Requires a Sanctum token and the relevant platform.* permission.

Method Path Permission
GET /tenants platform.tenants.view
GET /tenants/{id} platform.tenants.view
POST /tenants/{id}/credits platform.billing.manage
GET /plans platform.plans.manage
POST /plans/{id}/default platform.plans.manage
GET /providers platform.providers.manage
GET /providers/{id} platform.providers.manage
GET /requests platform.usage.view

Issue a token via POST /api/v1/tokens (email, password, device_name).