Skip to main content
POST
Search leads

Authorizations

X-CB-KEY
string
header
required

CloseBot API Key Authorization

Body

The search query input.

sourceIds
string[] | null
required

The source IDs.

channels
string[] | null
required

The channel IDs.

botIds
string[] | null
required

The bot IDs.

personaIds
string[] | null
required

The persona IDs.

totalOnly
boolean | null
sourceOnlyFast
boolean | null
offset
integer<int32> | null

The offset of the search results.

count
integer<int32> | null

The count of the search results.

search
string | null

The search query.

topicIds
string[] | null

Conversation topic IDs. A lead matches if it carries any of them.

Optional rather than required, unlike the lists above: every existing caller predates topics, and making it required would break all of them.

minimumResponses
integer<int32> | null

The minimum number of responses.

lastMessageDirection
string | null

The last message direction.

followUpScheduled
boolean | null

Whether the follow up is scheduled.

starredOnly
boolean | null

Restrict results to starred leads (the sidebar Priority tab).

mentionedOnly
boolean | null

Restrict results to leads with a note that @-mentions the caller (the sidebar Mentions tab).

Response

OK

leads
object[] | null
required
total
integer<int32>
required
starredTotal
integer<int32> | null

Count of starred leads across the whole (unpaginated) baseline scope (before StarredOnly/MentionedOnly narrowing). Only populated on the source-only fast path — the sidebar Priority count reads it.

mentionsTotal
integer<int32> | null

Count of leads with a note @-mentioning the caller across the baseline scope. Only populated on the source-only fast path — the sidebar Mentions count reads it.