Skip to content

Developer API

The LeadJourney REST API

The REST API behind the LeadJourney Zapier integration. Read your data and push leads, conversions, and tags into a workspace.

  • https://api.leadjourney.io/api
  • Bearer token auth
  • JSON envelope
  • 17 endpoints

Getting started

Four things to know before the first request

Where to send requests, how to authenticate them, how workspaces scope them and what comes back. Then one call you can paste into a terminal.

Base URL

https://api.leadjourney.io/api

Every path in the reference is relative to it.

Authentication

Send your token as a Bearer credential on every request:

Authorization: Bearer YOUR_TOKEN

Create a token in LeadJourney under Settings, then API and Integrations.

Workspaces

Most endpoints are scoped to a workspace via the {workspace} path parameter. List available workspaces with GET /v1/profile/workspaces.

Response format

Successful responses are wrapped in an envelope:

{ "success": true, "data": { ... } }

Errors return a non-2xx status with a message field.

Quick start

Your first call: fetch the user that owns the token. It is the same request the Zapier integration makes to validate a connection.

Request
curl -H "Authorization: Bearer YOUR_TOKEN" https://api.leadjourney.io/api/v1/profile
200 OK
{
  "success": true,
  "data": {
    "user": {
      "id": "9b1c0e2a-3f4d-4a6b-8c7e-1d2f3a4b5c6d",
      "email": "[email protected]",
      "has_verified_email": true,
      "current_workspace_id": "2f8a1b3c-4d5e-6f70-8192-a3b4c5d6e7f8"
    },
    "has_verified_email": true,
    "profile": {
      "first_name": "Jamie",
      "last_name": "Rivera",
      "company_name": "Acme Inc.",
      "phone": "+15551234567"
    },
    "user_hash": "a1b2c3d4e5f6"
  }
}

Account

Identify the authenticated token and list the workspaces it can act on.

GET/v1/profile

Get the authenticated user

Returns the user that owns the API token. Used to validate a connection.

Requires Bearer token

Example response

200 OK
{
  "success": true,
  "data": {
    "user": {
      "id": "9b1c0e2a-3f4d-4a6b-8c7e-1d2f3a4b5c6d",
      "email": "[email protected]",
      "has_verified_email": true,
      "current_workspace_id": "2f8a1b3c-4d5e-6f70-8192-a3b4c5d6e7f8"
    },
    "has_verified_email": true,
    "profile": {
      "first_name": "Jamie",
      "last_name": "Rivera",
      "company_name": "Acme Inc.",
      "phone": "+15551234567"
    },
    "user_hash": "a1b2c3d4e5f6"
  }
}
GET/v1/profile/workspaces

List accessible workspaces

Lists every workspace the token can act on. The workspace id is used in the path of all workspace-scoped endpoints.

Requires Bearer token

Example response

200 OK
{
  "success": true,
  "data": {
    "workspaces": [
      {
        "id": "2f8a1b3c-4d5e-6f70-8192-a3b4c5d6e7f8",
        "name": "Acme Marketing",
        "role": "owner",
        "has_full_access": true,
        "onboarding_required": false,
        "tracking_v2_enabled": true,
        "trial": {
          "is_on_trial": false,
          "trial_expired": false,
          "trial_ends_at": null,
          "has_subscription": true
        }
      }
    ]
  }
}

Conversions & leads

Read conversion types and push leads or revenue conversions into a workspace.

GET/v1/workspaces/{workspace}/conversions

List conversion types

Returns the conversion types defined in the workspace.

Requires Bearer token

Path parameters

workspaceuuid
required

Workspace id.

Example response

200 OK
{
  "success": true,
  "data": {
    "conversions": [
      {
        "id": "7c9e6a1b-2d3f-4051-8627-a8b9c0d1e2f3",
        "type": "Purchase",
        "default_key": null,
        "category": "Sales",
        "mode": 1,
        "send_to_ads": true,
        "include_revenue": true,
        "include_personal_details": false,
        "created_at": "2026-05-01T10:15:00Z",
        "events_count": 128,
        "latest_event_at": "2026-06-08T19:02:11Z"
      }
    ]
  }
}
POST/v1/workspaces/{workspace}/conversions

