Back to top

API Documentation

Lead Channel

Overview

A LeadChannel represents an endpoint through which leads are captured and routed

Field Type Association Description
id uuid Internal identifier of the lead channel
brand uuid Brand to which this lead channel belongs
created_at number Timestamp of when this lead channel was created
updated_at number Timestamp of when this lead channel was last updated
deleted_at number Timestamp of when this lead channel was deleted (if applicable)
capture_number number Number of leads captured by this channel so far
last_capture_date number Timestamp of the most recent lead captured
mls string[] List of code names of relevant MLS to search for listings mentioned by incoming leads
notify boolean Whether notifications are enabled for this channel
notify_users uuid[] List of user identifiers who should receive notifications
is_default boolean Whether this lead channel is the default lead channel for the brand

Get Lead Channel of brand

Get Lead Channel of brand
GET/brands/:brand/leads/channels

brand (uuid) ID of the brand

Example URI

GET /brands/:brand/leads/channels
URI Parameters
HideShow
brand
string (required) Example: 407e304d-b3c7-4f69-809d-385779dadc84
Response  200
HideShow
Body
{
  "code": "OK",
  "data": [
    {
      "id": "06f518eb-562f-4249-ac5d-54a3e2db3549",
      "name": "Default Route",
      "brand": "407e304d-b3c7-4f69-809d-385779dadc84",
      "capture_number": 0,
      "mls": null,
      "notify": true,
      "notify_users": [],
      "is_default": true,
      "type": "lead_channel",
      "created_at": 1760470049.709683,
      "updated_at": 1760470049.709686,
      "deleted_at": null,
      "last_capture_date": null,
      "rules_count": "1",
      "title": null
    },
    {
      "id": "c5faa8c4-1dcd-4eb2-8df3-91b0486b0ab0",
      "name": null,
      "brand": "407e304d-b3c7-4f69-809d-385779dadc84",
      "capture_number": 0,
      "mls": null,
      "notify": true,
      "notify_users": [],
      "is_default": false,
      "type": "lead_channel",
      "created_at": 1760470049.785035,
      "updated_at": 1760470049.785037,
      "deleted_at": null,
      "last_capture_date": null,
      "rules_count": "1",
      "title": null
    }
  ],
  "info": {
    "count": 2,
    "total": 2
  }
}

Create a Lead Channel

Create a Lead Channel
POST/brands/:brand/leads/channels

Example URI

POST /brands/:brand/leads/channels
URI Parameters
HideShow
brand
string (required) Example: 407e304d-b3c7-4f69-809d-385779dadc84
Request
HideShow
Body
{
  "protocol": "JSON"
}
Response  200
HideShow
Body
{
  "code": "OK",
  "data": {
    "id": "c5faa8c4-1dcd-4eb2-8df3-91b0486b0ab0",
    "name": null,
    "brand": "407e304d-b3c7-4f69-809d-385779dadc84",
    "capture_number": 0,
    "mls": null,
    "notify": true,
    "notify_users": [],
    "is_default": false,
    "type": "lead_channel",
    "created_at": 1760470049.785035,
    "updated_at": 1760470049.785037,
    "deleted_at": null,
    "last_capture_date": null,
    "rules_count": "1",
    "title": null
  }
}

Delete a Lead Channel

Delete a Lead Channel
DELETE/brands/:brand/leads/channels/:leadChannelId

Example URI

DELETE /brands/:brand/leads/channels/:leadChannelId
URI Parameters
HideShow
brand
string (required) Example: 407e304d-b3c7-4f69-809d-385779dadc84
channel
string (required) Example: c5faa8c4-1dcd-4eb2-8df3-91b0486b0ab0
Request
HideShow
Body
{
  "brand": "39308d51-6e72-42e4-9786-8ce407f15b18"
}
Response  204

Update a Lead Channel

Update a Lead Channel
PUT/brands/:brand/leads/channels/:leadChannelId

Example URI

