cURL
curl --request POST \ --url https://api.enviaai.app/v1/instances/{instanceId}/disconnect \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "reason": "<string>" } '
{ "success": true, "message": "Instance disconnected successfully" }
Disconnect a WhatsApp instance
const response = await client.instances.disconnect('inst_abc123'); if (response.success) { console.log('Instance disconnected successfully'); }
instance_not_found
instance_not_connected