Create a conversion type

Creates a new conversion type in the workspace.

Requires Bearer token

Path parameters

workspaceuuid
required

Workspace id.

Request body

typestring
required

Conversion type name. Minimum 2 characters, unique per workspace.

modeinteger
required

Handling mode: 1 = create, 2 = ignore, 3 = edit, 4 = keep.

Allowed: 1, 2, 3, 4

send_to_adsboolean
optional

Forward matching conversions to connected ad platforms.

descriptionstring
optional

Free-text description. Max 255 characters.

categorystring
optional

Optional grouping category. Max 100 characters.

include_revenueboolean
optional

Whether conversions of this type carry revenue.

include_personal_detailsboolean
optional

Whether personal details are captured with this conversion.

Example response

200 OK
{
  "success": true
}
POST/v1/workspaces/{workspace}/conversions/track

Track a conversion

Records a conversion event against a lead. The lead is resolved by click_id, then email, then phone, creating a synthetic lead when none matches. Provide a type to record a conversion, or a tag to only apply a webhook tag.

Requires Bearer token

Path parameters

workspaceuuid
required

Workspace id.

Request body

click_iduuid
conditional

LeadJourney click id. One of click_id, email, or phone is required.

emailstring
conditional

Lead email. Max 255 characters.

phonestring
conditional

Lead phone. Max 50 characters.

typestring
conditional

Conversion type name. Required unless a tag is provided.

revenuestring
conditional

Revenue amount. Required when the conversion type carries revenue.

cash_collectedstring
optional

Cash collected amount.

currencystring
optional

ISO 4217 currency code (3 letters), e.g. USD.

first_namestring
optional

First name. Max 255 characters.

last_namestring
optional

Last name. Max 255 characters.

full_namestring
optional

Full name. Split into first/last when those are absent. Max 511 characters.

tagstring
optional

Tag name to apply when no conversion type is sent. Max 50 characters.

zipstring
optional

Postal code. Max 20 characters.

custom_fieldsobject
optional

Key-value pairs validated against the workspace custom fields.

At least one of click_id, email, or phone must identify the lead.

Example response

200 OK
{
  "success": true
}
POST/v1/workspaces/{workspace}/conversions/track-lead

Track a lead

Captures a lead's identity without a revenue conversion, using the workspace default lead conversion. Resolution and de-duplication run downstream.

Requires Bearer token

Path parameters

workspaceuuid
required

Workspace id.

Request body

click_iduuid
conditional

LeadJourney click id. One of click_id, email, or phone is required.

emailstring
conditional

Lead email. Max 255 characters.

phonestring
conditional

Lead phone. Max 50 characters.

first_namestring
optional

First name. Max 255 characters.

last_namestring
optional

Last name. Max 255 characters.

full_namestring
optional

Full name. Split into first/last when those are absent. Max 511 characters.

zipstring
optional

Postal code. Max 20 characters.

At least one of email, phone, or click_id must be provided.

Example response

200 OK
{
  "success": true
}

Tags

Manage tags and apply them to individual leads.

GET/v1/workspaces/{workspace}/tags

List tags

Returns the tags defined in the workspace, with their rules.

Requires Bearer token

Path parameters

workspaceuuid
required

Workspace id.

Example response

200 OK
{
  "success": true,
  "data": {
    "tags": [
      {
        "id": "a1f2e3d4-5c6b-7a89-90b1-c2d3e4f5a6b7",
        "name": "Newsletter",
        "type": "source",
        "color": "#03c879",
        "rules": [],
        "created_at": "2026-04-12T08:00:00Z",
        "updated_at": "2026-04-12T08:00:00Z"
      }
    ]
  }
}
POST/v1/workspaces/{workspace}/tags

Create a tag

Creates a tag, optionally with auto-apply rules.

Requires Bearer token

Path parameters

workspaceuuid
required

Workspace id.

Request body

