v1
latestOpenAPI 3.0.12026-08-0671048.4 KBLeads
Create Lead
Create a new lead. At least one of externalId, name, email, phone, or custom must be provided. An external ID is unique within the organization and acts as an idempotency key. Replays return the existing lead unless supplied email or phone data conflicts. Send sessionId to link the lead to an existing Octanist pixel session. When sessionId is provided, direct attribution fields in the same request are not merged into the existing session.
post/api/leads
Request body
Example request
{
"externalId": "QUOTE-2026-0042",
"name": "John Doe",
"email": "john@example.com",
"phone": "+1234567890",
"sessionId": "550e8400-e29b-41d4-a716-446655440000",
"website": "https://example.com",
"path": "/contact",
"utm_source": "google",
"utm_medium": "cpc"
}Response
Existing lead returned for an idempotent external ID replay
Example response
{
"success": true,
"data": {
"id": "lead_abc123",
"externalId": "QUOTE-2026-0042",
"message": "Existing lead returned"
},
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}