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/sendOutbound SMS to a contractor via AgentPhone.
POST /api/calls/placePlace an outbound voice call.
GET  /api/conversationsList conversations with last-message preview and counts.
GET  /api/conversations/{phone}Full SMS + call thread for one E.164 phone.
GET  /api/callsFlat list of all calls.
GET  /api/contractorsContractor roster.
GET  /api/inventoryBar inventory listing.
POST /api/chatMultimodal owner chat (Gemini).
POST /jobs & /jobs/{id}/...Jobs lifecycle: rank, outreach, accept, check-in, release.
POST /api/browser/importBrowser-use roster import.
POST /webhooks/agentphoneAgentPhone inbound events (signed).
POST /webhooks/{agentmail,stripe,sponge}External-service webhooks.
GET  /healthLiveness probe.