Skip to content
This repository has been archived by the owner on Sep 7, 2024. It is now read-only.

Latest commit

 

History

History

webhooks

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Webhooks

Create Webhook

Official Documentation


import { Client } from "@nuro.dev/mailersend.ts";

const client = new Client("API_KEY");

const result = await client.createWebhook({
  domain_id: "...",
  events: ["..."],
  name: "...",
  url: "...",
  // ...
});
import { createWebhook } from "@nuro.dev/mailersend.ts";

const result = await createWebhook("API_KEY", {
  domain_id: "...",
  events: ["..."],
  name: "...",
  url: "...",
  // ...
});

List Webhooks

Official Documentation


import { Client } from "@nuro.dev/mailersend.ts";

const client = new Client("API_KEY");

const result = await client.listWebhooks({
  domain_id: "...",
});
import { listWebhooks } from "@nuro.dev/mailersend.ts";

const result = await listWebhooks("API_KEY", {
  domain_id: "...",
});

Webhook by ID

Official Documentation


import { Client } from "@nuro.dev/mailersend.ts";

const client = new Client("API_KEY");

const result = await client.webhookById("WEBHOOK_ID");
import { webhookById } from "@nuro.dev/mailersend.ts";

const result = await webhookById("API_KEY", "WEBHOOK_ID");

Update Webhook

Official Documentation


import { Client } from "@nuro.dev/mailersend.ts";

const client = new Client("API_KEY");

const result = await client.updateWebhook({
  webhookId: "...",
  // ...
});
import { updateWebhook } from "@nuro.dev/mailersend.ts";

const result = await updateWebhook("API_KEY", {
  webhookId: "...",
  // ...
});

Delete Webhook

Official Documentation


import { Client } from "@nuro.dev/mailersend.ts";

const client = new Client("API_KEY");

const result = await client.deleteWebhook("WEBHOOK_ID");
import { deleteWebhook } from "@nuro.dev/mailersend.ts";

const result = await deleteWebhook("API_KEY", "WEBHOOK_ID");