curl --request POST \
--url https://octanist.com/api/leads \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"name": "John Doe",
"email": "john@example.com",
"phone": "+1234567890",
"custom": "<string>",
"note": "<string>",
"website": "https://example.com",
"path": "/contact",
"gclid": "<string>",
"fbc": "<string>",
"fbp": "<string>",
"ga4cid": "<string>",
"ga4sid": "<string>",
"li_fat_id": "<string>",
"msclkid": "<string>",
"ttclid": "<string>",
"twclid": "<string>",
"rdt_cid": "<string>",
"sccid": "<string>",
"utm_source": "google",
"utm_medium": "cpc",
"utm_campaign": "<string>",
"ad_storage": false,
"ad_user_data": false,
"ad_personalization": false,
"analytics_storage": false
}
'{
"success": true,
"data": {
"id": "lead_abc123",
"message": "Lead added"
},
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}Create a new lead
curl --request POST \
--url https://octanist.com/api/leads \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"name": "John Doe",
"email": "john@example.com",
"phone": "+1234567890",
"custom": "<string>",
"note": "<string>",
"website": "https://example.com",
"path": "/contact",
"gclid": "<string>",
"fbc": "<string>",
"fbp": "<string>",
"ga4cid": "<string>",
"ga4sid": "<string>",
"li_fat_id": "<string>",
"msclkid": "<string>",
"ttclid": "<string>",
"twclid": "<string>",
"rdt_cid": "<string>",
"sccid": "<string>",
"utm_source": "google",
"utm_medium": "cpc",
"utm_campaign": "<string>",
"ad_storage": false,
"ad_user_data": false,
"ad_personalization": false,
"analytics_storage": false
}
'{
"success": true,
"data": {
"id": "lead_abc123",
"message": "Lead added"
},
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}name, email, phone, or custom must be provided.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | No* | - | Lead name |
email | string | No* | - | Lead email |
phone | string | No* | - | Lead phone number |
custom | string | object | No* | - | Custom data. Accepts a string or JSON object/array. Non-string values are automatically stringified. Always returned as a string in responses. |
note | string | No | - | Note to attach to the lead |
website | string | No | - | Website URL |
path | string | No | - | Page path |
gclid | string | No | - | Google Ads Click ID |
fbc | string | No | - | Meta (Facebook) Click ID |
fbp | string | No | - | Meta (Facebook) Browser ID |
ga4cid | string | No | - | Google Analytics 4 Client ID |
ga4sid | string | No | - | Google Analytics 4 Session ID |
li_fat_id | string | No | - | LinkedIn Click ID |
msclkid | string | No | - | Microsoft Ads Click ID |
ttclid | string | No | - | TikTok Click ID |
twclid | string | No | - | X (Twitter) Click ID |
rdt_cid | string | No | - | Reddit Click ID |
sccid | string | No | - | Snapchat Click ID |
utm_source | string | No | - | UTM source |
utm_medium | string | No | - | UTM medium |
utm_campaign | string | No | - | UTM campaign |
ad_storage | boolean | string | No | false | Ad storage consent |
ad_user_data | boolean | string | No | false | Ad user data consent |
ad_personalization | boolean | string | No | false | Ad personalization consent |
analytics_storage | boolean | string | No | false | Analytics storage consent |
name, email, phone, or custom is required.
Consent fields accept both booleans and strings. Only the string "true" (case-insensitive) is treated as true; any other string value is treated as false.
curl -X POST \
-H "X-API-KEY: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "John Doe",
"email": "john@example.com",
"phone": "+1234567890",
"gclid": "abc123",
"utm_source": "google",
"utm_medium": "cpc",
"ad_storage": true,
"ad_user_data": true
}' \
"https://octanist.com/api/leads"
{
"success": true,
"data": {
"id": "lead_abc123",
"message": "Lead added"
},
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}
| Status | Code | Description |
|---|---|---|
| 400 | VALIDATION_ERROR | Invalid JSON, missing required field, or invalid field values |
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 403 | FORBIDDEN | Lead rejected by filtering rules |
| 500 | INTERNAL_ERROR | Server error |
API key for authentication
Lead data. At least one of name, email, phone, or custom is required.
At least one of name, email, phone, or custom is required.
Lead name
"John Doe"
Lead email
"john@example.com"
Lead phone number
"+1234567890"
Custom data. Accepts a string or JSON object/array. Non-string values are automatically stringified. Always returned as a string in responses.
Note to attach to the lead
Website URL
"https://example.com"
Page path
"/contact"
Google Ads Click ID
Meta (Facebook) Click ID
Meta (Facebook) Browser ID
Google Analytics 4 Client ID
Google Analytics 4 Session ID
LinkedIn Click ID
Microsoft Ads Click ID
TikTok Click ID
X (Twitter) Click ID
Reddit Click ID
Snapchat Click ID
UTM source
"google"
UTM medium
"cpc"
UTM campaign
Ad storage consent. Accepts booleans or strings; only "true" (case-insensitive) is treated as true.
Ad user data consent. Accepts booleans or strings; only "true" (case-insensitive) is treated as true.
Ad personalization consent. Accepts booleans or strings; only "true" (case-insensitive) is treated as true.
Analytics storage consent. Accepts booleans or strings; only "true" (case-insensitive) is treated as true.