Webhooks

March 14, 2026 ยท View on GitHub

Overview

Available Operations

  • listEventTypes - List all available event types that can be subscribed to.
  • list - List all webhooks configured for the account.
  • create - Create a new webhook for the account.
  • get - Get details of a specific webhook.
  • update - Update an existing webhook.
  • disable - Disable a webhook. Disabled webhooks will no longer receive events.
  • ping - Send a test ping to a webhook to verify it is configured correctly.
  • getSecret - Get the secret key for verifying webhook payloads.

listEventTypes

List all available event types that can be subscribed to.

Example Usage

import { Moov } from "@moovio/sdk";

const moov = new Moov({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const result = await moov.webhooks.listEventTypes();

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { MoovCore } from "@moovio/sdk/core.js";
import { webhooksListEventTypes } from "@moovio/sdk/funcs/webhooksListEventTypes.js";

// Use `MoovCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const moov = new MoovCore({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const res = await webhooksListEventTypes(moov);
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("webhooksListEventTypes failed:", res.error);
  }
}

run();

Parameters

ParameterTypeRequiredDescription
optionsRequestOptions:heavy_minus_sign:Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit:heavy_minus_sign:Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig:heavy_minus_sign:Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.ListEventTypesResponse>

Errors

Error TypeStatus CodeContent Type
errors.APIError4XX, 5XX*/*

list

List all webhooks configured for the account.

Example Usage

import { Moov } from "@moovio/sdk";

const moov = new Moov({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const result = await moov.webhooks.list();

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { MoovCore } from "@moovio/sdk/core.js";
import { webhooksList } from "@moovio/sdk/funcs/webhooksList.js";

// Use `MoovCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const moov = new MoovCore({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const res = await webhooksList(moov);
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("webhooksList failed:", res.error);
  }
}

run();

Parameters

ParameterTypeRequiredDescription
optionsRequestOptions:heavy_minus_sign:Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit:heavy_minus_sign:Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig:heavy_minus_sign:Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.ListWebhooksResponse>

Errors

Error TypeStatus CodeContent Type
errors.APIError4XX, 5XX*/*

create

Create a new webhook for the account.

Example Usage

import { Moov } from "@moovio/sdk";

