Start Free Trial

API Documentation

REST API reference for building integrations with CrewRivet.

Base URL: https://app.crewrivet.com/api
Auth: Bearer token via Authorization: Bearer <token> header
POST /api/auth/login

Authenticate and receive JWT token

Body: { email, password }
Response: { token, user }
POST /api/auth/register

Create a new tenant account

Body: { email, password, name, trade }
Response: { token, user }
GET /api/contacts

List contacts with search and pagination

Response: { contacts[], total }
POST /api/contacts

Create a new contact

Body: { name, phone, email?, address? }
Response: { contact }
GET /api/contacts/:id

Get contact details with history

Response: { contact, jobs, invoices, messages }
PATCH /api/contacts/:id

Update contact fields

Body: { name?, phone?, email?, address? }
Response: { contact }
GET /api/invoices

List invoices with status filter

Response: { invoices[], total, stats }
POST /api/invoices

Create a new invoice

Body: { contactId, lineItems[], description, dueDate }
Response: { invoice }
GET /api/invoices/:id

Get invoice details

Response: { invoice }
GET /api/invoices/:id/pdf

Download invoice PDF

Response: application/pdf
POST /api/invoices/:id/send

Send invoice via SMS

Response: { success }
GET /api/quotes

List quotes

Response: { quotes[], total, stats }
POST /api/quotes

Create a quote (flat or tiered)

Body: { contactId, scopeOfWork, lineItems[], tiers? }
Response: { quote }
GET /api/quotes/:id/pdf

Download quote PDF

Response: application/pdf
GET /api/quotes/:id/proposal

Download branded proposal PDF

Response: application/pdf
GET /api/jobs

List jobs with status filter

Response: { jobs[], total, stats }
POST /api/jobs

Create a new job

Body: { contactId, title, scheduledDate, scheduledTime?, address? }
Response: { job }
POST /api/jobs/:id/complete

Mark job as completed

Body: { notes? }
Response: { job }
GET /api/expenses

List expenses with filters

Response: { expenses[], total, stats }
POST /api/expenses

Create an expense

Body: { description, amountCents, category, jobId?, vendor?, expenseDate? }
Response: { expense }
POST /api/expenses/receipt

OCR scan a receipt photo

Body: multipart/form-data (photo)
Response: { expense (auto-filled) }
GET /api/reports/revenue

Revenue by period with trend data

Response: { revenue[], total, trend }
GET /api/reports/profit-loss

Profit & loss statement

Response: { income, expenses, netProfit, monthly[] }
GET /api/reports/cash-flow

Cash flow analysis

Response: { cashIn, cashOut, net, monthly[] }
GET /api/reports/ar-aging

Accounts receivable aging

Response: { current, days30, days60, days90, totalOutstanding }
GET /api/email-templates

List email templates

Response: { templates[] }
GET /api/email-templates/gallery

Browse 12 pre-built templates

Response: { templates[] }
POST /api/email-templates/gallery/install

Install a gallery template

Body: { galleryId }
Response: { template }
POST /api/email-templates/:id/send

Send email using template

Body: { to, variables? }
Response: { success }
GET /api/dispatch

Get dispatch board (team schedules)

Response: { team[], unassigned[] }
PATCH /api/jobs/:id/assign

Assign job to team member

Body: { assignedTo }
Response: { job }
GET /api/dispatch/suggest/:jobId

AI-powered crew suggestion

Response: { suggestions[] }
POST /api/dispatch/optimize/:memberId

Optimize route for a team member

Response: { route[], distanceSaved }
GET /api/reports/tax

Schedule C tax data for a given year

Response: { income, expenses, categories[], netProfit }
GET /api/reports/tax/quarterly

Quarterly estimated tax obligations

Response: { quarters[], totalOwed }
POST /api/payment-plans

Create a payment plan on an invoice

Body: { invoiceId, installments (2-12) }
Response: { plan, installments[] }
GET /api/payment-plans/:id

Get payment plan details

Response: { plan, installments[], payments[] }
GET /api/receptionist/settings

Get AI receptionist settings

Response: { settings }
PATCH /api/receptionist/settings

Update receptionist mode, greeting, language

Body: { enabled?, mode?, greeting?, language? }
Response: { settings }
GET /api/receptionist/calls

List AI receptionist call log

Response: { calls[], total }
GET /api/receptionist/dashboard

Receptionist metrics and recent calls

Response: { metrics, recentCalls[] }
GET /api/referral-network

List contractor referral connections

Response: { connections[], trades[] }
POST /api/referral-network

Create a referral connection

Body: { name, trade, phone?, email?, notes? }
Response: { connection }
POST /api/ai-help/feedback

Submit product feedback (feature request, bug, general)

Body: { type, message, page? }
Response: { success }
POST /api/ai-help/escalate

Escalate to support team

Body: { subject?, message?, email? }
Response: { success }
POST /api/ai-help

Ask AI about your business data

Body: { message }
Response: { reply, suggestions[] }
GET /api/insights

Get proactive dashboard insights

Response: { insights[] }
GET /api/forecast/ai-projections

AI revenue forecasting

Response: { projections[], summary }
GET /api/webhooks

List configured webhook endpoints

Response: { webhooks[] }
POST /api/webhooks

Register a webhook endpoint

Body: { url, events[], secret? }
Response: { webhook }
POST /api/webhooks/:id/test

Send a test event to the webhook

Response: { success, statusCode }
EVENT invoice.paid

Fired when a customer pays an invoice

Payload: { invoiceId, contactId, amountCents, paidAt }
EVENT invoice.sent

Fired when an invoice is sent to customer

Payload: { invoiceId, contactId }
EVENT job.completed

Fired when a job is marked complete

Payload: { jobId, contactId, title }
EVENT quote.accepted

Fired when a customer accepts a quote

Payload: { quoteId, contactId, signerName }
EVENT review.submitted

Fired when a customer submits a review

Payload: { reviewId, contactId, rating, feedback }
EVENT lead.created

Fired when a new lead is captured

Payload: { contactId, name, phone, source }
EVENT message.received

Fired when an inbound SMS is received

Payload: { messageId, contactId, body }
EVENT booking.created

Fired when a customer books online

Payload: { jobId, contactId, date, time, service }