PUT /brands/:brand/leads/channels/:leadChannelId
URI Parameters
HideShow
brand
string (required) Example: 407e304d-b3c7-4f69-809d-385779dadc84
channel
string (required) Example: c5faa8c4-1dcd-4eb2-8df3-91b0486b0ab0
Request
HideShow
Body
{
  "name": "New Name"
}
Response  200
HideShow
Body
{
  "code": "OK",
  "data": {
    "id": "c5faa8c4-1dcd-4eb2-8df3-91b0486b0ab0",
    "name": "New Name",
    "brand": "407e304d-b3c7-4f69-809d-385779dadc84",
    "capture_number": 0,
    "mls": null,
    "notify": true,
    "notify_users": [],
    "is_default": false,
    "type": "lead_channel",
    "created_at": 1760470049.785035,
    "updated_at": 1760470049.008176,
    "deleted_at": null,
    "last_capture_date": null,
    "rules_count": "1",
    "title": null
  }
}

Rule

Overview

Rule

A LeadChannelRule determines how leads are routed based on specified conditions.

Field Type Association Description
id uuid Internal identifier of the lead routing rule
created_at number Timestamp of when this rule was created
updated_at number Timestamp of when this rule was last updated
created_by uuid User who created this rule
kind ‘AND’ | ‘OR’ Logical operator for combining conditions (AND or OR)
is_default boolean Whether this rule is the default rule for the channel
order number Order of this rule in the routing sequence
conditions uuid[] lead_channel_rule.conditions List of condition identifiers associated with this rule
flow uuid | null lead_channel_rule.flow Identifier of the flow to enroll leads into (if applicable)
target ‘Group’ | ‘User’ | ‘Brand’ Type of target entity this rule applies to
group uuid | null lead_channel_rule.group Identifier of the group (if target is ‘Group’)
user uuid | null lead_channel_rule.user Identifier of the user (if target is ‘User’)
brand uuid | null lead_channel_rule.brand Identifier of the brand (if target is ‘Brand’ or ‘User’)

RuleCondition

A LeadChannelRuleCondition specifies a single criterion used to evaluate and filter leads.

Field Type Association Description
id uuid Internal identifier of the condition
created_at number Timestamp of when this condition was created
order number Order of this condition in the rule’s conditions sequence
field string Field name to be evaluated
operator ‘eq’ | ‘any’ | ‘all’ | ‘gte’ | ‘lte’ Operator to be used for evaluation
value any Value against which the field will be evaluated
negated boolean Whether to negate the condition’s evaluation

Create a lead channel rule

Create a lead channel rule
POST/brands/:brand/leads/channels/:id/rules

Example URI

