Delete message
DELETE https://api.weav.com/v1/messages/{id}
Requires a token with the external-api:write ability.
Path parameters
idstringrequiredFormat: uuid.
Request
cURL
curl --request DELETE \
--url 'https://api.weav.com/v1/messages/{id}' \
--header "Authorization: Bearer ${WEAV_API_TOKEN}"
JavaScript
const response = await fetch("https://api.weav.com/v1/messages/{id}", {
method: "DELETE",
headers: {
Authorization: `Bearer ${process.env.WEAV_API_TOKEN}`
}
});
console.log(response.status);
Python
import os
import requests
headers = {"Authorization": f"Bearer {os.environ['WEAV_API_TOKEN']}"}
response = requests.delete("https://api.weav.com/v1/messages/{id}", headers=headers)
print(response.status_code)
PHP
use GuzzleHttp\Client;
$client = new Client();
$response = $client->request('DELETE', 'https://api.weav.com/v1/messages/{id}', [
'headers' => ['Authorization' => 'Bearer '.getenv('WEAV_API_TOKEN')],
]);
echo $response->getStatusCode();
Response
204No Content404Not Found401Unauthorized
