Skip to main content
REST client

Webhook Endpoints

The 10 operations under webhook-endpoints, as typed calls on the generated REST client.

1 min read
View MarkdownEdit on GitHub

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

GET/v1/webhook-endpoints

List triggers

const  = await ..("/v1/webhook-endpoints");

Parameters, body and every documented response: GET /v1/webhook-endpoints in the HTTP reference.

POST /v1/webhook-endpoints

POST/v1/webhook-endpoints

Subscribe 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

POST/v1/webhook-endpoints/deliveries/{delivery_id}/redeliver

Queue 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

POST/v1/webhook-endpoints/retry-pending

Drain 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}

GET/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}

DELETE/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

GET/v1/webhook-endpoints/{id}/deliveries

List 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}

GET/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

GET/v1/webhook-endpoints/{id}/dlq

List 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

POST/v1/webhook-endpoints/{id}/rotate-secret

Mint 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.

Webhook Endpoints | CodeSpar