API Referencesdks@platform/sdk-webhooks

@platform/sdk-webhooks

Typed TypeScript client for services/webhooks. The page is generated from the SDK package source plus its generated OpenAPI types.

Installation

npm install @platform/sdk-webhooks

You’ll also need the shared auth/client helpers:

npm install @platform/hosts @platform/sdk

Quick start

import { LoopClient } from "@platform/sdk";
import { platformHost, SERVICE_NAMES } from "@platform/hosts";
import { createWebhooksClient } from "@platform/sdk-webhooks";
 
const loop = new LoopClient({
  clientId: process.env.LOOP_CLIENT_ID!,
  clientSecret: process.env.LOOP_CLIENT_SECRET!,
  redirectUri: "https://your-app.example.com/auth/loop/callback",
});
 
const webhooks = createWebhooksClient({
  baseUrl: platformHost({ service: SERVICE_NAMES.WEBHOOKS }),
  accessToken: tokens.access_token,
});

Use the convenience helpers below when the SDK exposes them, or call the typed endpoint methods directly with GET / POST / PATCH / DELETE.

Convenience helpers

This SDK does not add convenience helpers beyond the typed endpoint calls below.

Endpoint calls

GET /readyz

Underlying REST endpoint: GET /readyz

Parameters

None

Return type

Promise<{
  data?: paths["/readyz"]["get"]["responses"]["200"]["content"]["application/json"];
  error?: unknown;
  response: Response;
}>

Example

const result = await webhooks.GET("/readyz");

POST /v1/connect/webhooks/{delivery_id}/replay

Underlying REST endpoint: POST /v1/connect/webhooks/\{delivery_id\}/replay

Parameters

  • path: paths["/v1/connect/webhooks/{delivery_id}/replay"]["post"]["parameters"]["path"]

Return type

Promise<{
  data?: paths["/v1/connect/webhooks/{delivery_id}/replay"]["post"]["responses"]["200"]["content"]["application/json"];
  error?: unknown;
  response: Response;
}>

Example

const result = await webhooks.POST("/v1/connect/webhooks/{delivery_id}/replay", {
  params: {
    path: {
      delivery_id: "<delivery_id>",
    },
  },
});

POST /v1/webhooks/bigcommerce

Underlying REST endpoint: POST /v1/webhooks/bigcommerce

Parameters

  • body: paths["/v1/webhooks/bigcommerce"]["post"]["requestBody"]["content"]["application/json"]

Return type

Promise<{
  data?: paths["/v1/webhooks/bigcommerce"]["post"]["responses"]["200"]["content"]["application/json"];
  error?: unknown;
  response: Response;
}>

Example

const result = await webhooks.POST("/v1/webhooks/bigcommerce", {
  body: {
    /* paths["/v1/webhooks/bigcommerce"]["post"]["requestBody"]["content"]["application/json"] */
  },
});

POST /v1/webhooks/blooio

Underlying REST endpoint: POST /v1/webhooks/blooio

Parameters

  • body: paths["/v1/webhooks/blooio"]["post"]["requestBody"]["content"]["application/json"]

Return type

Promise<{
  data?: paths["/v1/webhooks/blooio"]["post"]["responses"]["200"]["content"]["application/json"];
  error?: unknown;
  response: Response;
}>

Example

const result = await webhooks.POST("/v1/webhooks/blooio", {
  body: {
    /* paths["/v1/webhooks/blooio"]["post"]["requestBody"]["content"]["application/json"] */
  },
});

POST /v1/webhooks/calcom

Underlying REST endpoint: POST /v1/webhooks/calcom

Parameters

  • body: paths["/v1/webhooks/calcom"]["post"]["requestBody"]["content"]["application/json"]

Return type

Promise<{
  data?: paths["/v1/webhooks/calcom"]["post"]["responses"]["200"]["content"]["application/json"];
  error?: unknown;
  response: Response;
}>

Example

const result = await webhooks.POST("/v1/webhooks/calcom", {
  body: {
    /* paths["/v1/webhooks/calcom"]["post"]["requestBody"]["content"]["application/json"] */
  },
});

POST /v1/webhooks/calendly

Underlying REST endpoint: POST /v1/webhooks/calendly

Parameters

  • body: paths["/v1/webhooks/calendly"]["post"]["requestBody"]["content"]["application/json"]

Return type

Promise<{
  data?: paths["/v1/webhooks/calendly"]["post"]["responses"]["200"]["content"]["application/json"];
  error?: unknown;
  response: Response;
}>

Example

const result = await webhooks.POST("/v1/webhooks/calendly", {
  body: {
    /* paths["/v1/webhooks/calendly"]["post"]["requestBody"]["content"]["application/json"] */
  },
});

POST /v1/webhooks/elevenlabs

Underlying REST endpoint: POST /v1/webhooks/elevenlabs

Parameters

  • body: paths["/v1/webhooks/elevenlabs"]["post"]["requestBody"]["content"]["application/json"]

Return type

Promise<{
  data?: paths["/v1/webhooks/elevenlabs"]["post"]["responses"]["200"]["content"]["application/json"];
  error?: unknown;
  response: Response;
}>

Example

const result = await webhooks.POST("/v1/webhooks/elevenlabs", {
  body: {
    /* paths["/v1/webhooks/elevenlabs"]["post"]["requestBody"]["content"]["application/json"] */
  },
});

POST /v1/webhooks/junction

Underlying REST endpoint: POST /v1/webhooks/junction

Parameters

  • body: paths["/v1/webhooks/junction"]["post"]["requestBody"]["content"]["application/json"]

Return type

Promise<{
  data?: paths["/v1/webhooks/junction"]["post"]["responses"]["200"]["content"]["application/json"];
  error?: unknown;
  response: Response;
}>

Example

