Webhooks
Create and manage Webhooks through the Resend API.
Operations
| Method | Endpoint | Description |
|---|---|---|
GET | /webhooks | Retrieve a list of webhooks |
POST | /webhooks | Create a new webhook |
GET | /webhooks/{webhook_id} | Retrieve a single webhook |
PATCH | /webhooks/{webhook_id} | Update an existing webhook |
DELETE | /webhooks/{webhook_id} | Remove an existing webhook |
POST | /webhooks/{webhook_id}/signing-secret/rotate | Rotate a webhook signing secret |
GET | /webhooks/{webhook_id}/events | Retrieve a list of webhook events |
GET | /webhooks/{webhook_id}/events/{event_id} | Retrieve a single webhook event |
POST | /webhooks/{webhook_id}/events/{event_id}/replay | Replay a webhook event |
GET | /webhooks/{webhook_id}/events/{event_id}/attempts | Retrieve a list of webhook event attempts |
Example
Retrieve a list of webhooks, with the TypeScript SDK:
ts
import { Resend } from "@octridev/resend";
const client = new Resend({
// Optional: replaces the default server and any server an operation declares.
baseUrl: "https://api.resend.com",
auth: { bearerAuth: process.env.API_TOKEN! },
});
const result = await client.webhooks.list();
console.log(result);Nine more languages
The same call exists in every SDK. See SDKs for the other nine.