REST API Reference for AI Calls & SMS
API Documentation
REST API for lead ingestion and webhooks
Getting Started
The VoiceCRM API lets you push leads into your campaigns and receive webhooks when calls complete. All requests use HTTPS, accept JSON, and require an API key.
Authentication
Generate API keys in Settings → Integrations. Keys are scoped to your organization and can be revoked at any time.
Include your key in the Authorization header on every request:
Authorization: Bearer YOUR_API_KEYLead Ingestion
/api/v1/leads/ingestCreate a new lead. If a campaign with auto-call is configured, the lead will be queued automatically.
Request body
firstName*stringLead's first namelastNamestringLead's last namephone*stringE.164 format, e.g. +14165551234emailstringLead's email addresssourcestringLead source label (website, facebook, referral...)utm_sourcestringUTM source for attributionutm_mediumstringUTM mediumutm_campaignstringUTM campaigncampaignIdstringForce assignment to a specific campaignassignedTostringUser ID to assign the lead tonotesstringFree-form notescustomFieldsobjectIndustry-specific extra fieldsExamples
curl -X POST https://thevoicecrm.com/api/v1/leads/ingest \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"firstName": "Jane",
"lastName": "Doe",
"phone": "+14165551234",
"email": "jane@example.com",
"source": "website",
"utm_source": "google",
"utm_medium": "cpc",
"notes": "Requested a demo"
}'const response = await fetch("https://thevoicecrm.com/api/v1/leads/ingest", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
firstName: "Jane",
lastName: "Doe",
phone: "+14165551234",
email: "jane@example.com",
source: "website",
}),
});
const lead = await response.json();
console.log(lead.id);import requests
response = requests.post(
"https://thevoicecrm.com/api/v1/leads/ingest",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"firstName": "Jane",
"lastName": "Doe",
"phone": "+14165551234",
"email": "jane@example.com",
"source": "website",
},
)
lead = response.json()
print(lead["id"])Response (201 Created)
{
"id": "lead_abc123",
"status": "queued",
"campaignId": "camp_xyz",
"createdAt": "2026-04-18T15:30:00Z"
}REST API v1
Full read/write access to your CRM data. Authenticate with X-API-Key or Authorization: Bearer. List endpoints support limit (max 200) and offset query params.
Response envelope
// List endpoints
{
"data": [ ... ],
"pagination": { "limit": 50, "offset": 0, "returned": 50, "hasMore": true }
}
// Errors are always explicit — never silent empty responses
{
"error": { "code": "rate_limited", "message": "Rate limit exceeded. Maximum 60 requests per minute." }
}Endpoints
/api/v1/leadsList leads. Filters: status, campaignId, search/api/v1/leads/:idGet one lead/api/v1/leadsCreate a lead (409 on duplicate phone)/api/v1/leads/:idUpdate lead fields (firstName, lastName, email, phone, status, tags, notes, smsOptIn...)/api/v1/leads/:id/callQueue an AI call to the lead (respects business hours, daily limits, and plan minutes)/api/v1/callsList calls with transcript, summary, and callResult. Filter: contactId/api/v1/smsList SMS messages. Filters: contactId, direction/api/v1/appointmentsList appointments. Filter: contactId/api/v1/campaignsList campaigns/api/v1/campaigns/:id/leadsAdd a lead to a campaign (body: { leadId })Examples
List interested leads
curl "https://thevoicecrm.com/api/v1/leads?limit=25&offset=0&status=interested" \
-H "X-API-Key: YOUR_API_KEY"Create a lead in a campaign
curl -X POST https://thevoicecrm.com/api/v1/leads \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "firstName": "Jane", "lastName": "Doe", "phone": "+14165551234", "campaignId": "CAMPAIGN_ID" }'Trigger an AI call
curl -X POST https://thevoicecrm.com/api/v1/leads/LEAD_ID/call \
-H "X-API-Key: YOUR_API_KEY"Outbound Webhooks
Configure webhook endpoints in Settings → Integrations to receive real-time events. All payloads are signed with HMAC-SHA256.
Available events
lead.created— New lead addedlead.updated— Lead fields changedlead.status_changed— Lead status movedcall.completed— Call ended (any outcome)appointment.booked— Appointment scheduled by the AIsms.received— Inbound SMS receiveddeal.created/deal.won— Deal pipeline events
Example payload
{
"event": "call.completed",
"timestamp": "2026-04-18T15:30:00Z",
"data": {
"callId": "call_abc123",
"leadId": "lead_xyz789",
"duration": 187,
"outcome": "appointment_booked",
"qaScore": 92,
"transcript": "...",
"recordingUrl": "https://..."
}
}Verifying signatures (Node.js)
import crypto from "crypto";
function verifyWebhook(rawBody, signature, secret) {
const expected = crypto
.createHmac("sha256", secret)
.update(rawBody)
.digest("hex");
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expected)
);
}
// In your Express handler (use the RAW request body, not re-serialized JSON):
app.post("/your-webhook-endpoint", express.raw({ type: "application/json" }), (req, res) => {
const signature = req.headers["x-webhook-signature"];
if (!verifyWebhook(req.body, signature, process.env.WEBHOOK_SECRET)) {
return res.status(401).send("Invalid signature");
}
const event = JSON.parse(req.body);
// Process event.event / event.data ...
res.json({ ok: true });
});Every request includes X-Webhook-Signature (HMAC-SHA256 of the raw body with your subscription's secret), X-Webhook-Event, and X-Webhook-Id headers. Failed deliveries are retried immediately (3 quick attempts), then handed to a durable retry queue with exponential backoff (5 more attempts over ~24 hours). Every attempt is visible in the delivery log in Settings → Integrations → Outbound Webhooks. After 10 consecutive failures a webhook is auto-disabled.
Zapier & Make Setup
Receive VoiceCRM events in Zapier (trigger)
- In Zapier, create a Zap with trigger Webhooks by Zapier → Catch Hook and copy the hook URL.
- In VoiceCRM, go to Settings → Integrations → Outbound Webhooks, add a webhook with that URL and pick your events (e.g.
call.completed,appointment.booked). - Trigger a test event (create a lead or complete a call), then map the
datafields in Zapier to Google Sheets, Slack, Gmail — anything.
Push data into VoiceCRM from Zapier (action)
- Add an action Webhooks by Zapier → Custom Request.
- Method
POST, URLhttps://thevoicecrm.com/api/v1/leads, headerX-API-Key: YOUR_API_KEY. - JSON body with mapped fields:
firstName,phone, optionalcampaignIdto drop the lead straight into an AI calling campaign. - Optionally add a second Custom Request to
POST /api/v1/leads/{{leadId}}/callto dial immediately.
Make (Integromat)
- Incoming events: use the Webhooks → Custom webhook module, paste its URL into a VoiceCRM outbound webhook the same way as Zapier.
- Outgoing requests: use the HTTP → Make a request module with the same URL, header, and JSON body shown above.
No marketplace app needed — everything works with Zapier's and Make's built-in webhook/HTTP modules plus your API key.
Errors & Rate Limits
All v1 errors return JSON with an error object containing a machine-readable code and a human message:
{ "error": { "code": "validation_error", "message": "Phone number must include area code (at least 10 digits)." } }Need higher limits? Contact us