const result = await webhooks.POST("/v1/webhooks/junction", {
  body: {
    /* paths["/v1/webhooks/junction"]["post"]["requestBody"]["content"]["application/json"] */
  },
});

POST /v1/webhooks/junction-labs

Underlying REST endpoint: POST /v1/webhooks/junction-labs

Parameters

  • body: paths["/v1/webhooks/junction-labs"]["post"]["requestBody"]["content"]["application/json"]

Return type

Promise<{
  data?: paths["/v1/webhooks/junction-labs"]["post"]["responses"]["200"]["content"]["application/json"];
  error?: unknown;
  response: Response;
}>

Example

const result = await webhooks.POST("/v1/webhooks/junction-labs", {
  body: {
    /* paths["/v1/webhooks/junction-labs"]["post"]["requestBody"]["content"]["application/json"] */
  },
});

POST /v1/webhooks/junction-link

Underlying REST endpoint: POST /v1/webhooks/junction-link

Parameters

  • body: paths["/v1/webhooks/junction-link"]["post"]["requestBody"]["content"]["application/json"]

Return type

Promise<{
  data?: paths["/v1/webhooks/junction-link"]["post"]["responses"]["200"]["content"]["application/json"];
  error?: unknown;
  response: Response;
}>

Example

const result = await webhooks.POST("/v1/webhooks/junction-link", {
  body: {
    /* paths["/v1/webhooks/junction-link"]["post"]["requestBody"]["content"]["application/json"] */
  },
});

GET /v1/webhooks/me/deliveries

Underlying REST endpoint: GET /v1/webhooks/me/deliveries

Parameters

  • query?: paths["/v1/webhooks/me/deliveries"]["get"]["parameters"]["query"]

Return type

Promise<{
  data?: paths["/v1/webhooks/me/deliveries"]["get"]["responses"]["200"]["content"]["application/json"];
  error?: unknown;
  response: Response;
}>

Example

const result = await webhooks.GET("/v1/webhooks/me/deliveries", {
  params: {
    query: {
      /* paths["/v1/webhooks/me/deliveries"]["get"]["parameters"]["query"] */
    },
  },
});

POST /v1/webhooks/postmark

Underlying REST endpoint: POST /v1/webhooks/postmark

Parameters

  • body: paths["/v1/webhooks/postmark"]["post"]["requestBody"]["content"]["application/json"]

Return type

Promise<{
  data?: paths["/v1/webhooks/postmark"]["post"]["responses"]["200"]["content"]["application/json"];
  error?: unknown;
  response: Response;
}>

Example

const result = await webhooks.POST("/v1/webhooks/postmark", {
  body: {
    /* paths["/v1/webhooks/postmark"]["post"]["requestBody"]["content"]["application/json"] */
  },
});

POST /v1/webhooks/quo

Underlying REST endpoint: POST /v1/webhooks/quo

Parameters

  • body: paths["/v1/webhooks/quo"]["post"]["requestBody"]["content"]["application/json"]

Return type

Promise<{
  data?: paths["/v1/webhooks/quo"]["post"]["responses"]["200"]["content"]["application/json"];
  error?: unknown;
  response: Response;
}>

Example

const result = await webhooks.POST("/v1/webhooks/quo", {
  body: {
    /* paths["/v1/webhooks/quo"]["post"]["requestBody"]["content"]["application/json"] */
  },
});

POST /v1/webhooks/recharge

Underlying REST endpoint: POST /v1/webhooks/recharge

Parameters

  • body: paths["/v1/webhooks/recharge"]["post"]["requestBody"]["content"]["application/json"]

Return type

Promise<{
  data?: paths["/v1/webhooks/recharge"]["post"]["responses"]["200"]["content"]["application/json"];
  error?: unknown;
  response: Response;
}>

Example

const result = await webhooks.POST("/v1/webhooks/recharge", {
  body: {
    /* paths["/v1/webhooks/recharge"]["post"]["requestBody"]["content"]["application/json"] */
  },
});

POST /v1/webhooks/resend

Underlying REST endpoint: POST /v1/webhooks/resend

Parameters

  • body: paths["/v1/webhooks/resend"]["post"]["requestBody"]["content"]["application/json"]

Return type

Promise<{
  data?: paths["/v1/webhooks/resend"]["post"]["responses"]["200"]["content"]["application/json"];
  error?: unknown;
  response: Response;
}>

Example

const result = await webhooks.POST("/v1/webhooks/resend", {
  body: {
    /* paths["/v1/webhooks/resend"]["post"]["requestBody"]["content"]["application/json"] */
  },
});

POST /v1/webhooks/rimo

Underlying REST endpoint: POST /v1/webhooks/rimo

Parameters

  • body: paths["/v1/webhooks/rimo"]["post"]["requestBody"]["content"]["application/json"]

Return type

Promise<{
  data?: paths["/v1/webhooks/rimo"]["post"]["responses"]["200"]["content"]["application/json"];
  error?: unknown;
  response: Response;
}>

Example

const result = await webhooks.POST("/v1/webhooks/rimo", {
  body: {
    /* paths["/v1/webhooks/rimo"]["post"]["requestBody"]["content"]["application/json"] */
  },
});

POST /v1/webhooks/stripe

Underlying REST endpoint: POST /v1/webhooks/stripe

Parameters

  • body: paths["/v1/webhooks/stripe"]["post"]["requestBody"]["content"]["application/json"]

Return type

Promise<{
  data?: paths["/v1/webhooks/stripe"]["post"]["responses"]["200"]["content"]["application/json"];
  error?: unknown;
  response: Response;
}>

Example

const result = await webhooks.POST("/v1/webhooks/stripe", {
  body: {
    /* paths["/v1/webhooks/stripe"]["post"]["requestBody"]["content"]["application/json"] */
  },
});