Skip to Content
Won.dev

Delete a webhook

Stop sending events to a webhook. Free.

DELETE https://api.won.dev/v1/webhooks/{id}

Stops sending events to a webhook and forgets it, with the deliveries that were still waiting. The events themselves stay readable with GET /events. Free.

  • Billing: Free.

Parameters

id is part of the path. DELETE requests also take an Idempotency-Key header, see Sending a request twice.

ParameterTypeRequiredDescription
idstringyesWebhook ID, such as whk_2m9x7p1q8w3e5r4k.

Response

Errors are described in Errors.

FieldTypeDescription
dataobjectThe webhook that was deleted.
data.idstringThe webhook that was deleted.
data.deletedbooleanAlways true: the webhook is gone.
noticestring | nullA plain sentence when there is something to know about this answer. Null otherwise.
usageobjectNothing is charged here. The balance, for reference.
usage.costnumberWhat this call cost, in US dollars.
usage.balancenumberThe balance left after this call, in US dollars.
usage.replayedbooleanTrue when this is a repeat of a request from the last 24 hours. Repeats are free.

Example

curl -X DELETE "https://api.won.dev/v1/webhooks/whk_2m9x7p1q8w3e5r4k" \
  -H "Authorization: Bearer $WON_API_KEY"
{
  "data": {
    "id": "whk_2m9x7p1q8w3e5r4k",
    "deleted": true
  },
  "notice": null,
  "usage": {
    "cost": 0,
    "balance": 48.08,
    "replayed": false
  }
}

A test key (won_test_...) runs this in the sandbox: nothing is sent and nothing is charged.

On this page