Free accounts do not have access to Leads (https://app.leadconduit.com/leads) and will receive a 401 (Unauthorized) error when trying to access it
An event tracks what happened with a lead at a particular step in a flow. An event is a self-contained snapshot of the state of the lead at the time the lead visited the step. It contains a full copy of all lead data, along with all data that was appended before that step. Every event contains the below properties.
id required | string (ID) ^[0-9a-fA-F]{24}$ 24 character alpha-numeric BSON identifier | ||||||||
outcome required | string The outcome of the event
| ||||||||
reason required | string The reason for a failure or error outcome | ||||||||
object (Source Variables) All data available at the time LeadConduit started processing this event | |||||||||
host | string | ||||||||
start_timestamp | integer The number of milliseconds elapsed since epoch at the start of the step processing | ||||||||
end_timestamp | integer The number of milliseconds elapsed since epoch at the end of the step processing | ||||||||
object (Firehose) | |||||||||
ms | integer The number of milliseconds that elapsed while processing the lead | ||||||||
wait_ms | integer The number of milliseconds that LeadConduit spent waiting for all recipients to respond | ||||||||
overhead_ms | integer The number of milliseconds of overhead that LeadConduit added while processing the step | ||||||||
lag_ms | integer | ||||||||
total_ms | integer The number of milliseconds that elapsed since the lead was submitted | ||||||||
handler_version | string (SemanticVersion) The version of the lead handler | ||||||||
version | string (SemanticVersion) The schema version of the event | ||||||||
cap_reached | boolean | ||||||||
object (PingLimit) The ping limit configuration is defined in a flow on a source, or directly on the flow itself. The configuration controls the behavior of the ping limit by setting the maximum and the duration. The counter for a ping limit is kept as a standalone record which shares ping limit's ID. | |||||||||
object (PingLimit) The ping limit configuration is defined in a flow on a source, or directly on the flow itself. The configuration controls the behavior of the ping limit by setting the maximum and the duration. The counter for a ping limit is kept as a standalone record which shares ping limit's ID. | |||||||||
ping_limit_reached | boolean | ||||||||
expires_at | string <date-time> (Timestamp) The time this event will be automatically deleted from LeadConduit (events are retained for 90 days) | ||||||||
type required | string Recorded after a source submits a lead to a flow | ||||||||
module_id | string (ModuleID) The integration module ID configured for the source | ||||||||
package_version | string (SemanticVersion) The semantic version of the integration package | ||||||||
object (acceptance-criteria) The acceptance criteria configured on the source when the lead was processed | |||||||||
step_count | integer The number of steps processed for this lead (>= 0 and <= total number of steps) | ||||||||
appended | object All data appended while handing the lead | ||||||||
object (HttpRequest) The inbound HTTP request | |||||||||
object (HttpResponse) The inbound HTTP response |
{- "id": "5fd4371e940df5a34a3888b2",
- "outcome": "success",
- "reason": "string",
- "vars": { },
- "host": "string",
- "start_timestamp": 0,
- "end_timestamp": 0,
- "firehose": {
- "credential_id": "5fd4371e940df5a34a3888b2",
- "enabled": true,
- "bucket": "string",
- "prefix": "string"
}, - "ms": 0,
- "wait_ms": 0,
- "overhead_ms": 0,
- "lag_ms": 0,
- "total_ms": 0,
- "handler_version": "string",
- "version": "string",
- "cap_reached": true,
- "flow_ping_limits": {
- "id": "5fd4371e940df5a34a3888b2",
- "name": "string",
- "maximum": 0,
- "duration": 0,
- "duration_units": "string",
- "time_zone": "America/New_York",
- "created_at": "2019-08-24T14:15:22Z"
}, - "source_ping_limits": {
- "id": "5fd4371e940df5a34a3888b2",
- "name": "string",
- "maximum": 0,
- "duration": 0,
- "duration_units": "string",
- "time_zone": "America/New_York",
- "created_at": "2019-08-24T14:15:22Z"
}, - "ping_limit_reached": true,
- "expires_at": "2019-08-24T14:15:22Z",
- "type": "source",
- "module_id": "string",
- "package_version": "string",
- "acceptance_criteria": {
- "rule_set": {
- "id": "1aacd0",
- "op": "and",
- "rules": [
- {
- "id": "1aacd0",
- "lhv": "lead.state",
- "op": "is equal to",
- "rhv": "TX",
- "rule_set": { }
}
]
}, - "outcome": "failure",
- "reason": "string"
}, - "step_count": 4,
- "appended": { },
- "request": {
- "method": "POST",
- "version": "1.1",
- "headers": { },
- "body": "{\"email\":\"johndoe@email.com\",\"phone_1\":\"5127891111\"}",
- "timestamp": 0
}, - "response": {
- "status": 201,
- "status_text": "Created",
- "version": "1.1",
- "headers": { },
- "body": "{\"outcome\":\"success\",\"lead\":{\"id\":\"63cc6f0e55254d7d1c4c3037\"}}",
- "timestamp": 0
}
}
OK
Authorization information is missing or invalid.
[- {
- "type": "source",
- "id": "5fd4371e940df5a34a3888b2",
- "outcome": "success",
- "reason": "string",
- "vars": { },
- "host": "string",
- "start_timestamp": 0,
- "end_timestamp": 0,
- "firehose": {
- "credential_id": "5fd4371e940df5a34a3888b2",
- "enabled": true,
- "bucket": "string",
- "prefix": "string"
}, - "ms": 0,
- "wait_ms": 0,
- "overhead_ms": 0,
- "lag_ms": 0,
- "total_ms": 0,
- "handler_version": "string",
- "version": "string",
- "cap_reached": true,
- "flow_ping_limits": {
- "id": "5fd4371e940df5a34a3888b2",
- "name": "string",
- "maximum": 0,
- "duration": 0,
- "duration_units": "string",
- "time_zone": "America/New_York",
- "created_at": "2019-08-24T14:15:22Z"
}, - "source_ping_limits": {
- "id": "5fd4371e940df5a34a3888b2",
- "name": "string",
- "maximum": 0,
- "duration": 0,
- "duration_units": "string",
- "time_zone": "America/New_York",
- "created_at": "2019-08-24T14:15:22Z"
}, - "ping_limit_reached": true,
- "expires_at": "2019-08-24T14:15:22Z",
- "module_id": "string",
- "package_version": "string",
- "acceptance_criteria": {
- "rule_set": {
- "id": "1aacd0",
- "op": "and",
- "rules": [
- {
- "id": "1aacd0",
- "lhv": "lead.state",
- "op": "is equal to",
- "rhv": "TX",
- "rule_set": { }
}
]
}, - "outcome": "failure",
- "reason": "string"
}, - "step_count": 4,
- "appended": { },
- "request": {
- "method": "POST",
- "version": "1.1",
- "headers": { },
- "body": "{\"email\":\"johndoe@email.com\",\"phone_1\":\"5127891111\"}",
- "timestamp": 0
}, - "response": {
- "status": 201,
- "status_text": "Created",
- "version": "1.1",
- "headers": { },
- "body": "{\"outcome\":\"success\",\"lead\":{\"id\":\"63cc6f0e55254d7d1c4c3037\"}}",
- "timestamp": 0
}
}
]
Query parameters
OK
Authorization information is missing or invalid.
{- "start": "2019-08-24T14:15:22Z",
- "end": "2019-08-24T14:15:22Z",
- "rules": [
- {
- "lhv": "lead.state",
- "op": "is equal to",
- "rhv": "TX",
- "rule_set": {
- "op": "and",
- "rules": [
- { }
]
}
}
], - "include": [
- "string"
], - "exclude": [
- "string"
], - "limit": 1,
- "sort": "string"
}
[- {
- "type": "source",
- "id": "5fd4371e940df5a34a3888b2",
- "outcome": "success",
- "reason": "string",
- "vars": { },
- "host": "string",
- "start_timestamp": 0,
- "end_timestamp": 0,
- "firehose": {
- "credential_id": "5fd4371e940df5a34a3888b2",
- "enabled": true,
- "bucket": "string",
- "prefix": "string"
}, - "ms": 0,
- "wait_ms": 0,
- "overhead_ms": 0,
- "lag_ms": 0,
- "total_ms": 0,
- "handler_version": "string",
- "version": "string",
- "cap_reached": true,
- "flow_ping_limits": {
- "id": "5fd4371e940df5a34a3888b2",
- "name": "string",
- "maximum": 0,
- "duration": 0,
- "duration_units": "string",
- "time_zone": "America/New_York",
- "created_at": "2019-08-24T14:15:22Z"
}, - "source_ping_limits": {
- "id": "5fd4371e940df5a34a3888b2",
- "name": "string",
- "maximum": 0,
- "duration": 0,
- "duration_units": "string",
- "time_zone": "America/New_York",
- "created_at": "2019-08-24T14:15:22Z"
}, - "ping_limit_reached": true,
- "expires_at": "2019-08-24T14:15:22Z",
- "module_id": "string",
- "package_version": "string",
- "acceptance_criteria": {
- "rule_set": {
- "id": "1aacd0",
- "op": "and",
- "rules": [
- {
- "id": "1aacd0",
- "lhv": "lead.state",
- "op": "is equal to",
- "rhv": "TX",
- "rule_set": { }
}
]
}, - "outcome": "failure",
- "reason": "string"
}, - "step_count": 4,
- "appended": { },
- "request": {
- "method": "POST",
- "version": "1.1",
- "headers": { },
- "body": "{\"email\":\"johndoe@email.com\",\"phone_1\":\"5127891111\"}",
- "timestamp": 0
}, - "response": {
- "status": 201,
- "status_text": "Created",
- "version": "1.1",
- "headers": { },
- "body": "{\"outcome\":\"success\",\"lead\":{\"id\":\"63cc6f0e55254d7d1c4c3037\"}}",
- "timestamp": 0
}
}
]
OK
Authorization information is missing or invalid.
{- "id": "5fd4371e940df5a34a3888b2",
- "outcome": "success",
- "reason": "string",
- "vars": { },
- "host": "string",
- "start_timestamp": 0,
- "end_timestamp": 0,
- "firehose": {
- "credential_id": "5fd4371e940df5a34a3888b2",
- "enabled": true,
- "bucket": "string",
- "prefix": "string"
}, - "ms": 0,
- "wait_ms": 0,
- "overhead_ms": 0,
- "lag_ms": 0,
- "total_ms": 0,
- "handler_version": "string",
- "version": "string",
- "cap_reached": true,
- "flow_ping_limits": {
- "id": "5fd4371e940df5a34a3888b2",
- "name": "string",
- "maximum": 0,
- "duration": 0,
- "duration_units": "string",
- "time_zone": "America/New_York",
- "created_at": "2019-08-24T14:15:22Z"
}, - "source_ping_limits": {
- "id": "5fd4371e940df5a34a3888b2",
- "name": "string",
- "maximum": 0,
- "duration": 0,
- "duration_units": "string",
- "time_zone": "America/New_York",
- "created_at": "2019-08-24T14:15:22Z"
}, - "ping_limit_reached": true,
- "expires_at": "2019-08-24T14:15:22Z",
- "type": "source",
- "module_id": "string",
- "package_version": "string",
- "acceptance_criteria": {
- "rule_set": {
- "id": "1aacd0",
- "op": "and",
- "rules": [
- {
- "id": "1aacd0",
- "lhv": "lead.state",
- "op": "is equal to",
- "rhv": "TX",
- "rule_set": { }
}
]
}, - "outcome": "failure",
- "reason": "string"
}, - "step_count": 4,
- "appended": { },
- "request": {
- "method": "POST",
- "version": "1.1",
- "headers": { },
- "body": "{\"email\":\"johndoe@email.com\",\"phone_1\":\"5127891111\"}",
- "timestamp": 0
}, - "response": {
- "status": 201,
- "status_text": "Created",
- "version": "1.1",
- "headers": { },
- "body": "{\"outcome\":\"success\",\"lead\":{\"id\":\"63cc6f0e55254d7d1c4c3037\"}}",
- "timestamp": 0
}
}
The /events/stats
resource is used to count events. The event count can be grouped by any field collected
with the lead or appended to the lead during flow processing. The API also supports returning results in JSON
or CSV using the appropriate MIME type in the Accept
header.
OK
[- {
- "source-submitted": 0,
- "source-success": 0,
- "source-failure": 0,
- "source-error": 0,
- "recipient-submitted": 0,
- "recipient-success": 0,
- "recipient-failure": 0,
- "recipient-error": 0,
- "return-received-submitted": 0,
- "return-received-success": 0,
- "return-received-failure": 0,
- "return-received-error": 0,
- "return-sent-submitted": 0,
- "return-sent-success": 0,
- "return-sent-failure": 0,
- "return-sent-error": 0,
- "conversion-received-submitted": 0,
- "conversion-received-success": 0,
- "conversion-received-failure": 0,
- "conversion-received-error": 0,
- "conversion-sent-submitted": 0,
- "conversion-sent-success": 0,
- "conversion-sent-failure": 0,
- "conversion-sent-error": 0,
- "ping-submitted": 0,
- "ping-success": 0,
- "ping-success-rate": 0,
- "ping-win-rate": 0,
- "cost": 0,
- "revenue": 0,
- "profit": 0,
- "cost-per-conversion-received-success": 0,
- "avg-cost-per-lead": 0,
- "avg-revenue-per-lead": 0
}
]
The /search/leads
resource is used to find leads using full text
search. For example, you can search for fred
in texas
using:
/search/leads?query=fred+tx
/search/leads?query=fred
FRED
and fred
will both match Fred
/search/leads?query=sam
will match sam
and
samantha
fred tx
will match leads that have
both fred
AND tx
"fred tx"
will only match that exact textThe search results can be sorted and paginated. There are two query
parameter to control sorting: sort_by
and sort_dir
. The sort_by
parameter takes a field name (see list below) and sort_dir
is ascending
(asc
) or descending (desc
). By default, the results are sorted by
relevance.
There are two query parameters to control paging: from
and limit
. The
from
parameter specifies the starting offset of that page in the search
results and the limit
parameter specifies how many search results to
return. From is zero-based so to get the first 10 results, use
from=0&limit=10
, the second 10 using from=10&limit=10
, etc... The
maximum limit
is 100 at a time, with an overall maximum of 1,000 search
results.
The search results has the total number of matching leads and an array of hits, where each hit is a matching Lead Search Result. Each lead search result contains basic information about the lead, the latest event for that lead, and highlighting of the matched text.
OK
{- "hits": [
- {
- "lead_id": "5fd4371e940df5a34a3888b2",
- "flow_id": "5fd4371e940df5a34a3888b2",
- "flow_name": "Sales Leads",
- "source_id": "5fd4371e940df5a34a3888b2",
- "source_name": "A Corporation",
- "first_name": "George",
- "last_name": "Washington",
- "email": "georgew@gmail.com",
- "phone_1": "5125551212",
- "phone_2": "5125552222",
- "address_1": "123 Main street",
- "city": "Austin",
- "postal_code": "78704",
- "reference": "1990118214561",
- "state": "TX",
- "submission_timestamp": "2019-08-24T14:15:22Z",
- "highlight": { },
- "latest_event": {
- "id": "5fd4371e940df5a34a3888b2",
- "outcome": "success",
- "reason": "string",
- "vars": {
- "price": 0,
- "purchase_price": 0,
- "event_id": "5fd4371e940df5a34a3888b2"
}, - "host": "string",
- "start_timestamp": 0,
- "end_timestamp": 0,
- "firehose": {
- "credential_id": "5fd4371e940df5a34a3888b2",
- "enabled": true,
- "bucket": "string",
- "prefix": "string"
}, - "ms": 0,
- "wait_ms": 0,
- "overhead_ms": 0,
- "lag_ms": 0,
- "total_ms": 0,
- "handler_version": "string",
- "version": "string",
- "cap_reached": true,
- "flow_ping_limits": {
- "id": "5fd4371e940df5a34a3888b2",
- "name": "string",
- "maximum": 0,
- "duration": 0,
- "duration_units": "string",
- "time_zone": "America/New_York",
- "created_at": "2019-08-24T14:15:22Z"
}, - "source_ping_limits": {
- "id": "5fd4371e940df5a34a3888b2",
- "name": "string",
- "maximum": 0,
- "duration": 0,
- "duration_units": "string",
- "time_zone": "America/New_York",
- "created_at": "2019-08-24T14:15:22Z"
}, - "ping_limit_reached": true,
- "expires_at": "2019-08-24T14:15:22Z",
- "type": "recipient",
- "step_id": "string",
- "caps": { },
- "caps_reached": true,
- "key": "string",
- "cost": 0,
- "purchase_price": 0,
- "sale_price": 0,
- "revenue": 0,
- "module_id": "string",
- "credential": {
- "id": "5fd4371e940df5a34a3888b2",
- "name": "string",
- "type": "user",
- "package": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "username": "string",
- "password": "string"
}, - "credential_updated": true,
- "package_version": "string",
- "rule_set": {
- "id": "1aacd0",
- "op": "and",
- "rules": [
- {
- "id": "1aacd0",
- "lhv": "lead.state",
- "op": "is equal to",
- "rhv": "TX",
- "rule_set": { }
}
]
}, - "mappings": [
- {
- "id": "1aacd0",
- "property": "string",
- "value": "string",
- "rule_set": {
- "id": "1aacd0",
- "op": "and",
- "rules": [
- null
]
}
}
], - "pricing": {
- "override": true,
- "prices": [
- {
- "id": { },
- "amount": 0,
- "rule_set": {
- "id": null,
- "op": null,
- "rules": [ ]
}
}
]
}, - "transactions": [
- {
- "request": {
- "method": "POST",
- "version": "1.1",
- "headers": { },
- "body": "{\"email\":\"johndoe@email.com\",\"phone_1\":\"5127891111\"}",
- "timestamp": 0
}, - "response": {
- "status": 201,
- "status_text": "Created",
- "version": "1.1",
- "headers": { },
- "body": "{\"outcome\":\"success\",\"lead\":{\"id\":\"63cc6f0e55254d7d1c4c3037\"}}",
- "timestamp": 0
}, - "ms": 0
}
]
}
}
], - "total": 0
}