DELETE
https://api.cryptohopper.com/v1/api/webhooks
Turns off your app's webhook with the given URL, so it stops receiving deliveries. Creating a webhook with the same URL turns it on again.
Needs a valid access token; no scope is checked.
Example request
curl -X DELETE "https://api.cryptohopper.com/v1/api/webhooks" \
-H "access-token: YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"webhook_url":"https://example.com/cryptohopper/webhook"}'
const response = await fetch('https://api.cryptohopper.com/v1/api/webhooks', {
method: 'DELETE',
headers: {
"access-token": "YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"webhook_url": "https://example.com/cryptohopper/webhook"
})
});
const data = await response.json();
import requests
response = requests.delete(
"https://api.cryptohopper.com/v1/api/webhooks",
headers={
"access-token": "YOUR_ACCESS_TOKEN"
},
json={
"webhook_url": "https://example.com/cryptohopper/webhook"
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/api/webhooks');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'access-token: YOUR_ACCESS_TOKEN',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'webhook_url' => 'https://example.com/cryptohopper/webhook',
]),
]);
$data = json_decode(curl_exec($ch), true);
Parameters
Headers
| Name | Type | Required | Description |
|---|---|---|---|
access-token |
string | Required | The OAuth access token of the user. |
lang |
string | Optional | Not used by this endpoint. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
webhook_url | string | Required |
Response
{
"data": {
"message": "Webhook has been deleted.",
"id": "1234",
"webhook_url": "https://example.com/cryptohopper/webhook"
}
}