const moov = new Moov({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const result = await moov.webhooks.create({
    url: "https://experienced-sailor.biz/",
    status: "disabled",
    eventTypes: [],
    description: "overdue bonnet failing",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { MoovCore } from "@moovio/sdk/core.js";
import { webhooksCreate } from "@moovio/sdk/funcs/webhooksCreate.js";

// Use `MoovCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const moov = new MoovCore({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const res = await webhooksCreate(moov, {
    url: "https://experienced-sailor.biz/",
    status: "disabled",
    eventTypes: [],
    description: "overdue bonnet failing",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("webhooksCreate failed:", res.error);
  }
}

run();

Parameters

ParameterTypeRequiredDescription
requestcomponents.CreateWebhook:heavy_check_mark:The request object to use for the request.
optionsRequestOptions:heavy_minus_sign:Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit:heavy_minus_sign:Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig:heavy_minus_sign:Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.CreateWebhookResponse>

Errors

Error TypeStatus CodeContent Type
errors.GenericError400, 409application/json
errors.CreateWebhookValidationError422application/json
errors.APIError4XX, 5XX*/*

get

Get details of a specific webhook.

Example Usage

import { Moov } from "@moovio/sdk";

const moov = new Moov({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const result = await moov.webhooks.get({
    webhookID: "deeb5a05-74d4-40ad-b4be-a9265fd49428",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { MoovCore } from "@moovio/sdk/core.js";
import { webhooksGet } from "@moovio/sdk/funcs/webhooksGet.js";

// Use `MoovCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const moov = new MoovCore({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const res = await webhooksGet(moov, {
    webhookID: "deeb5a05-74d4-40ad-b4be-a9265fd49428",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("webhooksGet failed:", res.error);
  }
}

run();

Parameters

ParameterTypeRequiredDescription
requestoperations.GetWebhookRequest:heavy_check_mark:The request object to use for the request.
optionsRequestOptions:heavy_minus_sign:Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit:heavy_minus_sign:Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig:heavy_minus_sign:Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.GetWebhookResponse>

Errors

Error TypeStatus CodeContent Type
errors.APIError4XX, 5XX*/*

update

Update an existing webhook.

Example Usage

import { Moov } from "@moovio/sdk";

const moov = new Moov({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const result = await moov.webhooks.update({
    webhookID: "954b566e-0c37-481b-bf92-6cdbd0e47dc0",
    updateWebhook: {
      url: "https://nimble-affect.name",
      status: "enabled",
      eventTypes: [],
      description: "hmph eyeglasses pink stylish blah",
    },
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { MoovCore } from "@moovio/sdk/core.js";
import { webhooksUpdate } from "@moovio/sdk/funcs/webhooksUpdate.js";

// Use `MoovCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const moov = new MoovCore({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const res = await webhooksUpdate(moov, {
    webhookID: "954b566e-0c37-481b-bf92-6cdbd0e47dc0",
    updateWebhook: {
      url: "https://nimble-affect.name",
      status: "enabled",
      eventTypes: [],
      description: "hmph eyeglasses pink stylish blah",
    },
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("webhooksUpdate failed:", res.error);
  }
}

run();

Parameters

ParameterTypeRequiredDescription
requestoperations.UpdateWebhookRequest:heavy_check_mark:The request object to use for the request.
optionsRequestOptions:heavy_minus_sign:Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit:heavy_minus_sign:Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig:heavy_minus_sign:Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.UpdateWebhookResponse>

Errors

Error TypeStatus CodeContent Type
errors.GenericError400, 409application/json
errors.UpdateWebhookValidationError422application/json
errors.APIError4XX, 5XX*/*

disable

Disable a webhook. Disabled webhooks will no longer receive events.

Example Usage

import { Moov } from "@moovio/sdk";

const moov = new Moov({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const result = await moov.webhooks.disable({
    webhookID: "c88929b3-cbb6-4144-923f-e9a5ba645708",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { MoovCore } from "@moovio/sdk/core.js";
import { webhooksDisable } from "@moovio/sdk/funcs/webhooksDisable.js";

// Use `MoovCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const moov = new MoovCore({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const res = await webhooksDisable(moov, {
    webhookID: "c88929b3-cbb6-4144-923f-e9a5ba645708",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("webhooksDisable failed:", res.error);
  }
}

run();

Parameters

ParameterTypeRequiredDescription
requestoperations.DisableWebhookRequest:heavy_check_mark:The request object to use for the request.
optionsRequestOptions:heavy_minus_sign:Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit:heavy_minus_sign:Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig:heavy_minus_sign:Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.DisableWebhookResponse>

Errors

Error TypeStatus CodeContent Type
errors.GenericError400, 409application/json
errors.APIError4XX, 5XX*/*

ping

Send a test ping to a webhook to verify it is configured correctly.

Example Usage

import { Moov } from "@moovio/sdk";

const moov = new Moov({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const result = await moov.webhooks.ping({
    webhookID: "87e0ecc6-d6c3-4eeb-99e8-6dbe9212a6a2",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { MoovCore } from "@moovio/sdk/core.js";
import { webhooksPing } from "@moovio/sdk/funcs/webhooksPing.js";

// Use `MoovCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const moov = new MoovCore({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const res = await webhooksPing(moov, {
    webhookID: "87e0ecc6-d6c3-4eeb-99e8-6dbe9212a6a2",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("webhooksPing failed:", res.error);
  }
}

run();

Parameters

ParameterTypeRequiredDescription
requestoperations.PingWebhookRequest:heavy_check_mark:The request object to use for the request.
optionsRequestOptions:heavy_minus_sign:Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit:heavy_minus_sign:Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig:heavy_minus_sign:Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.PingWebhookResponse>

Errors

Error TypeStatus CodeContent Type
errors.APIError4XX, 5XX*/*

getSecret

Get the secret key for verifying webhook payloads.

Example Usage

import { Moov } from "@moovio/sdk";

const moov = new Moov({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const result = await moov.webhooks.getSecret({
    webhookID: "1fac81d6-2d5b-4180-8765-81282a450eda",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { MoovCore } from "@moovio/sdk/core.js";
import { webhooksGetSecret } from "@moovio/sdk/funcs/webhooksGetSecret.js";

// Use `MoovCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const moov = new MoovCore({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const res = await webhooksGetSecret(moov, {
    webhookID: "1fac81d6-2d5b-4180-8765-81282a450eda",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("webhooksGetSecret failed:", res.error);
  }
}

run();

Parameters

ParameterTypeRequiredDescription
requestoperations.GetWebhookSecretRequest:heavy_check_mark:The request object to use for the request.
optionsRequestOptions:heavy_minus_sign:Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit:heavy_minus_sign:Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig:heavy_minus_sign:Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.GetWebhookSecretResponse>

Errors

Error TypeStatus CodeContent Type
errors.APIError4XX, 5XX*/*