Update a webhook subscription
PATCH
/webhook-subscriptions/{subscription_id}Authorization
X-API-KeyAPI key · headerrequiredAPI key in format `sk_*`. Scoped to your partner account; server-side use only.
Path parameters
subscription_idstring<uuid>requiredRequest body
requiredapplication/jsonactivebooleanevent_typesWebhookEventType[]min items 1
urlstring<uri>HTTPS only. Loopback, private, link-local, and cloud-metadata destinations—and redirects to them—are rejected.
matches ^https://
Responses
200Subscription updated.
idstring<uuid>requiredurlstring<uri>requiredmatches ^https://
event_typesWebhookEventType[]requiredactivebooleanrequiredcreated_atstring<date-time>required400Validation failed.
codeErrorCoderequiredStable machine-readable error vocabulary for v1.
Allowed:
validation_errorstate_conflictenvironment_mismatchunsupported_destinationinvalid_api_keynot_foundrate_limitedextraobjectrequiredStructured details such as field errors or SKU availability.
messagestringrequiredHuman-readable summary.
401Missing, invalid, expired, or environment-mismatched API key.
codeErrorCoderequiredStable machine-readable error vocabulary for v1.
Allowed:
validation_errorstate_conflictenvironment_mismatchunsupported_destinationinvalid_api_keynot_foundrate_limitedextraobjectrequiredStructured details such as field errors or SKU availability.
messagestringrequiredHuman-readable summary.
404No such resource exists for this partner and environment.
codeErrorCoderequiredStable machine-readable error vocabulary for v1.
Allowed:
validation_errorstate_conflictenvironment_mismatchunsupported_destinationinvalid_api_keynot_foundrate_limitedextraobjectrequiredStructured details such as field errors or SKU availability.
messagestringrequiredHuman-readable summary.
429Rate limit exceeded for this API key.
codeErrorCoderequiredStable machine-readable error vocabulary for v1.
Allowed:
validation_errorstate_conflictenvironment_mismatchunsupported_destinationinvalid_api_keynot_foundrate_limitedextraobjectrequiredStructured details such as field errors or SKU availability.
messagestringrequiredHuman-readable summary.
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X PATCH "https://api.vault.stashtab.gg/v1/webhook-subscriptions/497f6eca-6276-4993-bfeb-53cbbbba6f08" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"active": true,
"event_types": [
"item.intake.completed"
],
"url": "http://example.com"
}'const response = await fetch("https://api.vault.stashtab.gg/v1/webhook-subscriptions/497f6eca-6276-4993-bfeb-53cbbbba6f08", {
method: "PATCH",
headers: {
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"active": true,
"event_types": [
"item.intake.completed"
],
"url": "http://example.com"
})
});Response
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"url": "http://example.com",
"event_types": [
"item.intake.completed"
],
"active": true,
"created_at": "2019-08-24T14:15:22Z"
}{
"code": "validation_error",
"extra": {},
"message": "string"
}{
"code": "validation_error",
"extra": {},
"message": "string"
}{
"code": "validation_error",
"extra": {},
"message": "string"
}{
"code": "validation_error",
"extra": {},
"message": "string"
}