Skip to main content
GET
/
api
/
leads
Get Leads
curl --request GET \
  --url https://octanist.com/api/leads \
  --header 'X-API-KEY: <api-key>'
[
  {
    "id": "lead_123",
    "name": "John Doe",
    "email": "john@example.com",
    "phone": "+1234567890",
    "status": "open",
    "value": 5000,
    "currency": "USD",
    "note": "Interested in premium plan",
    "conversionName": "Contact Form",
    "gclid": "abc123",
    "fbc": "fb.1.123456789",
    "fbp": "fb.1.987654321",
    "ga4cid": "ga4_client_id",
    "ga4sid": "ga4_session_id",
    "li_fat_id": "linkedin_id",
    "msclkid": "microsoft_click_id",
    "utm_source": "google",
    "utm_medium": "cpc",
    "utm_campaign": "summer_sale",
    "website": "https://example.com",
    "path": "/pricing",
    "custom": "{\"custom_field\": \"value\"}",
    "createdAt": "2024-01-15T10:30:00Z",
    "updatedAt": "2024-01-16T14:20:00Z",
    "qualifiedAt": "2024-01-15T11:00:00Z"
  }
]
Retrieve a list of leads with optional filtering and sorting. Perfect for polling integrations like Zapier.

Query Parameters

  • status (optional): Filter by lead status (open, win, or lost)
  • updated_after (optional): ISO 8601 date string. Returns leads updated after this date
  • sort (optional): Sort order (updated_at:desc or updated_at:asc, default: updated_at:desc)
  • limit (optional): Number of leads to return (1-100, default: 100)

Example Usage

Get all open leads

curl -X GET "https://octanist.com/api/leads?status=open" \
  -H "X-API-KEY: your_api_key_here"

Poll for recently updated leads (Zapier trigger)

curl -X GET "https://octanist.com/api/leads?updated_after=2024-01-15T10:00:00Z&sort=updated_at:asc" \
  -H "X-API-KEY: your_api_key_here"

Response Fields

Each lead object contains comprehensive tracking data including:
  • Basic Info: id, name, email, phone, status, value, currency, note
  • Attribution: gclid, fbc, fbp, ga4cid, ga4sid, li_fat_id, msclkid
  • UTM Parameters: utm_source, utm_medium, utm_campaign
  • Context: website, path, conversionName
  • Timestamps: createdAt, updatedAt, qualifiedAt
  • Custom Data: custom (JSON string)

Authorizations

X-API-KEY
string
header
required

API key for authentication

Query Parameters

status
enum<string>

Filter by lead status

Available options:
open,
win,
lost
updated_after
string<date-time>

ISO 8601 date string. Returns leads updated after this date

Example:

"2024-01-15T10:30:00Z"

sort
enum<string>
default:updated_at:desc

Sort order

Available options:
updated_at:desc,
updated_at:asc
limit
integer
default:100

Number of leads to return

Required range: 1 <= x <= 100

Response

List of leads

id
string

Unique lead identifier

Example:

"lead_123"

name
string

Lead name

Example:

"John Doe"

email
string<email>

Lead email

Example:

"john@example.com"

phone
string

Lead phone number

Example:

"+1234567890"

status
enum<string>

Lead status

Available options:
open,
win,
lost
Example:

"open"

value
number

Lead value

Example:

5000

currency
string

Currency code

Example:

"USD"

note
string

Notes about the lead

Example:

"Interested in premium plan"

conversionName
string

Conversion source name

Example:

"Contact Form"

gclid
string

Google Click ID

Example:

"abc123"

fbc
string

Facebook Click ID

Example:

"fb.1.123456789"

fbp
string

Facebook Browser ID

Example:

"fb.1.987654321"

ga4cid
string

Google Analytics 4 Client ID

Example:

"ga4_client_id"

ga4sid
string

Google Analytics 4 Session ID

Example:

"ga4_session_id"

li_fat_id
string

LinkedIn First-Party Ad Tracking ID

Example:

"linkedin_id"

msclkid
string

Microsoft Click ID

Example:

"microsoft_click_id"

utm_source
string

UTM source parameter

Example:

"google"

utm_medium
string

UTM medium parameter

Example:

"cpc"

utm_campaign
string

UTM campaign parameter

Example:

"summer_sale"

website
string

Referrer website

Example:

"https://example.com"

path
string

Page path where lead was captured

Example:

"/pricing"

custom
string

Custom JSON string for additional data

Example:

"{\"custom_field\": \"value\"}"

createdAt
string<date-time>

Lead creation timestamp

Example:

"2024-01-15T10:30:00Z"

updatedAt
string<date-time>

Lead last update timestamp

Example:

"2024-01-16T14:20:00Z"

qualifiedAt
string<date-time>

Lead qualification timestamp

Example:

"2024-01-15T11:00:00Z"