Skip to main content
DELETE
Deleting an instance

Overview

Method used to delete an instance linked to your account. To delete several at once, use Deleting instances in bulk.
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.
Deletion is permanent and cannot be undone.

Eligibility rules

An instance is only deleted when it meets all of the conditions below:
  • It is disconnected from WhatsApp and from the phone.
  • Its subscription is canceled. Paid instances, pending ones, ones with a pending bank slip, ones in the cancellation process, or ones in payment retry are not eligible.
  • It is not in trial. A trial must expire naturally or be canceled first.
  • The 40-day grace period counted from the subscription cancellation date has already passed.

Attributes

string
required
Partner token in the Bearer <Partner-Token> format

Path

string
required
Your instance ID. Available in the Z-API panel under Instances.
string
required
Your Z-API instance token.

Response

204

The instance was deleted. The response has no body.

400

The instance does not meet the eligibility rules. The message field states the reason.
Possible messages:

401

The Authorization header was not sent or the Partner Token is invalid.

404

No instance exists for the given instanceId and token pair.

405

Make sure you are correctly sending the method specification, that is, verify that you sent DELETE 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”.