Domains
Create and manage domains through the Resend API.
Operations
| Method | Endpoint | Description |
|---|---|---|
GET | /domains | Retrieve a list of domains |
POST | /domains | Create a new domain |
GET | /domains/{domain_id} | Retrieve a single domain |
PATCH | /domains/{domain_id} | Update an existing domain |
DELETE | /domains/{domain_id} | Remove an existing domain |
POST | /domains/{domain_id}/verify | Verify an existing domain |
POST | /domains/claim | Claim a domain |
GET | /domains/{domain_id}/claim | Retrieve a domain claim |
POST | /domains/{domain_id}/claim/verify | Verify a domain claim |
Example
Retrieve a list of domains, 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.domains.list();
console.log(result);Nine more languages
The same call exists in every SDK. See SDKs for the other nine.