Search Instance
POST/api/v2/business/:businessId/instance/search
Retrieve all instances connected to WhatsApp in a paginated way, using search filters.
With this feature, companies can segment and visualize data according to specific criteria, simplifying analysis and streamlining the management of customer interactions in each instance.
Request
Path Parameters
Business ID.
Query Parameters
Default value: 1
(Optional) Page number in pagination.
- application/json
Body
Properties:
instanceId: (optional) Filter instances by instance id.
name: (optional) Filter instances by instance name.
state: (optional) Filter instances by state (active or inactive).
connection: (optional) Filter instances by connection state (open, closed, or refused).
search object
Default value: active | inactive
Default value: open | close | refused
Responses
- 200
- 400
- 401
- 500
Returns a paginated list with detailed information about instances that match the specified search filters.
- Instances per page: 50
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- Array [
- ]
- ]
BusinessWebhook object
BusinessPage object
records object[]required
Auth objectrequired
WhatsApp objectrequired
Webhook object[]required
Identification name of your webhook
Instance unique url.
Default value: false
Enable or disable the url.
WebhookEvents objectrequired
Default value: true
Enables sending the qr code.
Default value: true
Enables sending instance State.
Default value: true
Enables batch sending of old messages.
Default value: true
Enables sending of all new incoming messages.
Default value: true
Enables sending all updates to the incoming or outgoing message.
Default value: true
Enables the sending of all messages sent by the API.
Default value: true
Enables sending the initial batch of loaded contacts.
Default value: true
Enables sending a new contact with additional information.
Default value: true
Enable update notification for each contact in the conversation.
Default value: true
Enables notification of contact behavior in chat.
Default value: true
Enables sending all loaded chats.
Default value: true
Enable notification of each chat update in the conversation.
Default value: true
Enable notification of every new chat started.
Default value: true
Enable notification when a chat is deleted.
Default value: true
Enable notification when a group is created.
Default value: true
c
Default value: true
Enable notification when a member of a group is updated.
Default value: true
Enable notification when connection status changes.
Default value: true
Enable notification when the json web token is updated.
{
"businessId": "string",
"name": "string",
"businessToken": "string",
"attributes": {},
"createdAt": "2024-04-14T14:11:05.622Z",
"updatedAt": "2024-04-14T14:11:05.622Z",
"deletedAt": "2024-04-14T14:11:05.622Z",
"BusinessWebhook": {
"webhookId": "string",
"url": "string",
"enabled": true,
"createdAt": "2024-04-14T14:11:05.622Z",
"updatedAt": "2024-04-14T14:11:05.622Z"
},
"BusinessPage": {
"totalRecords": 0,
"totalPages": 0,
"currentPage": 0,
"records": [
{
"instanceId": "string",
"name": "string",
"state": "string",
"connection": "string",
"createdAt": "2024-04-14T14:11:05.626Z",
"deletedAt": "2024-04-14T14:11:05.626Z",
"Auth": {
"authId": "string",
"jwt": "string",
"createdAt": "2024-04-14T14:11:05.626Z",
"updatedAt": "2024-04-14T14:11:05.626Z"
},
"WhatsApp": {
"whatsappId": "string",
"remoteJid": "string",
"pictureUrl": "string",
"pushName": "string",
"createdAt": "string"
},
"Webhook": [
{
"name": "string",
"url": "string",
"enabled": false,
"webhookId": "string",
"createdAt": "2024-04-14T14:11:05.626Z",
"updatedAt": "2024-04-14T14:11:05.626Z",
"instanceInstanceId": "string",
"WebhookEvents": {
"qrcodeUpdate": true,
"stateInstance": true,
"messagesSet": true,
"messagesUpsert": true,
"messagesUpdate": true,
"sendMessage": true,
"contactsSet": true,
"contactsUpsert": true,
"contactsUpdate": true,
"presenceUpdate": true,
"chatsSet": true,
"chatsUpdate": true,
"chatsUpsert": true,
"groupsUpsert": true,
"groupUpdate": true,
"groupParticipantsUpdate": true,
"connectionUpdate": true,
"newJwt": true,
"webhookEventsId": "string",
"createdAt": "2024-04-14T14:11:05.626Z",
"updatedAt": "2024-04-14T14:11:05.626Z"
}
}
]
}
]
}
}
BadRequestException
- application/json
- Schema
- Example (from schema)
Schema
Default value: string,[object Object]
{
"message": [
"string"
],
"error": "string",
"statusCode": 0
}
UnauthorizedException
- application/json
- Schema
- Example (from schema)
Schema
Default value: string,[object Object]
{
"message": [
"string"
],
"error": "string",
"statusCode": 0
}
InternalServerErrorException
- application/json
- Schema
- Example (from schema)
Schema
Default value: string,[object Object]
{
"message": [
"string"
],
"error": "string",
"statusCode": 0
}