Skip to main content

Instance status

Method#

/Status#

GET https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/status

Header#

KeyValue
Client-TokenACCOUNT SECURITY TOKEN

Concept#

This method is responsible for giving you information about the health of your instance on Z-API. For good quality sending and receiving it is necessary to take the following precautions:

  • Configure your webhooks on Z-API to receive notifications about changes on the status of your instance.

  • Disable battery optimization of the cell phone that is connected, even if it is just an emulator (example for android https://youtu.be/Z1baLLXyvTM).

  • Monitor the attributes of this method.


Attributes#

AttributesTypeDescription
connectedbooleanIndicates if your number is connected to Z-API
errorstringnforms details if any of the attributes is not true. - 'You are already connected.' - 'You need to restore the session.' - 'You are not connected.'
smartphoneConnectedbooleanIndicates if the phone is connected to the internet

Code#