Skip to content

DeleteStatus Test#

Beta version

The functionality is in beta mode. Features are subject to change and may also work unstably. There may be additional charges for functionality in the future.

The method for deleting status.

Request#

To delete a status, you have to execute a request at:

POST {{apiUrl}}/waInstance{{idInstance}}/deleteStatus/{{apiTokenInstance}}

For apiUrl, idInstance and apiTokenInstance request parameters, refer to Before you start section.

Request parameters#

Parameter Type Mandatory Description
idMessage string Yes Deleted message ID

Request body example#

{
    "idMessage": "BAE5F4886F6F2D05"
}

Response#

Response parameters#

The response body is empty. If successful, the server response is 200.

DeleteStatus errors#

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

HTTP code Error identifier Description
400 ID message notfound IDMessage is not found

Request examples#

import requests

url = "{{apiUrl}}/waInstance{{idInstance}}/deleteStatus/{{apiTokenInstance}}"

payload = "{\r\n    \"idMessage\": \"BAE5F4886F6F2D05\" \"r\n}"
headers = {
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data = payload)

print(response.text.encode('utf8'))
curl --location '{{apiUrl}}/waInstance{{idInstance}}/deleteStatus/{{apiTokenInstance}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "idMessage": "BAE5F4886F6F2D05"
}'
var restTemplate = new RestTemplate();
var requestUrl = new StringBuilder();
requestUrl
    .append({{apiUrl}})
    .append("/waInstance").append({{idInstance}})
    .append("/deleteStatus/")
    .append({{apiTokenInstance}});

var headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);

var jsonBody = "{\"idMessage\": \"BAE5F4886F6F2D05\"}";

var requestEntity = new HttpEntity<>(jsonBody, headers);

var response = restTemplate.exchange(requestUrl.toString(), HttpMethod.POST, requestEntity, String.class);
System.out.println(response);
var requestUrl = new StringBuilder();
requestUrl
    .append({{apiUrl}})
    .append("/waInstance").append({{idInstance}})
    .append("/deleteStatus/")
    .append({{apiTokenInstance}});

var response = Unirest.post(requestUrl.toString())
    .header("Content-Type", "application/json")
    .body("{\"idMessage\": \"BAE5F4886F6F2D05\"}")
    .asString();

System.out.println(response);