Overview
Method used to list all created instances.
To use Partner endpoints, provide the Partner Token in the Authorization field using the following format: Bearer <Partner-Token>It is not necessary to send the Client-Token in these requests.
Attributes
Query Parameters
Number of results per page
Search by instance name and ID
Instance type: web or mobile
Request Examples
List by instance name or ID
https://api.z-api.io/instances?page=1&pageSize=15&query=NAME_OR_INSTANCEID
List by type (web or mobile)
https://api.z-api.io/instances?page=1&pageSize=15&middleware=web
List by type (web or mobile) + instance name or ID
https://api.z-api.io/instances?page=1&pageSize=15&middleware=web&query=NAME_OR_INSTANCEID
Response
200
{
"total": 1,
"totalPage": 1,
"pageSize": 1,
"page": 1,
"content": [
{
"token": "",
"tenant": "",
"created": "",
"due": 1648565999675,
"paymentStatus": "",
"deliveryCallbackUrl": "",
"phoneConnected": false,
"whatsappConnected": false,
"middleware": "web",
"name": "",
"id": ""
}
]
}
405
Make sure you are correctly sending the method specification, that is, verify that you sent POST or GET as specified at the beginning of this topic.
415
If you receive a 415 error, make sure to add the “Content-Type” header to your request, which in most cases is “application/json”.