A report is a named definition of criteria (columns, rules, group_bys) which is stored. A stored report can be run for a given timeframe, producing the report results. The results are a count of the events for each column in that timeframe that match the rules and which are optionally grouped by event properties.
Reports can be shared outside LeadConduit such that anyone who has the
URL to the shared report can view it without authentication. Each
shared report URL contains a generated, unique, unguessable token,
which is stored as a property in the report definition. To create the
token for a report, use the share endpoint. To stop sharing a report,
use the unshare endpoint, which will clear the token.'
| name | string Required name of the report. Must be unique within the account: creating or renaming a report onto a name another report already uses is rejected with HTTP 422. Leading and trailing whitespace is stripped before the name is stored. |
| description | string optional extra description |
Array of objects (Report Column) Array of report columns | |
Array of objects (ReportRule) rules to match events to include | |
| group_by | Array of strings group results by these event properties |
| token | string identifier used for sharing |
| created_at | string <date-time> (Timestamp) Time report was created |
| updated_at | string <date-time> (Timestamp) Time report was last updated |
{- "name": "string",
- "description": "string",
- "columns": [
- {
- "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
}
], - "rules": [
- {
- "lhv": "string",
- "op": "is equal to",
- "rhv": "string"
}
], - "group_by": [
- "string"
], - "token": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}The delivery settings for a report's scheduled CSV export. A report has at most one schedule; saving again replaces the existing one.
| recipients required | Array of strings <email> [ 1 .. 10 ] items Email addresses that receive the download link on every run. Up to 10; they do not need to be LeadConduit users. |
| subject | string or null <= 200 characters Subject line of the delivery email. Optional: when missing or blank it
defaults to " |
| frequency required | string How often the export is generated and sent. |
{- "recipients": [
- "user@example.com"
], - "subject": "string",
- "frequency": "daily"
}A saved schedule for a report's CSV export. On each run the report is executed, the CSV is generated and the recipients are emailed a link that resolves to a short-lived download URL (see the schedule run file endpoint).
| id | string (ID) ^[0-9a-fA-F]{24}$ ID of the schedule |
| report_id | string (ID) ^[0-9a-fA-F]{24}$ ID of the report this schedule belongs to |
| recipients | Array of strings <email> |
| subject | string |
| frequency | string Enum: "daily" "weekly" "monthly" |
| created_at | string <date-time> |
| updated_at | string <date-time> |
object The user who last saved the schedule, when saved through the UI. |
{- "id": "5fd4371e940df5a34a3888b2",
- "report_id": "5fd4371e940df5a34a3888b2",
- "recipients": [
- "user@example.com"
], - "subject": "string",
- "frequency": "daily",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "updated_by": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "email": "user@example.com"
}
}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
}
][- {
- "name": "string",
- "description": "string",
- "columns": [
- {
- "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
}
], - "rules": [
- {
- "lhv": "string",
- "op": "is equal to",
- "rhv": "string"
}
], - "group_by": [
- "string"
], - "token": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]Create a new report, adding it to the list of all reports in the account.
Create a new Report
created
Unprocessable entity - Validation error
{- "name": "string",
- "description": "string",
- "columns": [
- {
- "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
}
], - "rules": [
- {
- "lhv": "string",
- "op": "is equal to",
- "rhv": "string"
}
], - "group_by": [
- "string"
], - "token": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}{- "name": "string",
- "description": "string",
- "columns": [
- {
- "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
}
], - "rules": [
- {
- "lhv": "string",
- "op": "is equal to",
- "rhv": "string"
}
], - "group_by": [
- "string"
], - "token": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}Get the report definition for an individual report. The parameter can be a report id, which requires passing the api_key or a report token, which does not.
OK
{- "name": "string",
- "description": "string",
- "columns": [
- {
- "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
}
], - "rules": [
- {
- "lhv": "string",
- "op": "is equal to",
- "rhv": "string"
}
], - "group_by": [
- "string"
], - "token": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}Update an existing report. Note that the token cannot be updated with
this call. Use the /share endpoint to generate a new token and /unshare
to clear it.
Update an existing report
created
Unprocessable entity - Validation error
{- "name": "string",
- "description": "string",
- "columns": [
- {
- "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
}
], - "rules": [
- {
- "lhv": "string",
- "op": "is equal to",
- "rhv": "string"
}
], - "group_by": [
- "string"
], - "token": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}{- "name": "string",
- "description": "string",
- "columns": [
- {
- "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
}
], - "rules": [
- {
- "lhv": "string",
- "op": "is equal to",
- "rhv": "string"
}
], - "group_by": [
- "string"
], - "token": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}{- "name": "string",
- "description": "string",
- "columns": [
- {
- "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
}
], - "rules": [
- {
- "lhv": "string",
- "op": "is equal to",
- "rhv": "string"
}
], - "group_by": [
- "string"
], - "token": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}Create a report but don't save it. The report definition is provided in the post body and the time range is provided as query parameters.
OK
[- {
- "name": "string",
- "description": "string",
- "columns": [
- {
- "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
}
], - "rules": [
- {
- "lhv": "string",
- "op": "is equal to",
- "rhv": "string"
}
], - "group_by": [
- "string"
], - "token": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]Run a report that was previously created. The parameter can be an id or token. The time range is provided as query parameters.
OK
[- {
- "name": "string",
- "description": "string",
- "columns": [
- {
- "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
}
], - "rules": [
- {
- "lhv": "string",
- "op": "is equal to",
- "rhv": "string"
}
], - "group_by": [
- "string"
], - "token": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]Get the ids of the reports the current user has favourited. Favourites are per-membership (a user has a distinct user id per account), so they don't reflect what other users on the same account have starred, nor what the same person has starred on another account.
OK
[- "5fd4371e940df5a34a3888b2"
]Mark a report as favourited for the current user. Idempotent: favouriting an already-favourited report is a no-op. Only requires read access to the report, so a viewer who can't edit it can still star it. Where partner reports are enabled for the account, connection reports can be favourited by either side: the report resolves when the requesting account is the owner or the connection partner.
No Content
Schedule the report's CSV export for recurring email delivery. A report has at most one schedule, so this is an upsert: saving again replaces the recipients, subject and frequency and reschedules the recurring job. Only the report's owner account can manage its schedule.
OK
The ID is not valid, or the payload failed validation (errors are keyed by field).
Scheduled exports are not enabled for this account.
No report exists with this ID in the account.
{- "recipients": [
- "user@example.com"
], - "subject": "string",
- "frequency": "daily"
}{- "id": "5fd4371e940df5a34a3888b2",
- "report_id": "5fd4371e940df5a34a3888b2",
- "recipients": [
- "user@example.com"
], - "subject": "string",
- "frequency": "daily",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "updated_by": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "email": "user@example.com"
}
}Returns the report's export schedule, or 404 when the report has none.
OK
No report exists with this ID in the account, or the report has no schedule.
{- "id": "5fd4371e940df5a34a3888b2",
- "report_id": "5fd4371e940df5a34a3888b2",
- "recipients": [
- "user@example.com"
], - "subject": "string",
- "frequency": "daily",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "updated_by": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "email": "user@example.com"
}
}Deletes the schedule and cancels its recurring job. Files already generated stay downloadable until they expire.
OK
The report has no schedule.
{ }Returns a pre-signed URL for the CSV a scheduled run generated. The URL is valid for 10 seconds, so request it right before downloading and do not store it. This is the endpoint the link in the delivery email resolves to.
OK
The report ID or run ID is not valid.
No run exists with this ID for the report, or its file has expired.
{
}