DELETE
https://api.instvia.com/api/v1/instances/dac3a956-4e8b-4d76-8caf-fed98dfc8b05/webhook
Remover webhook
Remove a configuração de webhook da instância.
Parâmetros de path
| Nome | Exemplo |
|---|---|
instance |
dac3a956-4e8b-4d76-8caf-fed98dfc8b05 |
Request
Headers
{
"Accept": "application/json",
"Authorization": "Bearer sk_live_0123456789abcdef0123456789abcdef0123456789abcdef"
}
Exemplos de código
curl -sS -X DELETE "https://api.instvia.com/api/v1/instances/dac3a956-4e8b-4d76-8caf-fed98dfc8b05/webhook" \
-H "Accept: application/json" \
-H "Authorization: Bearer sk_live_0123456789abcdef0123456789abcdef0123456789abcdef"
const response = await fetch('https://api.instvia.com/api/v1/instances/dac3a956-4e8b-4d76-8caf-fed98dfc8b05/webhook', {
method: 'DELETE',
headers: {
Accept: 'application/json',
Authorization: 'Bearer sk_live_0123456789abcdef0123456789abcdef0123456789abcdef',
}
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://api.instvia.com/api/v1/instances/dac3a956-4e8b-4d76-8caf-fed98dfc8b05/webhook');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Accept: application/json',
'Authorization: Bearer sk_live_0123456789abcdef0123456789abcdef0123456789abcdef',
],
]);
$body = curl_exec($ch);
curl_close($ch);
\$data = json_decode($body, true);
Response 200
{
"success": true,
"data": []
}
Response 401
{
"success": false,
"error": {
"code": "UNAUTHENTICATED",
"message": "Invalid API key."
}
}