Skip to main content

Overview

Inboxes are the core of Sendook. Each inbox has a unique email address that can send and receive emails. You can create inboxes with either @sendook.com addresses or custom domain addresses.

Creating an Inbox

Using sendook.com Domain

The simplest way to create an inbox is using a @sendook.com email address. No verification is required.
import Sendook from "@sendook/node";

const client = new Sendook("your_api_key");

// Create an inbox with sendook.com domain
const inbox = await client.inbox.create({
  name: "support",
  email: "[email protected]"
});

console.log(inbox);
// {
//   id: "inbox_123",
//   organizationId: "org_456",
//   name: "support",
//   email: "[email protected]",
//   createdAt: "2024-01-01T00:00:00.000Z",
//   updatedAt: "2024-01-01T00:00:00.000Z"
// }

Auto-Generated Email

If you don’t specify an email address, Sendook will automatically generate one based on the name:
const inbox = await client.inbox.create({
  name: "support"
});
// Email will be auto-generated: [email protected]

Using Custom Domains

To use your own domain, you first need to add and verify it. See Custom Domains for setup instructions.
// After verifying your custom domain
const inbox = await client.inbox.create({
  name: "hello",
  email: "[email protected]"
});
Your custom domain must be verified before creating inboxes with it. The API will return a 404 error if the domain is not verified.

Listing Inboxes

Retrieve all inboxes in your organization:
const inboxes = await client.inbox.list();

console.log(inboxes);
// [
//   { id: "inbox_123", email: "[email protected]", ... },
//   { id: "inbox_456", email: "[email protected]", ... }
// ]

Retrieving an Inbox

Get details for a specific inbox:
const inbox = await client.inbox.get("inbox_123");

console.log(inbox);

Deleting an Inbox

Delete an inbox and all its messages:
await client.inbox.delete("inbox_123");
Deleting an inbox permanently removes all associated messages and threads. This action cannot be undone.

Inbox Properties

Each inbox has the following properties:
PropertyTypeDescription
idstringUnique identifier for the inbox
organizationIdstringID of the organization that owns this inbox
domainIdstring (optional)ID of the custom domain (if using custom domain)
namestring (optional)Human-readable name for the inbox
emailstringEmail address for this inbox
createdAtstringISO 8601 timestamp of when the inbox was created
updatedAtstringISO 8601 timestamp of when the inbox was last updated

Webhooks

Inboxes trigger the following webhook events:
  • inbox.created - When a new inbox is created
  • inbox.deleted - When an inbox is deleted
See Webhooks for more information on setting up webhooks.

Best Practices

Give your inboxes clear, descriptive names that indicate their purpose (e.g., “support”, “notifications”, “billing”).
While @sendook.com addresses are great for testing, use custom domains for production to maintain your brand identity and improve deliverability.
Email addresses must be unique. The API will return a 400 error if you try to create an inbox with an email address that already exists.

Next Steps

Send Emails

Learn how to send emails from your inboxes

Receive Emails

Set up webhooks to receive incoming emails

Custom Domains

Add and verify your custom domain

Threads

Understand how email threads work

Build docs developers (and LLMs) love