Search Contacts
GET/api/v2/instance/:instanceId/chat/search/contacts
Search Contacts
Request
Path Parameters
instanceId stringrequired
ID of the instance.
Query Parameters
page Page
Default value: 1
(Optional) Page number in pagination.
sort Sort
Possible values: [desc
, asc
]
Default value: desc
(Optional) Sort the data in ascending or descending order.
Responses
- 200
- 400
- 401
The return will be a JSON containing up to 50 contacts that match the search criteria, paginated according to the page parameter.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
instanceId stringrequired
name stringrequired
state stringrequired
Default value: active | inactive
connection stringrequired
Default value: open | close | refused
createdAt stringrequired
deletedAt date-timerequired
WhatsApp object
whatsappId stringrequired
remoteJid stringrequired
pictureUrl stringrequired
pushName stringrequired
createdAt stringrequired
Business object
businessId stringrequired
name stringrequired
ContactsPage object
totalRecords numberrequired
totalPages numberrequired
currentPage numberrequired
records object[]required
contactId stringrequired
pushName stringrequired
remoteJid stringrequired
pictureUrl stringrequired
createdAt date-timerequired
{
"instanceId": "string",
"name": "string",
"state": "active | inactive",
"connection": "open | close | refused",
"createdAt": "string",
"deletedAt": "2024-04-14T14:11:05.706Z",
"WhatsApp": {
"whatsappId": "string",
"remoteJid": "string",
"pictureUrl": "string",
"pushName": "string",
"createdAt": "string"
},
"Business": {
"businessId": "string",
"name": "string"
},
"ContactsPage": {
"totalRecords": 0,
"totalPages": 0,
"currentPage": 0,
"records": [
{
"contactId": "string",
"pushName": "string",
"remoteJid": "string",
"pictureUrl": "string",
"createdAt": "2024-04-14T14:11:05.707Z"
}
]
}
}
BadRequestException
- application/json
- Schema
- Example (from schema)
Schema
message string[]required
Default value: string,[object Object]
error stringrequired
statusCode numberrequired
{
"message": [
"string"
],
"error": "string",
"statusCode": 0
}
UnauthorizedException
- application/json
- Schema
- Example (from schema)
Schema
message string[]required
Default value: string,[object Object]
error stringrequired
statusCode numberrequired
{
"message": [
"string"
],
"error": "string",
"statusCode": 0
}
Loading...