Skip to main content

Node.js SDK

Install:

npm install @yopiesuryadi/mailbot-sdk

The Node.js SDK scaffold lives in sdk/node and targets the public API at https://getmail.bot/v1 by default.

import { MailBot } from '@yopiesuryadi/mailbot-sdk';

const client = new MailBot({ apiKey: 'mb_xxx' });
const inbox = await client.inboxes.create({ username: 'support-bot' });

console.log(inbox.id);
console.log(inbox.address);

On the shared sandbox, inbox.address is returned in the format {inbox}--{account_short_id}@mailbot.id. Use inbox.id in API or SDK calls, and use the returned inbox.address as the canonical sandbox inbox email.