POST /brands/:brand/leads/channels/:id/rules
URI Parameters
HideShow
brand
string (required) Example: 407e304d-b3c7-4f69-809d-385779dadc84
channel
string (required) Example: c5faa8c4-1dcd-4eb2-8df3-91b0486b0ab0
associations
string (required) Example: lead_channel_rule.conditions,lead_channel_rule.brand,lead_channel_rule.user
Request
HideShow
Body
{
  "target": "User",
  "kind": "AND",
  "order": 1,
  "flow": null,
  "user": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
  "brand": "407e304d-b3c7-4f69-809d-385779dadc84",
  "conditions": [
    {
      "field": "price",
      "operator": "gte",
      "value": 500000,
      "order": 1
    }
  ]
}
Response  200
HideShow
Body
{
  "code": "OK",
  "data": {
    "id": "d643ce06-57e8-4a23-b599-17835a0f45bc",
    "created_at": 1760470049.008176,
    "updated_at": 1760470049.008176,
    "deleted_at": null,
    "created_by": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
    "channel": "c5faa8c4-1dcd-4eb2-8df3-91b0486b0ab0",
    "kind": "AND",
    "order": 1,
    "target": "User",
    "user": {
      "type": "user",
      "username": null,
      "first_name": "Unit",
      "last_name": "Test",
      "email": "[email protected]",
      "phone_number": "+4368120265807",
      "created_at": 1493115498.770362,
      "id": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
      "address_id": null,
      "cover_image_url": null,
      "profile_image_url": null,
      "updated_at": 1493115498.770744,
      "user_status": "Active",
      "profile_image_thumbnail_url": null,
      "cover_image_thumbnail_url": null,
      "email_confirmed": true,
      "timezone": "America/Chicago",
      "user_type": "Admin",
      "deleted_at": null,
      "phone_confirmed": false,
      "is_shadow": false,
      "personal_room": null,
      "brand": null,
      "fake_email": false,
      "features": [
        "Deals"
      ],
      "last_seen_at": null,
      "email_signature": null,
      "daily_enabled": false,
      "email_quota": 30000,
      "website": null,
      "instagram": null,
      "twitter": null,
      "linkedin": null,
      "youtube": null,
      "facebook": null,
      "designation": null,
      "tiktok": null,
      "mfa_enabled": false,
      "xpressdocs_user_id": null,
      "current_time": "2:27 PM - Tuesday Oct 14, 2025",
      "push_allowed": true,
      "agents": null,
      "last_seen_type": null,
      "active_brand": "39308d51-6e72-42e4-9786-8ce407f15b18",
      "display_name": "Unit Test",
      "abbreviated_display_name": "Unit",
      "online_state": "Offline",
      "has_password": true
    },
    "brand": {
      "id": "407e304d-b3c7-4f69-809d-385779dadc84",
      "created_at": 1760470049.081193,
      "updated_at": 1760470049.081193,
      "palette": null,
      "assets": null,
      "messages": null,
      "parent": null,
      "name": "LeadChannel",
      "deleted_at": null,
      "training": false,
      "brand_type": "Team",
      "parents": null,
      "type": "brand",
      "hostnames": null,
      "member_count": 1,
      "base_url": "https://irish.rechat.com"
    },
    "is_default": false,
    "conditions": [
      {
        "id": "1875e81d-d541-4a3d-8274-b8ce1a8d665b",
        "created_at": 1760470049.008176,
        "rule": "d643ce06-57e8-4a23-b599-17835a0f45bc",
        "order": 1,
        "field": "price",
        "operator": "gte",
        "value": 500000,
        "negated": false,
        "type": "lead_channel_rule_condition"
      }
    ],
    "type": "lead_channel_rule"
  }
}

Get rules for a lead channel

Get rules for a lead channel
GET/brands/:brand/leads/channels/:id/rules

Example URI

