webhooks.toggle
Pause or resume a webhook.
Details
- Endpoint
- POST /v0/webhooks/:webhookID/toggle
- Credits
- Free
- Rate class
- Light. Counts against your light requests per second.
Send enabled: true or false, or nothing to flip the current state. A resumed webhook continues from the live tip; use replay to backfill the gap. Pending retries wait while it is paused.
Parameters
| Name | Type | Description |
|---|---|---|
| webhookIDrequired | string | The webhook id. |
| enabled | boolean | Target state. Omit to flip. |
Request
Send your key in the x-api-key header, or leave it out to use the keyless tier.
curl
curl -X POST "https://api.tide.ad/v0/webhooks/00000000-0000-0000-0000-000000000000/toggle" \
-H "x-api-key: YOUR_API_KEY" \
-H "content-type: application/json" \
-d '{
"enabled": false
}'TypeScript
const res = await fetch("https://api.tide.ad/v0/webhooks/00000000-0000-0000-0000-000000000000/toggle", {
method: "POST",
headers: {
"x-api-key": process.env.TIDE_API_KEY!,
"content-type": "application/json",
},
body: JSON.stringify({
"enabled": false
}),
});
const data = await res.json();Response
No example response is available for this method yet.