Skip to content

DeleteInstanceAccount#

Test

The method is aimed for deleting an instance of the partners's account.

Request#

To delete an instance on the partner's part you have to execute a POST request at:

POST
{{partnerApiUrl}}/partner/deleteInstanceAccount/{{partnerToken}}

For partnerApiUrl request parameter, you can find it in your console.

For partnerTokenrequest parameter please contact Green API support@green-api.com with a request to get a partnership API-token.

Request parameters#

Parameter Type Mandatory Description
idInstance integer mandatory parameter Instance Id. The size of the integer is int64. Values ​​range include from 1 to 10 digits

Request body example#

{
    "idInstance": 1101000000
}

Response#

Response parameters#

Parameter Type Description
deleteInstanceAccount boolean account instance deletion flag

Response body example#

If successful, in response to the request, you get a JSON string with HTTP 200 status of the below form:

{
    "deleteInstanceAccount": true
}

DeleteInstanceAccount errors#

For a list of errors common to all methods, refer to Common errors section

HTTP code Error identifier Description
200 "code": 404,
"description": "Not found"
The instance does not exist or had already been deleted
200 "code": 401,
"description": "Unauthorized"
Problem with authorization, check the correctness of the partnerToken