Platform · API reference
Webhooks
Signed events sent to your endpoints.
Related guide: Webhooks
The webhook endpoint object
Attributes
endpoint_idstring- ULID.
urlstring- A URL.
event_typesarray of strings["*"]= all events.statusenum- The object's current status. One of
active,disabled. disabled_reasonstring | null- Why the endpoint was disabled; null while active.
api_versionstring- The API version this endpoint's deliveries are rendered at, also sent in their
Provenance-Versionheader. created_attimestamp- When it was created.
secretstring- Signing secret — returned ONCE at create/rotate.
idstring- Unique identifier for the object.
objectenum- The type of object. One of
webhook_endpoint. deletedboolean- Always true for a deleted object.
The webhook endpoint object
{
"id": "we_01M7VG2TWS6YA9MAP6NJVS9TJQ",
"object": "webhook_endpoint",
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved",
"mandate.assessment.denied"
],
"status": "active",
"disabled_reason": null,
"api_version": "2026-11-30",
"created_at": "2026-11-20T03:30:27.865Z",
"secret": "whsec_7L6n4NbZNct2ViiuHADt99AmSp0WrR573EkJgg"
}Events
Sent to your webhook endpoints when they subscribe:
ping
Create a webhook endpoint
POST/v1/webhook_endpoints
Registers a URL to receive signed events of the types you choose, or all of them. The signing secret is returned once.
Parameters
Idempotency-Keystringheader- Retry a create safely: the same key + request returns the stored response (24 h, per caller).
urlstringRequired- A URL.
event_typesarray of strings- The event types, or
*for all. api_versionstring- The API version deliveries are rendered at, such as
2026-11-30. Defaults to the version this request uses.
Returns
The endpoint, with its secret. The secret is shown only once. See the webhook endpoint object.
Errors
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -X POST "$PROVENANCE_API/v1/webhook_endpoints" \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved",
"mandate.assessment.denied"
]
}'const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/webhook_endpoints`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved",
"mandate.assessment.denied"
]
}),
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/webhook_endpoints", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved",
"mandate.assessment.denied"
]
}).json()Response 201
{
"id": "we_01M7VG2TWS6YA9MAP6NJVS9TJQ",
"object": "webhook_endpoint",
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved",
"mandate.assessment.denied"
],
"status": "active",
"disabled_reason": null,
"api_version": "2026-11-30",
"created_at": "2026-11-20T03:30:27.865Z",
"secret": "whsec_7L6n4NbZNct2ViiuHADt99AmSp0WrR573EkJgg"
}Retrieve a webhook delivery
GET/v1/webhook_endpoints/{id}/deliveries/{delivery_id}
One delivery with the event it carried and every attempt (automatic and resent), each with your endpoint's status, latency, a few headers and the first 4 KB of its response.
Parameters
idstringpathRequired- The endpoint's ID.
delivery_idstringpathRequired- The delivery's ID.
Returns
The delivery with its attempts. Deliveries and attempts are kept 30 days.
Errors
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/webhook_endpoints" \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved"
]
}' > step.json
export ENDPOINT_ID=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/webhook_endpoints/$ENDPOINT_ID/test" \
-H "Authorization: Bearer $PROVENANCE_KEY" > step.json
export DELIVERY_ID=$(jq -r '.id' step.json)
curl "$PROVENANCE_API/v1/webhook_endpoints/$ENDPOINT_ID/deliveries/$DELIVERY_ID" \
-H "Authorization: Bearer $PROVENANCE_KEY"const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/webhook_endpoints`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved"
]
}),
})).json();
const endpointId = step1.id;
const step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/webhook_endpoints/${endpointId}/test`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();
const deliveryId = step2.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/webhook_endpoints/${endpointId}/deliveries/${deliveryId}`, {
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/webhook_endpoints", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved"
]
}).json()
endpoint_id = step1["id"]
step2 = httpx.post(f"{api}/v1/webhook_endpoints/{endpoint_id}/test", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
delivery_id = step2["id"]
data = httpx.get(f"{api}/v1/webhook_endpoints/{endpoint_id}/deliveries/{delivery_id}", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()Response 200
{
"id": "dlv_01M6VQBCVC1XZA70T320CX770E",
"object": "webhook_delivery",
"event_id": "evt_01M6VQBCVCG3BXM3WGEA2B4SYY",
"event_type": "ping",
"status": "failed",
"attempts": 1,
"last_status_code": null,
"last_error": "connection failed",
"next_attempt_at": "2026-11-07T19:22:46.604Z",
"delivered_at": null,
"created_at": "2026-11-07T19:21:46.604Z",
"endpoint_id": "we_01M6VQBCVBNAEWF4FBT90GY2QE",
"payload": {
"id": "evt_01M6VQBCVCG3BXM3WGEA2B4SYY",
"object": "event",
"type": "ping",
"created_at": "2026-11-07T19:21:46.604Z",
"environment": "sandbox",
"account_id": "acct_000000000000000000000000000000a2",
"data": {
"message": "This is a test event from Provenance webhooks."
}
},
"delivery_attempts": [
{
"id": "wha_01M6VQBCVCJ8J7F5BF6T1Z4NR7",
"object": "webhook_delivery_attempt",
"attempt_no": 1,
"trigger": "automatic",
"started_at": "2026-11-07T19:21:46.604Z",
"duration_ms": 0,
"status_code": null,
"error": "connection failed",
"response_headers": {},
"response_body": null
}
]
}Retrieve a delivery by ID
GET/v1/webhook_deliveries/{id}
One delivery, whichever endpoint it went to, with the event it carried and every attempt (automatic and resent), each with your endpoint's status, latency, a few headers and the first 4 KB of its response.
Parameters
idstringpathRequired- The delivery's ID.
Returns
The delivery with its attempts. Deliveries and attempts are kept 30 days.
Errors
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/webhook_endpoints" \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved"
]
}' > step.json
export ENDPOINT_ID=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/webhook_endpoints/$ENDPOINT_ID/test" \
-H "Authorization: Bearer $PROVENANCE_KEY" > step.json
export DELIVERY_ID=$(jq -r '.id' step.json)
curl "$PROVENANCE_API/v1/webhook_deliveries/$DELIVERY_ID" \
-H "Authorization: Bearer $PROVENANCE_KEY"const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/webhook_endpoints`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved"
]
}),
})).json();
const endpointId = step1.id;
const step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/webhook_endpoints/${endpointId}/test`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();
const deliveryId = step2.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/webhook_deliveries/${deliveryId}`, {
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/webhook_endpoints", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved"
]
}).json()
endpoint_id = step1["id"]
step2 = httpx.post(f"{api}/v1/webhook_endpoints/{endpoint_id}/test", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
delivery_id = step2["id"]
data = httpx.get(f"{api}/v1/webhook_deliveries/{delivery_id}", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()Response 200
{
"id": "dlv_01M6Z02PKSNMDCKP7T8Z134EJM",
"object": "webhook_delivery",
"event_id": "evt_01M6Z02PKSD9RWRTCFQYP1CG77",
"event_type": "ping",
"status": "failed",
"attempts": 1,
"last_status_code": null,
"last_error": "connection failed",
"next_attempt_at": "2026-11-09T01:53:02.169Z",
"delivered_at": null,
"created_at": "2026-11-09T01:52:02.169Z",
"endpoint_id": "we_01M6Z02PKKSD626PT08479ESJR",
"endpoint_url": "http://localhost:4242/webhooks",
"payload": {
"id": "evt_01M6Z02PKSD9RWRTCFQYP1CG77",
"object": "event",
"type": "ping",
"created_at": "2026-11-09T01:52:02.169Z",
"environment": "sandbox",
"account_id": "acct_000000000000000000000000000000a2",
"data": {
"message": "This is a test event from Provenance webhooks."
}
},
"delivery_attempts": [
{
"id": "wha_01M6Z02PKX3G4AWMZE4M9GEXQX",
"object": "webhook_delivery_attempt",
"attempt_no": 1,
"trigger": "automatic",
"started_at": "2026-11-09T01:52:02.169Z",
"duration_ms": 4,
"status_code": null,
"error": "connection failed",
"response_headers": {},
"response_body": null
}
]
}Update a webhook endpoint
PATCH/v1/webhook_endpoints/{id}
Changes an endpoint's URL, event types or status. Set status active to re-enable a disabled endpoint.
Parameters
idstringpathRequired- The object's ID.
urlstring- A URL.
event_typesarray of strings- The event types, or
*for all. statusenum- The object's current status. One of
active,disabled. api_versionstring- The API version deliveries are rendered at, such as
2026-11-30.
Returns
The updated endpoint. See the webhook endpoint object.
Errors
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/webhook_endpoints" \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved"
]
}' > step.json
export ENDPOINT_ID=$(jq -r '.id' step.json)
curl -X PATCH "$PROVENANCE_API/v1/webhook_endpoints/$ENDPOINT_ID" \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{ "event_types": ["*"] }'const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/webhook_endpoints`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved"
]
}),
})).json();
const endpointId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/webhook_endpoints/${endpointId}`, {
method: "PATCH",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({ "event_types": ["*"] }),
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/webhook_endpoints", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved"
]
}).json()
endpoint_id = step1["id"]
data = httpx.patch(f"{api}/v1/webhook_endpoints/{endpoint_id}", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"event_types": [
"*"
]
}).json()Response 200
{
"id": "we_01M7VG2X9C4NTC9DX7QNNG7KX4",
"object": "webhook_endpoint",
"url": "http://localhost:4242/webhooks",
"event_types": [
"*"
],
"status": "active",
"disabled_reason": null,
"api_version": "2026-11-30",
"created_at": "2026-11-20T03:30:30.316Z"
}List webhook endpoints
GET/v1/webhook_endpoints
Lists your account's webhook endpoints, without their secrets.
Parameters
qstringquery- Search text. Matches when the endpoint's URL or ID contains it, ignoring case. At most 200 characters.
statusarray of enumsquery- Only endpoints in these statuses. One value, or several separated by commas.
Returns
The webhook endpoints. Secrets aren't returned.
Errors
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl "$PROVENANCE_API/v1/webhook_endpoints" \
-H "Authorization: Bearer $PROVENANCE_KEY"const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/webhook_endpoints`, {
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
data = httpx.get(f"{api}/v1/webhook_endpoints", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()Response 200
{
"object": "list",
"data": [],
"has_more": false,
"next_cursor": null
}List webhook deliveries
GET/v1/webhook_endpoints/{id}/deliveries
Lists an endpoint's delivery attempts, newest first, with each status, response code and error.
Parameters
idstringpathRequired- The object's ID.
limitintegerquery- The most items to return, from 1 to 100. The default is 20.
Returns
The endpoint's deliveries, newest first. Finished deliveries and their attempts are kept 30 days; pending and retrying ones until they finish.
Errors
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/webhook_endpoints" \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved"
]
}' > step.json
export ENDPOINT_ID=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/webhook_endpoints/$ENDPOINT_ID/test" \
-H "Authorization: Bearer $PROVENANCE_KEY" > /dev/null
curl "$PROVENANCE_API/v1/webhook_endpoints/$ENDPOINT_ID/deliveries" \
-H "Authorization: Bearer $PROVENANCE_KEY"const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/webhook_endpoints`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved"
]
}),
})).json();
const endpointId = step1.id;
const step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/webhook_endpoints/${endpointId}/test`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/webhook_endpoints/${endpointId}/deliveries`, {
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/webhook_endpoints", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved"
]
}).json()
endpoint_id = step1["id"]
step2 = httpx.post(f"{api}/v1/webhook_endpoints/{endpoint_id}/test", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
data = httpx.get(f"{api}/v1/webhook_endpoints/{endpoint_id}/deliveries", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()Response 200
{
"object": "list",
"data": [
{
"id": "dlv_01M6VQBCVAT8K1TERC64STFV8H",
"object": "webhook_delivery",
"event_id": "evt_01M6VQBCVAAC18V3P0VFJWP2T4",
"event_type": "ping",
"status": "failed",
"attempts": 1,
"last_status_code": null,
"last_error": "connection failed",
"next_attempt_at": "2026-11-07T19:22:46.602Z",
"delivered_at": null,
"created_at": "2026-11-07T19:21:46.602Z"
}
],
"has_more": false,
"next_cursor": null
}List deliveries across endpoints
GET/v1/webhook_deliveries
Lists your account's webhook deliveries to every endpoint, newest first, with filters. Each item names the endpoint it went to. Finished deliveries are kept 30 days; pending and retrying ones until they finish.
Parameters
limitintegerquery- Page size, 1–100 (default 20). Outside the range → 400 parameter_invalid.
cursorstringquery- Opaque; pass a response's
next_cursorback to get the next page. endpoint_idstringquery- Only deliveries to this endpoint.
statusarray of enumsquery- Only deliveries in these statuses. One value, or several separated by commas.
event_typearray of stringsquery- Only deliveries of these event types, such as
mandate.approval.approvedorping. One value, or several separated by commas. qstringquery- Search text. Matches when the delivery's ID, the event's ID or the event type contains it, ignoring case. At most 200 characters.
created_gtetimestampquery- Only deliveries created at or after this time.
created_ltetimestampquery- Only deliveries created at or before this time.
Returns
One page of deliveries, newest first.
Errors
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/webhook_endpoints" \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved"
]
}' > step.json
export ENDPOINT_ID=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/webhook_endpoints/$ENDPOINT_ID/test" \
-H "Authorization: Bearer $PROVENANCE_KEY" > step.json
export DELIVERY_ID=$(jq -r '.id' step.json)
curl "$PROVENANCE_API/v1/webhook_deliveries?status=failed%2Cexhausted" \
-H "Authorization: Bearer $PROVENANCE_KEY"const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/webhook_endpoints`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved"
]
}),
})).json();
const endpointId = step1.id;
const step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/webhook_endpoints/${endpointId}/test`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();
const deliveryId = step2.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/webhook_deliveries?status=failed%2Cexhausted`, {
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/webhook_endpoints", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved"
]
}).json()
endpoint_id = step1["id"]
step2 = httpx.post(f"{api}/v1/webhook_endpoints/{endpoint_id}/test", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
delivery_id = step2["id"]
data = httpx.get(f"{api}/v1/webhook_deliveries?status=failed%2Cexhausted", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()Response 200
{
"object": "list",
"data": [
{
"id": "dlv_01M6Z02FN4PMY8923G1P8RFRZ2",
"object": "webhook_delivery",
"event_id": "evt_01M6Z02FN4F8JYCCDFQX6ABMXY",
"event_type": "ping",
"status": "failed",
"attempts": 1,
"last_status_code": null,
"last_error": "connection failed",
"next_attempt_at": "2026-11-09T01:52:55.044Z",
"delivered_at": null,
"created_at": "2026-11-09T01:51:55.044Z",
"endpoint_id": "we_01M6Z02FMZFJ9ZEXW9FP2S57P0",
"endpoint_url": "http://localhost:4242/webhooks"
}
],
"has_more": false,
"next_cursor": null
}Delete a webhook endpoint
DELETE/v1/webhook_endpoints/{id}
Deletes an endpoint. Undelivered events to it are dropped.
Parameters
idstringpathRequired- The object's ID.
Returns
The deleted object. See the webhook endpoint object.
Errors
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/webhook_endpoints" \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved"
]
}' > step.json
export ENDPOINT_ID=$(jq -r '.id' step.json)
curl -X DELETE "$PROVENANCE_API/v1/webhook_endpoints/$ENDPOINT_ID" \
-H "Authorization: Bearer $PROVENANCE_KEY"const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/webhook_endpoints`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved"
]
}),
})).json();
const endpointId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/webhook_endpoints/${endpointId}`, {
method: "DELETE",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/webhook_endpoints", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved"
]
}).json()
endpoint_id = step1["id"]
data = httpx.delete(f"{api}/v1/webhook_endpoints/{endpoint_id}", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()Response 200
{
"id": "we_01M6VQBCV3CJFKE4DX5NNAY8Z8",
"object": "webhook_endpoint",
"deleted": true
}Rotate a webhook secret
POST/v1/webhook_endpoints/{id}/rotate_secret
Replaces an endpoint's signing secret and returns the new one, once. The old secret stops verifying at once, or, with previous_secret_expires_in, keeps signing beside the new one for up to 24 hours.
Parameters
Idempotency-Keystringheader- Retry a create safely: the same key + request returns the stored response (24 h, per caller).
idstringpathRequired- The object's ID.
previous_secret_expires_ininteger- Seconds the replaced secret keeps signing beside the new one (up to 24 hours). Leave it out to stop the old secret now.
Returns
The endpoint with a new secret. It's shown only once.
Errors
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/webhook_endpoints" \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved"
]
}' > step.json
export ENDPOINT_ID=$(jq -r '.id' step.json)
curl -X POST "$PROVENANCE_API/v1/webhook_endpoints/$ENDPOINT_ID/rotate_secret" \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{ "previous_secret_expires_in": 86400 }'const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/webhook_endpoints`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved"
]
}),
})).json();
const endpointId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/webhook_endpoints/${endpointId}/rotate_secret`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({ "previous_secret_expires_in": 86400 }),
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/webhook_endpoints", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved"
]
}).json()
endpoint_id = step1["id"]
data = httpx.post(f"{api}/v1/webhook_endpoints/{endpoint_id}/rotate_secret", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"previous_secret_expires_in": 86400
}).json()Response 200
{
"id": "we_01M7W7Y8NV9N69A2QP1B96CZ1M",
"object": "webhook_endpoint",
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved"
],
"status": "active",
"disabled_reason": null,
"api_version": "2026-11-30",
"created_at": "2026-11-20T10:27:23.963Z",
"secret": "whsec_kste75cSMHDTMgMWLvdRtzXXzrkoRogM4ExRa7",
"previous_secret_expires_at": "2026-11-21T10:27:23.971Z"
}Send a test event
POST/v1/webhook_endpoints/{id}/test
Sends a signed ping event to the endpoint and returns the delivery.
Parameters
Idempotency-Keystringheader- Retry a create safely: the same key + request returns the stored response (24 h, per caller).
idstringpathRequired- The object's ID.
Returns
The test delivery.
Errors
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/webhook_endpoints" \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved"
]
}' > step.json
export ENDPOINT_ID=$(jq -r '.id' step.json)
curl -X POST "$PROVENANCE_API/v1/webhook_endpoints/$ENDPOINT_ID/test" \
-H "Authorization: Bearer $PROVENANCE_KEY"const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/webhook_endpoints`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved"
]
}),
})).json();
const endpointId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/webhook_endpoints/${endpointId}/test`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/webhook_endpoints", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved"
]
}).json()
endpoint_id = step1["id"]
data = httpx.post(f"{api}/v1/webhook_endpoints/{endpoint_id}/test", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()Response 200
{
"id": "dlv_01M6VQBCV5QV6WR4AZ4M112MK0",
"object": "webhook_delivery",
"event_id": "evt_01M6VQBCV5C17RXAMN3ZGH3049",
"event_type": "ping",
"status": "failed",
"attempts": 1,
"last_status_code": null,
"last_error": "connection failed",
"next_attempt_at": "2026-11-07T19:22:46.597Z",
"delivered_at": null,
"created_at": "2026-11-07T19:21:46.597Z"
}Resend a webhook delivery
POST/v1/webhook_deliveries/{id}/resend
Sends a delivery again now, signed fresh, as a new attempt on the same delivery with the same event ID. A failure leaves the automatic retries as they were. 30 a minute per account.
Parameters
Idempotency-Keystringheader- Retry a create safely: the same key + request returns the stored response (24 h, per caller).
idstringpathRequired- The delivery's ID.
Returns
The delivery after the attempt, with every attempt.
Errors
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/webhook_endpoints" \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved"
]
}' > step.json
export ENDPOINT_ID=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/webhook_endpoints/$ENDPOINT_ID/test" \
-H "Authorization: Bearer $PROVENANCE_KEY" > step.json
export DELIVERY_ID=$(jq -r '.id' step.json)
curl -X POST "$PROVENANCE_API/v1/webhook_deliveries/$DELIVERY_ID/resend" \
-H "Authorization: Bearer $PROVENANCE_KEY"const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/webhook_endpoints`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved"
]
}),
})).json();
const endpointId = step1.id;
const step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/webhook_endpoints/${endpointId}/test`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();
const deliveryId = step2.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/webhook_deliveries/${deliveryId}/resend`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/webhook_endpoints", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved"
]
}).json()
endpoint_id = step1["id"]
step2 = httpx.post(f"{api}/v1/webhook_endpoints/{endpoint_id}/test", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
delivery_id = step2["id"]
data = httpx.post(f"{api}/v1/webhook_deliveries/{delivery_id}/resend", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()Response 200
{
"id": "dlv_01M6VQBCVE8BEYMKC9XNH6SSPG",
"object": "webhook_delivery",
"event_id": "evt_01M6VQBCVE0EQPYC4CZKRCA12Q",
"event_type": "ping",
"status": "failed",
"attempts": 1,
"last_status_code": null,
"last_error": "connection failed",
"next_attempt_at": "2026-11-07T19:22:46.606Z",
"delivered_at": null,
"created_at": "2026-11-07T19:21:46.606Z",
"endpoint_id": "we_01M6VQBCVDXFGTRWWNQTVTHG22",
"delivery_attempts": [
{
"id": "wha_01M6VQBCVFF26ZBYT28PZC1VV8",
"object": "webhook_delivery_attempt",
"attempt_no": 1,
"trigger": "automatic",
"started_at": "2026-11-07T19:21:46.606Z",
"duration_ms": 1,
"status_code": null,
"error": "connection failed",
"response_headers": {},
"response_body": null
},
{
"id": "wha_01M6VQBCVG3GJXMZ5F3F47WTDG",
"object": "webhook_delivery_attempt",
"attempt_no": 2,
"trigger": "resend",
"started_at": "2026-11-07T19:21:46.607Z",
"duration_ms": 1,
"status_code": null,
"error": "connection failed",
"response_headers": {},
"response_body": null
}
]
}Replay events to an endpoint
POST/v1/webhook_endpoints/{id}/replay
Queues a fresh delivery to the endpoint for every stored event since a time (and before until) that the endpoint subscribes to, oldest first: recovery after an outage. Up to 10,000 per call; 10 calls an hour per account.
Parameters
Idempotency-Keystringheader- Retry a create safely: the same key + request returns the stored response (24 h, per caller).
idstringpathRequired- The endpoint's ID.
sincetimestampRequired- Replay events at or after this time.
untiltimestamp- Replay events at or before this time (default now).
typesarray of strings- Only these event types (within the endpoint's subscription).
Returns
The deliveries were queued; the worker sends them like any other.
Errors
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/webhook_endpoints" \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.intent.revoked"
]
}' > step.json
export ENDPOINT_ID=$(jq -r '.id' step.json)
curl -X POST "$PROVENANCE_API/v1/webhook_endpoints/$ENDPOINT_ID/replay" \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{ "since": "2026-11-01T00:00:00Z", "types": ["mandate.intent.revoked"] }'const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/webhook_endpoints`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.intent.revoked"
]
}),
})).json();
const endpointId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/webhook_endpoints/${endpointId}/replay`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({ "since": "2026-11-01T00:00:00Z", "types": ["mandate.intent.revoked"] }),
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/webhook_endpoints", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.intent.revoked"
]
}).json()
endpoint_id = step1["id"]
data = httpx.post(f"{api}/v1/webhook_endpoints/{endpoint_id}/replay", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"since": "2026-11-01T00:00:00Z",
"types": [
"mandate.intent.revoked"
]
}).json()Response 202
{
"object": "webhook_replay",
"endpoint_id": "we_01M6VQBCVH6GYT9GWN41KWK8AF",
"since": "2026-11-01T00:00:00Z",
"until": null,
"types": [
"mandate.intent.revoked"
],
"queued": 0,
"max_events": 10000,
"capped": false,
"resume_since": null
}