GET /brands/:brand/leads/channels/:id/rules
URI Parameters
HideShow
brand
string (required) Example: 407e304d-b3c7-4f69-809d-385779dadc84
channel
string (required) Example: c5faa8c4-1dcd-4eb2-8df3-91b0486b0ab0
associations
string (required) Example: lead_channel_rule.conditions,lead_channel_rule.brand,lead_channel_rule.user
Response  200
HideShow
Body
{
  "code": "OK",
  "data": [
    {
      "id": "d643ce06-57e8-4a23-b599-17835a0f45bc",
      "created_at": 1760470049.008176,
      "updated_at": 1760470049.008176,
      "deleted_at": null,
      "created_by": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
      "channel": "c5faa8c4-1dcd-4eb2-8df3-91b0486b0ab0",
      "kind": "AND",
      "order": 1,
      "target": "User",
      "user": {
        "type": "user",
        "username": null,
        "first_name": "Unit",
        "last_name": "Test",
        "email": "[email protected]",
        "phone_number": "+4368120265807",
        "created_at": 1493115498.770362,
        "id": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
        "address_id": null,
        "cover_image_url": null,
        "profile_image_url": null,
        "updated_at": 1493115498.770744,
        "user_status": "Active",
        "profile_image_thumbnail_url": null,
        "cover_image_thumbnail_url": null,
        "email_confirmed": true,
        "timezone": "America/Chicago",
        "user_type": "Admin",
        "deleted_at": null,
        "phone_confirmed": false,
        "is_shadow": false,
        "personal_room": null,
        "brand": null,
        "fake_email": false,
        "features": [
          "Deals"
        ],
        "last_seen_at": null,
        "email_signature": null,
        "daily_enabled": false,
        "email_quota": 30000,
        "website": null,
        "instagram": null,
        "twitter": null,
        "linkedin": null,
        "youtube": null,
        "facebook": null,
        "designation": null,
        "tiktok": null,
        "mfa_enabled": false,
        "xpressdocs_user_id": null,
        "current_time": "2:27 PM - Tuesday Oct 14, 2025",
        "push_allowed": true,
        "agents": null,
        "last_seen_type": null,
        "active_brand": "39308d51-6e72-42e4-9786-8ce407f15b18",
        "display_name": "Unit Test",
        "abbreviated_display_name": "Unit",
        "online_state": "Offline",
        "has_password": true
      },
      "brand": {
        "id": "407e304d-b3c7-4f69-809d-385779dadc84",
        "created_at": 1760470049.081193,
        "updated_at": 1760470049.081193,
        "palette": null,
        "assets": null,
        "messages": null,
        "parent": null,
        "name": "LeadChannel",
        "deleted_at": null,
        "training": false,
        "brand_type": "Team",
        "parents": null,
        "type": "brand",
        "hostnames": null,
        "member_count": 1,
        "base_url": "https://irish.rechat.com"
      },
      "is_default": false,
      "conditions": [
        {
          "id": "1875e81d-d541-4a3d-8274-b8ce1a8d665b",
          "created_at": 1760470049.008176,
          "rule": "d643ce06-57e8-4a23-b599-17835a0f45bc",
          "order": 1,
          "field": "price",
          "operator": "gte",
          "value": 500000,
          "negated": false,
          "type": "lead_channel_rule_condition"
        }
      ],
      "type": "lead_channel_rule"
    },
    {
      "id": "80551a78-7c25-4ba7-acf2-e10c7f38fd02",
      "created_at": 1760470049.008176,
      "updated_at": 1760470049.008176,
      "deleted_at": null,
      "created_by": null,
      "channel": "c5faa8c4-1dcd-4eb2-8df3-91b0486b0ab0",
      "kind": "AND",
      "order": 32767,
      "target": "User",
      "user": {
        "type": "user",
        "username": null,
        "first_name": "Unit",
        "last_name": "Test",
        "email": "[email protected]",
        "phone_number": "+4368120265807",
        "created_at": 1493115498.770362,
        "id": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
        "address_id": null,
        "cover_image_url": null,
        "profile_image_url": null,
        "updated_at": 1493115498.770744,
        "user_status": "Active",
        "profile_image_thumbnail_url": null,
        "cover_image_thumbnail_url": null,
        "email_confirmed": true,
        "timezone": "America/Chicago",
        "user_type": "Admin",
        "deleted_at": null,
        "phone_confirmed": false,
        "is_shadow": false,
        "personal_room": null,
        "brand": null,
        "fake_email": false,
        "features": [
          "Deals"
        ],
        "last_seen_at": null,
        "email_signature": null,
        "daily_enabled": false,
        "email_quota": 30000,
        "website": null,
        "instagram": null,
        "twitter": null,
        "linkedin": null,
        "youtube": null,
        "facebook": null,
        "designation": null,
        "tiktok": null,
        "mfa_enabled": false,
        "xpressdocs_user_id": null,
        "current_time": "2:27 PM - Tuesday Oct 14, 2025",
        "push_allowed": true,
        "agents": null,
        "last_seen_type": null,
        "active_brand": "39308d51-6e72-42e4-9786-8ce407f15b18",
        "display_name": "Unit Test",
        "abbreviated_display_name": "Unit",
        "online_state": "Offline",
        "has_password": true
      },
      "brand": {
        "id": "407e304d-b3c7-4f69-809d-385779dadc84",
        "created_at": 1760470049.081193,
        "updated_at": 1760470049.081193,
        "palette": null,
        "assets": null,
        "messages": null,
        "parent": null,
        "name": "LeadChannel",
        "deleted_at": null,
        "training": false,
        "brand_type": "Team",
        "parents": null,
        "type": "brand",
        "hostnames": null,
        "member_count": 1,
        "base_url": "https://irish.rechat.com"
      },
      "is_default": true,
      "conditions": null,
      "type": "lead_channel_rule"
    }
  ],
  "info": {
    "count": 2,
    "total": 0
  }
}

Reorder rules for a lead channel

