curl --request PATCH \
--url https://test-api.shodai.network/v0/webhooks/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"status": "active",
"filters": {
"inputIds": [
"submitInitialPaymentProof"
]
}
}
'const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({status: 'active', filters: {inputIds: ['submitInitialPaymentProof']}})
};
fetch('https://test-api.shodai.network/v0/webhooks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "wh_123",
"principalId": "account_123",
"createdByApiKeyId": null,
"url": "https://example.com/shodai/webhooks",
"status": "active",
"eventTypes": [
"agreement.transitioned",
"agreement.notification.triggered"
],
"filters": {
"templateIds": [
"did:template:service-retainer-v0-1"
]
},
"createdAt": "2026-05-26T16:00:00.000Z",
"updatedAt": "2026-05-26T16:00:00.000Z"
},
"meta": {
"apiVersion": "v0",
"requestId": "req_123"
}
}{
"error": {
"code": "unauthorized",
"message": "Missing API credential",
"requestId": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "unauthorized",
"message": "Missing API credential",
"requestId": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "unauthorized",
"message": "Missing API credential",
"requestId": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "unauthorized",
"message": "Missing API credential",
"requestId": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "unauthorized",
"message": "Missing API credential",
"requestId": "<string>",
"details": "<unknown>"
}
}Update webhook
Updates a webhook URL, event types, filters, or status. The signing secret is not returned after creation.
curl --request PATCH \
--url https://test-api.shodai.network/v0/webhooks/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"status": "active",
"filters": {
"inputIds": [
"submitInitialPaymentProof"
]
}
}
'const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({status: 'active', filters: {inputIds: ['submitInitialPaymentProof']}})
};
fetch('https://test-api.shodai.network/v0/webhooks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "wh_123",
"principalId": "account_123",
"createdByApiKeyId": null,
"url": "https://example.com/shodai/webhooks",
"status": "active",
"eventTypes": [
"agreement.transitioned",
"agreement.notification.triggered"
],
"filters": {
"templateIds": [
"did:template:service-retainer-v0-1"
]
},
"createdAt": "2026-05-26T16:00:00.000Z",
"updatedAt": "2026-05-26T16:00:00.000Z"
},
"meta": {
"apiVersion": "v0",
"requestId": "req_123"
}
}{
"error": {
"code": "unauthorized",
"message": "Missing API credential",
"requestId": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "unauthorized",
"message": "Missing API credential",
"requestId": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "unauthorized",
"message": "Missing API credential",
"requestId": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "unauthorized",
"message": "Missing API credential",
"requestId": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "unauthorized",
"message": "Missing API credential",
"requestId": "<string>",
"details": "<unknown>"
}
}Authorizations
Canonical API-key credential. Send X-API-Key: cns_pk_..., or Authorization: Bearer cns_pk_... only as an API-key compatibility alias.
Path Parameters
Webhook subscription ID.
Body
Replacement HTTPS endpoint URL.
Enable or disable delivery.
active, disabled Replacement subscribable event types. On update, omitted eventTypes leaves the current value unchanged; null or an empty array resets to agreement.transitioned.
agreement.transitioned, agreement.notification.triggered Replacement filters. On update, omitted filters leaves the current value unchanged; null or an empty object erases every filter, after which the subscription receives every event it is subscribed to.
Show child attributes
Show child attributes
Response
Updated webhook subscription.
Show child attributes
Show child attributes
{ "id": "wh_123", "principalId": "account_123", "createdByApiKeyId": null, "url": "https://example.com/shodai/webhooks", "status": "active", "eventTypes": [ "agreement.transitioned", "agreement.notification.triggered" ], "filters": { "templateIds": ["did:template:service-retainer-v0-1"] }, "createdAt": "2026-05-26T16:00:00.000Z", "updatedAt": "2026-05-26T16:00:00.000Z" }
Show child attributes
Show child attributes
Was this page helpful?