SDK reference · Node SDK

prov.webhooks.deliveries

prov.webhooks.deliveries in Node SDK.

Signature

prov.webhooks.deliveries(id: string, params?: { limit?: number }): Promise<{ data: WebhookDelivery[] }>

Parameters

idstringRequired
params{ limit?: number }

Request fields

idstringpathRequired
The object's ID.
limitintegerquery
The most items to return, from 1 to 100. The default is 20.

Returns

Promise<{ data: WebhookDelivery[] }> The endpoint's deliveries, newest first. Finished deliveries and their attempts are kept 30 days; pending and retrying ones until they finish.

HTTP operation

GET /v1/webhook_endpoints/{id}/deliveries: List webhook deliveries

Errors

Example

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();

Was this page helpful? Send us feedback

LLM? Read llms.txt.