CrewLoop API
Backend for CrewLoop — AgentPhone-powered SMS & voice dispatch, with Gemini reply generation and Postgres-backed conversation history.
Interactive docs
Swagger UI →Try every endpoint in the browser.
ReDoc →Read-friendly reference view.
OpenAPI spec →Machine-readable JSON.
UI surfaces hosted here
/dashboardConversations & calls.
/browser-importRoster import.
/bay-events/staffingDemo staffing page.
The full Next.js owner dashboard lives at crewloop.ayushojha.com.
Endpoint groups
POST /api/sms/send | Outbound SMS to a contractor via AgentPhone. |
POST /api/calls/place | Place an outbound voice call. |
GET /api/conversations | List conversations with last-message preview and counts. |
GET /api/conversations/{phone} | Full SMS + call thread for one E.164 phone. |
GET /api/calls | Flat list of all calls. |
GET /api/contractors | Contractor roster. |
GET /api/inventory | Bar inventory listing. |
POST /api/chat | Multimodal owner chat (Gemini). |
POST /jobs & /jobs/{id}/... | Jobs lifecycle: rank, outreach, accept, check-in, release. |
POST /api/browser/import | Browser-use roster import. |
POST /webhooks/agentphone | AgentPhone inbound events (signed). |
POST /webhooks/{agentmail,stripe,sponge} | External-service webhooks. |
GET /health | Liveness probe. |