Navigate to your dashboard and generate an API key
Copy your API key - you’ll need it for authentication
Keep your API key secure! Never commit it to version control or expose it in client-side code.
2
Install the SDK (Optional)
You can use Sendook via direct API calls or the TypeScript SDK:
npm install @sendook/node
3
Create Your First Inbox
Create an inbox to send and receive emails. You can use a @sendook.com address (no verification needed) or your own custom domain.
TypeScript SDK
cURL
Custom Domain
import Sendook from "@sendook/node";// Initialize client with your API keyconst client = new Sendook("your_api_key");// Create an inbox with a @sendook.com addressconst inbox = await client.inbox.create({ name: "support", email: "support@sendook.com"});console.log(`Inbox created: ${inbox.email}`);console.log(`Inbox ID: ${inbox.id}`);
import Sendook from "@sendook/node";const client = new Sendook("your_api_key");// First, add your custom domainconst domain = await client.domain.create({ name: "yourdomain.com"});// Get DNS records to configureconst dnsRecords = await client.domain.dns({ domainId: domain.id});console.log("Add these DNS records:", dnsRecords);// After adding DNS records, verify the domainconst verified = await client.domain.verify({ domainId: domain.id});// Now create inbox with your custom domainconst inbox = await client.inbox.create({ name: "support", email: "support@yourdomain.com"});
Domain Verification:
@sendook.com emails work immediately
Custom domains require MX records (receiving) and DKIM/SPF/DMARC records (sending)
4
Send Your First Email
Now let’s send an email from your inbox:
TypeScript SDK
cURL
With CC, BCC & Labels
// Send an emailconst message = await client.inbox.message.send({ inboxId: inbox.id, to: ["recipient@example.com"], subject: "Welcome to Sendook!", text: "Thanks for trying Sendook.", html: "<p>Thanks for trying <strong>Sendook</strong>.</p>"});console.log(`Message sent: ${message.id}`);
curl -X POST https://api.sendook.com/v1/inboxes/{inbox_id}/messages/send \ -H "Authorization: Bearer your_api_key" \ -H "Content-Type: application/json" \ -d '{ "to": ["recipient@example.com"], "subject": "Welcome to Sendook!", "text": "Thanks for trying Sendook.", "html": "<p>Thanks for trying <strong>Sendook</strong>.</p>" }'
// Get conversation threadsconst threads = await client.inbox.thread.list(inbox.id);// Get specific thread with all messagesconst thread = await client.inbox.thread.get( inbox.id, thread.id);console.log(`Messages in thread: ${thread.messages.length}`);
// Reply to a message (automatically threads)const reply = await client.inbox.message.reply({ inboxId: inbox.id, messageId: message.id, text: "Thanks for your message!", html: "<p>Thanks for your message!</p>"});console.log(`Reply sent: ${reply.id}`);