Listing instances
#
Method#
/instancesGET
https://api.z-api.io/instances
#
ConceptThis method is used to list every instance created
#
Attributes#
RequiredAttributes | Type | Description |
---|---|---|
page | integer | Used for pagination, you must inform here the page of chats you want to search |
pageSize | integer | Specifies the size of the return chats per page |
#
OptionalsAttributes | Type | Description |
---|---|---|
query | number | Search by instance name and id |
middleware | string (web, mobile) | Search instance by type: web or mobile. Empty will bring all types |
#
Request BodyMethod
GET
https://api.z-api.io/instances/
Example
#
Query paramskey | value | description |
---|---|---|
query | 999999999999 | |
middleware | web | |
pageSize | 1 | |
page | 1 |
#
Response#
201Attributes | Type | Description |
---|---|---|
id | string | Created instance’s ID |
token | string | TOKEN of the created instance |
due | timestamp | Instance expiration date |
Example
#
405In this case certify that you are sending the correct specification of the method. This means, verify if you sent a POST or GET as specified at the beginning of this topic.
#
415In case you receive 415 error, make sure to add the “Content-Type” of the object you are sending in the request headers, mostly “application/json”
#
Webhook ResponseLink to webhook response (on receipt)