Reorder rules for a lead channel
PUT/brands/:brand/leads/channels/:id/rules/sort

Example URI

PUT /brands/:brand/leads/channels/:id/rules/sort
URI Parameters
HideShow
brand
string (required) Example: 407e304d-b3c7-4f69-809d-385779dadc84
channel
string (required) Example: c5faa8c4-1dcd-4eb2-8df3-91b0486b0ab0
Request
HideShow
Body
[
  {
    "id": "80551a78-7c25-4ba7-acf2-e10c7f38fd02",
    "order": 1
  },
  {
    "id": "d643ce06-57e8-4a23-b599-17835a0f45bc",
    "order": 2
  }
]
Response  200

Update a lead channel rule

Update a lead channel rule
PUT/brands/:brand/leads/channels/:id/rules/:rule

Example URI

PUT /brands/:brand/leads/channels/:id/rules/:rule
URI Parameters
HideShow
brand
string (required) Example: 407e304d-b3c7-4f69-809d-385779dadc84
channel
string (required) Example: c5faa8c4-1dcd-4eb2-8df3-91b0486b0ab0
rule
string (required) Example: d643ce06-57e8-4a23-b599-17835a0f45bc
associations
string (required) Example: lead_channel_rule.conditions,lead_channel_rule.brand,lead_channel_rule.user
Request
HideShow
Body
{
  "target": "Brand",
  "kind": "OR",
  "order": 2,
  "flow": null,
  "user": null,
  "brand": "407e304d-b3c7-4f69-809d-385779dadc84",
  "conditions": [
    {
      "field": "postal_code",
      "operator": "any",
      "value": [
        "90210",
        "90211"
      ],
      "order": 1
    },
    {
      "field": "price",
      "operator": "lte",
      "value": 1000000,
      "order": 2
    }
  ]
}
Response  200
HideShow
Body
{
  "code": "OK",
  "data": {
    "id": "d643ce06-57e8-4a23-b599-17835a0f45bc",
    "created_at": 1760470049.008176,
    "updated_at": 1760470049.008176,
    "deleted_at": null,
    "created_by": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
    "channel": "c5faa8c4-1dcd-4eb2-8df3-91b0486b0ab0",
    "kind": "OR",
    "order": 2,
    "target": "Brand",
    "user": null,
    "brand": {
      "id": "407e304d-b3c7-4f69-809d-385779dadc84",
      "created_at": 1760470049.081193,
      "updated_at": 1760470049.081193,
      "palette": null,
      "assets": null,
      "messages": null,
      "parent": null,
      "name": "LeadChannel",
      "deleted_at": null,
      "training": false,
      "brand_type": "Team",
      "parents": null,
      "type": "brand",
      "hostnames": null,
      "member_count": 1,
      "base_url": "https://irish.rechat.com"
    },
    "is_default": false,
    "conditions": [
      {
        "id": "7987395c-07f3-40aa-840e-68c32ec2f6f7",
        "created_at": 1760470049.008176,
        "rule": "d643ce06-57e8-4a23-b599-17835a0f45bc",
        "order": 1,
        "field": "postal_code",
        "operator": "any",
        "value": [
          "90210",
          "90211"
        ],
        "negated": false,
        "type": "lead_channel_rule_condition"
      },
      {
        "id": "c2fa9cac-136a-4552-89ea-a8fde70adb91",
        "created_at": 1760470049.008176,
        "rule": "d643ce06-57e8-4a23-b599-17835a0f45bc",
        "order": 2,
        "field": "price",
        "operator": "lte",
        "value": 1000000,
        "negated": false,
        "type": "lead_channel_rule_condition"
      }
    ],
    "type": "lead_channel_rule"
  }
}

Delete a lead channel rule

Delete a lead channel rule
DELETE/brands/:brand/leads/channels/:id/rules/:rule

Example URI

DELETE /brands/:brand/leads/channels/:id/rules/:rule
URI Parameters
HideShow
brand
string (required) Example: 407e304d-b3c7-4f69-809d-385779dadc84
channel
string (required) Example: c5faa8c4-1dcd-4eb2-8df3-91b0486b0ab0
rule
string (required) Example: d643ce06-57e8-4a23-b599-17835a0f45bc
Response  204

