Webhook Endpoints
The 10 operations under webhook-endpoints, as typed calls on the generated REST client.
Webhook Endpoints
Available from @codespar/sdk 0.12.0; the version on npm is 0.12.0. Every example on this page is compiled against the installed package when these docs build: a call that does not type-check fails the build.
Every call below is cs.api reaching one operation of the OpenAPI document this page was generated from; the REST client overview explains request, response, the option bag and the errors. The values are placeholders shaped by the document.
import { } from "@codespar/sdk";
const = new ({ : .. });GET /v1/webhook-endpoints
/v1/webhook-endpointsList triggers
const = await ..("/v1/webhook-endpoints");Parameters, body and every documented response: GET /v1/webhook-endpoints in the HTTP reference.
POST /v1/webhook-endpoints
/v1/webhook-endpointsSubscribe a webhook to an event
const = await ..("/v1/webhook-endpoints", {
: {
: "Example",
: "string",
: "srv_0000000000000000",
: "https://example.com/hook"
}
});Parameters, body and every documented response: POST /v1/webhook-endpoints in the HTTP reference.
POST /v1/webhook-endpoints/deliveries/{delivery_id}/redeliver
/v1/webhook-endpoints/deliveries/{delivery_id}/redeliverQueue a delivery to be sent again
const = await ..("/v1/webhook-endpoints/deliveries/{delivery_id}/redeliver", {
: {
: "delivery_0000000000000000"
}
});Parameters, body and every documented response: POST /v1/webhook-endpoints/deliveries/{delivery_id}/redeliver in the HTTP reference.
POST /v1/webhook-endpoints/retry-pending
/v1/webhook-endpoints/retry-pendingDrain the retry queue for this project
const = await ..("/v1/webhook-endpoints/retry-pending");Parameters, body and every documented response: POST /v1/webhook-endpoints/retry-pending in the HTTP reference.
GET /v1/webhook-endpoints/{id}
/v1/webhook-endpoints/{id}Read one webhook endpoint
const = await ..("/v1/webhook-endpoints/{id}", {
: {
: "webhookendpoint_0000000000000000"
}
});Parameters, body and every documented response: GET /v1/webhook-endpoints/{id} in the HTTP reference.
DELETE /v1/webhook-endpoints/{id}
/v1/webhook-endpoints/{id}Delete a webhook endpoint
const = await ..("/v1/webhook-endpoints/{id}", {
: {
: "webhookendpoint_0000000000000000"
}
});Parameters, body and every documented response: DELETE /v1/webhook-endpoints/{id} in the HTTP reference.
GET /v1/webhook-endpoints/{id}/deliveries
/v1/webhook-endpoints/{id}/deliveriesList recent delivery attempts
const = await ..("/v1/webhook-endpoints/{id}/deliveries", {
: {
: "webhookendpoint_0000000000000000"
}
});Parameters, body and every documented response: GET /v1/webhook-endpoints/{id}/deliveries in the HTTP reference.
GET /v1/webhook-endpoints/{id}/deliveries/{delivery_id}
/v1/webhook-endpoints/{id}/deliveries/{delivery_id}Inspect one delivery attempt
const = await ..("/v1/webhook-endpoints/{id}/deliveries/{delivery_id}", {
: {
: "webhookendpoint_0000000000000000",
: "delivery_0000000000000000"
}
});Parameters, body and every documented response: GET /v1/webhook-endpoints/{id}/deliveries/{delivery_id} in the HTTP reference.
GET /v1/webhook-endpoints/{id}/dlq
/v1/webhook-endpoints/{id}/dlqList dead lettered deliveries
const = await ..("/v1/webhook-endpoints/{id}/dlq", {
: {
: "webhookendpoint_0000000000000000"
}
});Parameters, body and every documented response: GET /v1/webhook-endpoints/{id}/dlq in the HTTP reference.
POST /v1/webhook-endpoints/{id}/rotate-secret
/v1/webhook-endpoints/{id}/rotate-secretMint a new signing secret for a webhook endpoint
const = await ..("/v1/webhook-endpoints/{id}/rotate-secret", {
: {
: "webhookendpoint_0000000000000000"
}
});Parameters, body and every documented response: POST /v1/webhook-endpoints/{id}/rotate-secret in the HTTP reference.