namestring
required

Tag name. 1 to 50 characters.

typestring
required

Tag type.

Allowed: source, entry, action, lead, lead_type, product, funnel

colorstring
optional

Hex color (#RRGGBB). Defaults to #03c879.

rule_logicstring
optional

How rules combine. Defaults to and.

Allowed: and, or

rulesarray
optional

Auto-apply rules. Each rule has field (entry_page | entry_full_url | referrer_domain), operator (contains | equals | starts_with | ends_with | not_contains), value, optional timing (anytime | before_conversion), timing_event, and is_active.

apply_to_existingboolean
optional

Apply the tag to existing leads matching the rules.

Example response

200 OK
{
  "success": true,
  "data": {
    "tag": {
      "id": "a1f2e3d4-5c6b-7a89-90b1-c2d3e4f5a6b7",
      "name": "VIP",
      "type": "lead",
      "color": "#03c879",
      "rules": [],
      "created_at": "2026-06-09T12:00:00Z",
      "updated_at": "2026-06-09T12:00:00Z"
    }
  }
}
POST/v1/workspaces/{workspace}/zapier/leads/{lead}/tags/{tag}

Apply a tag to a lead

Attaches an existing tag to an existing lead.

Requires Bearer token

Path parameters

workspaceuuid
required

Workspace id.

leaduuid
required

Lead id.

taguuid
required

Tag id.

Example response

200 OK
{
  "success": true,
  "data": {
    "message": "Tag assigned successfully"
  }
}

Custom fields

Read and create the custom fields stored on each lead.

GET/v1/workspaces/{workspace}/custom-fields

List custom fields

Returns the custom fields defined in the workspace.

Requires Bearer token

Path parameters

workspaceuuid
required

Workspace id.

Example response

200 OK
{
  "success": true,
  "data": {
    "custom_fields": [
      {
        "id": 14,
        "name": "Plan",
        "key": "plan",
        "type": "text",
        "available_in_reports": true,
        "is_default": false,
        "is_locked": false,
        "sort_order": 3,
        "created_at": "2026-03-20T09:30:00Z",
        "updated_at": "2026-03-20T09:30:00Z"
      }
    ]
  }
}
POST/v1/workspaces/{workspace}/custom-fields

Create a custom field

Creates a custom field. Up to 50 user-defined fields per workspace.

Requires Bearer token

Path parameters

workspaceuuid
required

Workspace id.

Request body

namestring
required

Display name. 1 to 80 characters.

typestring
required

Field data type.

Allowed: text, number, currency

keystring
optional

Webhook key (lowercase, starts with a letter, max 64, unique). Auto-generated from name when omitted.

available_in_reportsboolean
optional

Show the field in reports. Defaults to true.

Example response

200 OK
{
  "success": true,
  "data": {
    "custom_field": {
      "id": 21,
      "name": "Plan",
      "key": "plan",
      "type": "text",
      "available_in_reports": true,
      "is_default": false,
      "is_locked": false,
      "sort_order": 4,
      "created_at": "2026-06-09T12:00:00Z",
      "updated_at": "2026-06-09T12:00:00Z"
    }
  }
}

Lead lookup

Find a single lead by click id, email, or phone.

GET/v1/workspaces/{workspace}/zapier/leads/find

Find a lead

Looks up a single lead by click id, email, or phone. Returns null in data.lead when no match is found.

Requires Bearer token

Path parameters

workspaceuuid
required

Workspace id.

Query parameters

click_idstring
optional

LeadJourney click id. One of click_id, email, or phone is required.

emailstring
optional

Lead email.

phonestring
optional

Lead phone.

Example response

200 OK
{
  "success": true,
  "data": {
    "lead": {
      "id": "5d6e7f80-1a2b-3c4d-5e6f-708192a3b4c5",
      "click_id": "0c1d2e3f-4a5b-6c7d-8e9f-a0b1c2d3e4f5",
      "email": "[email protected]",
      "phone": null,
      "first_name": "Sam",
      "last_name": "Lee",
      "created_at": "2026-06-01T14:22:00Z",
      "revenue": 199,
      "conversions_count": 2,
      "first_source": "google",
      "last_source": "email",
      "status": "converted",
      "tags": [
        {
          "id": "a1f2e3d4-5c6b-7a89-90b1-c2d3e4f5a6b7",
          "name": "Newsletter",
          "color": "#03c879",
          "type": "source",
          "source": "rule"
        }
      ],
      "custom_fields": {
        "plan": "pro"
      }
    }
  }
}

Webhooks (REST hooks)

Subscribe and unsubscribe webhook targets. Zapier uses these to power instant triggers.

POST/v1/workspaces/{workspace}/zapier/subscriptions

Create a webhook subscription

Registers a target URL to receive events. The response id is used to unsubscribe.

Requires Bearer token

Path parameters

workspaceuuid
required

Workspace id.

Request body

eventstring
required

Event to subscribe to.

Allowed: lead.created, conversion.created, click.created

target_urlstring
required

HTTPS URL that receives the event payload. Max 2048 characters.

Example response

200 OK
{
  "success": true,
  "data": {
    "id": "9f8e7d6c-5b4a-3210-fedc-ba9876543210"
  }
}
DELETE/v1/workspaces/{workspace}/zapier/subscriptions/{subscription}

Delete a webhook subscription

Removes a webhook subscription by id.

Requires Bearer token

Path parameters

workspaceuuid
required

Workspace id.

subscriptionuuid
required

Subscription id returned when it was created.

Example response

200 OK
{
  "success": true
}

Recent items (polling)

Most recent items per type. Used for trigger sample data and as a polling fallback.

GET/v1/workspaces/{workspace}/zapier/recent/leads

Recent leads

Returns the most recent leads. Used for trigger sample data and polling.

Requires Bearer token

Path parameters

workspaceuuid
required

Workspace id.

Example response

200 OK
{
  "success": true,
  "data": {
    "leads": [
      {
        "id": "5d6e7f80-1a2b-3c4d-5e6f-708192a3b4c5",
        "click_id": "0c1d2e3f-4a5b-6c7d-8e9f-a0b1c2d3e4f5",
        "email": "[email protected]",
        "phone": null,
        "first_name": "Sam",
        "last_name": "Lee",
        "created_at": "2026-06-08T14:22:00Z",
        "revenue": 199,
        "conversions_count": 2,
        "first_source": "google",
        "last_source": "email",
        "status": "converted",
        "tags": []
      }
    ]
  }
}
GET/v1/workspaces/{workspace}/zapier/recent/conversions

Recent conversions

Returns the most recent conversion events.

Requires Bearer token

Path parameters

workspaceuuid
required

Workspace id.

Example response

200 OK
{
  "success": true,
  "data": {
    "conversions": [
      {
        "id": "11223344-5566-7788-99aa-bbccddeeff00",
        "click_id": "0c1d2e3f-4a5b-6c7d-8e9f-a0b1c2d3e4f5",
        "email": "[email protected]",
        "phone": null,
        "conversion_type": "Purchase",
        "revenue": 199,
        "currency": "USD",
        "first_name": "Sam",
        "last_name": "Lee",
        "created_at": "2026-06-08T15:10:00Z"
      }
    ]
  }
}
GET/v1/workspaces/{workspace}/zapier/recent/clicks

Recent clicks

Returns the most recent click and pageview events.

Requires Bearer token

Path parameters

workspaceuuid
required

Workspace id.

Example response

200 OK
{
  "success": true,
  "data": {
    "clicks": [
      {
        "id": "aa00bb11-cc22-dd33-ee44-ff5566778899",
        "click_id": "0c1d2e3f-4a5b-6c7d-8e9f-a0b1c2d3e4f5",
        "entry_page": "/pricing",
        "entry_full_url": "https://acme.com/pricing?utm_source=email",
        "referer": "https://mail.google.com/",
        "source": "email",
        "campaign": "june-newsletter",
        "created_at": "2026-06-08T13:05:00Z"
      }
    ]
  }
}