Get Lead Routing Groups of brand

Get Lead Routing Groups of brand
GET/brands/:brand/leads/groups

Example URI

GET /brands/:brand/leads/groups
URI Parameters
HideShow
brand
string (required) Example: 407e304d-b3c7-4f69-809d-385779dadc84
Response  200
HideShow
Body
{
  "code": "OK",
  "data": [
    {
      "id": "b3bdc075-04f1-4e3f-b893-c484c44479fa",
      "created_at": 1760470049.008176,
      "updated_at": 1760470049.008176,
      "created_by": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
      "brand": "407e304d-b3c7-4f69-809d-385779dadc84",
      "name": "Test Group",
      "description": null,
      "distribution": "RoundRobin",
      "type": "lead_routing_group"
    }
  ],
  "info": {
    "count": 1,
    "total": 0
  }
}

Create a Lead Routing Group

Create a Lead Routing Group
POST/brands/:brand/leads/groups

Example URI

POST /brands/:brand/leads/groups
URI Parameters
HideShow
brand
string (required) Example: 407e304d-b3c7-4f69-809d-385779dadc84
Request
HideShow
Body
{
  "name": "Test Group",
  "brand": "407e304d-b3c7-4f69-809d-385779dadc84",
  "distribution": "RoundRobin",
  "created_by": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
  "members": [
    {
      "user": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
      "order": 1,
      "brand": "407e304d-b3c7-4f69-809d-385779dadc84"
    }
  ]
}
Response  200
HideShow
Body
{
  "code": "OK",
  "data": {
    "id": "b3bdc075-04f1-4e3f-b893-c484c44479fa",
    "created_at": 1760470049.008176,
    "updated_at": 1760470049.008176,
    "created_by": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
    "brand": "407e304d-b3c7-4f69-809d-385779dadc84",
    "name": "Test Group",
    "description": null,
    "distribution": "RoundRobin",
    "type": "lead_routing_group"
  }
}

Update a Lead Routing Group

Update a Lead Routing Group
PATCH/brands/:brand/leads/groups/:group

Example URI

PATCH /brands/:brand/leads/groups/:group
URI Parameters
HideShow
brand
string (required) Example: 407e304d-b3c7-4f69-809d-385779dadc84
group
string (required) Example: b3bdc075-04f1-4e3f-b893-c484c44479fa
Request
HideShow
Body
{
  "name": "Test Group Updated",
  "distribution": "FirstToClaim",
  "members": [
    {
      "user": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
      "order": 2,
      "brand": "407e304d-b3c7-4f69-809d-385779dadc84"
    }
  ]
}
Response  200
HideShow
Body
{
  "code": "OK",
  "data": {
    "id": "b3bdc075-04f1-4e3f-b893-c484c44479fa",
    "created_at": 1760470049.008176,
    "updated_at": 1760470049.008176,
    "created_by": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
    "brand": "407e304d-b3c7-4f69-809d-385779dadc84",
    "name": "Test Group Updated",
    "description": null,
    "distribution": "FirstToClaim",
    "type": "lead_routing_group"
  }
}

Delete a Lead Routing Group

Delete a Lead Routing Group
DELETE/brands/:brand/leads/groups/:group

Example URI

DELETE /brands/:brand/leads/groups/:group
URI Parameters
HideShow
brand
string (required) Example: 407e304d-b3c7-4f69-809d-385779dadc84
group
string (required) Example: b3bdc075-04f1-4e3f-b893-c484c44479fa
Response  204

Lead Capture

Overview

Capture a lead using a known lead channel ID

Capture a lead using a known lead channel ID
POST/leads

Example URI

