Skip to main content
POST
/
lead
/
search
Search leads
curl --request POST \
  --url https://api.closebot.com/lead/search \
  --header 'Content-Type: application/json' \
  --header 'X-CB-KEY: <api-key>' \
  --data '
{
  "offset": 123,
  "count": 123,
  "search": "<string>",
  "sourceIds": [
    "<string>"
  ],
  "channels": [
    "<string>"
  ],
  "botIds": [
    "<string>"
  ],
  "personaIds": [
    "<string>"
  ],
  "minimumResponses": 123,
  "lastMessageDirection": "<string>",
  "followUpScheduled": true
}
'
[
  {
    "id": "<string>",
    "name": "<string>",
    "contactId": "<string>",
    "lastMessageTime": "2023-11-07T05:31:56Z",
    "lastMessage": "<string>",
    "lastMessageDirection": "<string>",
    "lastMessageBotId": "<string>",
    "mostRecentFailureReason": "<string>",
    "mimicSourceId": "<string>",
    "source": {
      "name": "<string>",
      "id": "<string>"
    },
    "tags": [
      "<string>"
    ],
    "fields": [
      {
        "field": "<string>",
        "value": "<string>"
      }
    ],
    "instances": [
      {
        "botId": "<string>",
        "botVersion": "<string>",
        "followUpTimezoneKind": "<string>",
        "followUpTimezone": "<string>",
        "followUpTime": "2023-11-07T05:31:56Z",
        "isSmartFollowUpTime": true
      }
    ]
  }
]

Authorizations

X-CB-KEY
string
header
required

CloseBot API Key Authorization

Body

The search query input.

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.

sourceIds
string[] | null

The source IDs.

channels
string[] | null

The channel IDs.

botIds
string[] | null

The bot IDs.

personaIds
string[] | null

The persona IDs.

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.

Response

Success

id
string | null
name
string | null
contactId
string | null
lastMessageTime
string<date-time> | null
lastMessage
string | null
lastMessageDirection
string | null
lastMessageBotId
string | null
mostRecentFailureReason
string | null
mimicSourceId
string | null
source
object
tags
string[] | null
fields
object[] | null
instances
object[] | null