Skip to main content

Unsubscribe from a webhook

warning

This is a V1 legacy endpoint. It uses a different path /rest/v1 and may return different error codes and response formats compared to V2. While it remains functional, consider handling errors accordingly.

Use this endpoint to stop receiving notifications for specific events through a webhook.

Request

Endpoint

POST https://api.woodpecker.co/rest/v1/webhooks/unsubscribe

Headers

x-api-key: {YOUR_API_KEY}
Content-type: application/json

For details on how to authenticate your requests, please see the authentication guide.

Body

{ 
"target_url": "https://receiving-url.com/unique_target_url",
"event": "EVENT_NAME"
}

Body schema

FieldTypeDescription
target_urlstringThe URL where webhook events are currently delivered
eventstringEvent you would like to unsubscribe from Available events

Request sample

Subscribe to a webhook

curl --request POST \
--url "https://api.woodpecker.co/rest/v1/webhooks/unsubscribe" \
--header "Content-Type: application/json" \
--header "x-api-key: {YOUR_API_KEY}" \
--data '{
"target_url": "https://receiving-url.com/unique_target_url",
"event": "EVENT_NAME"
}'

Response

Response examples

Successfully unsubscribed

Status: 200
Body: none