POST /leads
Request
HideShow
Body
{
  "metadata": {
    "lead_channel": "d97a2387-c2a3-498f-9e75-bfbf92ade910"
  },
  "lead": {
    "first_name": "Test",
    "last_name": "User",
    "email": "[email protected]",
    "source_type": "Website"
  }
}
Response  200
HideShow
Body
{
  "code": "OK",
  "data": {
    "id": "fe420382-550f-40e9-86b6-8ae49462578a",
    "contact": "f93af7c8-5f5e-45ef-8475-87eff131d070",
    "lead_channel": "d97a2387-c2a3-498f-9e75-bfbf92ade910",
    "raw_payload": {
      "first_name": "Test",
      "last_name": "User",
      "email": "[email protected]",
      "source_type": "Website"
    },
    "parsed_payload": {
      "first_name": "Test",
      "last_name": "User",
      "email": "[email protected]",
      "source_type": "Website"
    },
    "source_type": "Website",
    "created_at": 1760470043.216
  }
}

Capture a lead using an email campaign email ID

Capture a lead using an email campaign email ID
POST/leads

Example URI

POST /leads
Request
HideShow
Body
{
  "metadata": {
    "email_campaign_email": "d3382ea9-4030-4169-8226-6102c42b8001"
  },
  "lead": {
    "first_name": "Test",
    "last_name": "Recipient",
    "email": "[email protected]",
    "source_type": "Email Campaign"
  }
}
Response  200
HideShow
Body
{
  "code": "OK",
  "data": {
    "id": "fea1202d-4e22-4bb4-9280-23f8942b3077",
    "contact": "b9fde63a-702a-4ff2-9bcf-f374083ef6cd",
    "lead_channel": "d97a2387-c2a3-498f-9e75-bfbf92ade910",
    "raw_payload": {
      "first_name": "Test",
      "last_name": "Recipient",
      "email": "[email protected]",
      "source_type": "Email Campaign"
    },
    "parsed_payload": {
      "first_name": "Test",
      "last_name": "Recipient",
      "email": "[email protected]",
      "source_type": "Email Campaign"
    },
    "source_type": "Email Campaign",
    "created_at": 1760470044.823
  }
}

Filter contacts by lead channel

Filter contacts by lead channel
POST/contacts/filter

Example URI

POST /contacts/filter
Request
HideShow
Body
{
  "lead_channels": [
    "08c8aa1c-337c-4a8e-847b-705404992ea1"
  ]
}
Response  200
HideShow
Body
{
  "code": "OK",
  "data": [
    {
      "id": "863a90c3-ff9c-4769-8e9b-3b2524b7a108",
      "display_name": "Hossein Derakhshan",
      "partner_name": null,
      "brand": "407e304d-b3c7-4f69-809d-385779dadc84",
      "brand_id": "407e304d-b3c7-4f69-809d-385779dadc84",
      "user_id": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
      "sort_field": "Derakhshan Hossein",
      "last_touch": null,
      "last_touch_action": null,
      "next_touch": null,
      "touch_freq": null,
      "ios_address_book_id": null,
      "android_address_book_id": null,
      "created_at": 1760470050.384402,
      "updated_at": 1760470049.008176,
      "deleted_at": null,
      "created_for": "lts_lead",
      "updated_for": "lts_lead",
      "deleted_for": null,
      "title": null,
      "first_name": "Hossein",
      "partner_first_name": null,
      "middle_name": null,
      "last_name": "Derakhshan",
      "partner_last_name": null,
      "marketing_name": null,
      "nickname": null,
      "email": "[email protected]",
      "primary_email": "[email protected]",
      "emails": [
        "[email protected]"
      ],
      "parked": false,
      "partner_email": null,
      "phone_number": "+905348632070",
      "primary_phone_number": "+905348632070",
      "phone_numbers": [
        "+905348632070"
      ],
      "company": null,
      "birthday": null,
      "profile_image_url": null,
      "cover_image_url": null,
      "job_title": null,
      "source_type": "Showing",
      "source": "Website",
      "website": null,
      "tags": [
        "Showing",
        "Lead"
      ],
      "address": [
        {
          "city": "Atlanta",
          "full": ", Atlanta GA",
          "type": "stdaddr",
          "line2": "Atlanta GA",
          "state": "GA"
        }
      ],
      "type": "contact"
    }
  ],
  "info": {
    "count": 1,
    "total": 1
  }
}

Generated by aglio on 14 Oct 2025