GetLeadsFromCampaign

View as Markdown
## Gets the leads that are in a campaign. This request corresponds to the "Lead Analytics" screen in the UI. **Remark:** It shows only the "Pending" leads that are about to start executing actions in the campaign. There might be more "Pending" leads from the specified lead list, that the system will insert later for execution. ### Body Parameters - **campaignId** _(integer)_: The ID of the campaign. - **offset** _(integer)_: The number of records to skip (for pagination). - **limit** _(integer)_: The maximum number of records to return. - **timeFrom** _(string, ISO 8601)_: The start of the time range for filtering. - **timeTo** _(string, ISO 8601)_: The end of the time range for filtering. - **timeFilter** _(string)_: Defines the time filter for fetching leads. Possible values: - `CreationTime`: Filters leads by their creation time. - `Everywhere`: No specific time filtering is applied. _(Default behavior if omitted)_ - `LastActionTakenTime`: Filters leads that executed an action within the given time range - `FailedTime`: Filters leads that executed an action within the given time range - `LastActionTakenOrFailedTime`: Filters leads that executed an action OR failed within the given time range ## Response: ##### **LeadCampaignStatus** - Pending - InSequence - Finished - Paused - Failed ##### **LeadConnectionStatus** - None - ConnectionSent - ConnectionAccepted ##### **LeadMessageStatus** - None - MessageSent - MessageReply ##### **LeadStatusMessage (string)** Usually null, but if the lead is in Failed status, this shows the reason why the lead failed.

Headers

X-API-KEYstringOptional

Request

This endpoint expects a string.

Response

OK
totalCountinteger
itemslist of objects