Web Application

1. Create an Inbox

An inbox is an email address that you can receive emails on. You can create an inbox by going to the inboxes page.

Create An Inbox

2. Send an Email to Your Inbox

Send a test email to the address of the inbox:

  1. Using a mail client of your choice.
  2. Sending a request with BotMailRoom

Once you send an email, you should see it in the emails page.

Your First Email

And that's it! You can now do things like:

REST API

1. Create an Api Key (if you don’t already have one)

Create an api key by going to the api keys page. You can also click the Create Your First Api Key button in the sidebar or navigate to the api keys page by clicking Settings, under the user dropdown at the bottom of the sidebar.

Be sure to save the api key somewhere safe. You will not be able to see it later if you lose it.

Create Your First Api Key

User Settings

2. Create an Inbox

Send a request to the upsert inbox endpoint to create an inbox. The below is an example of how to do this in bash, but the linked documentation also contains examples in other languages.

Make sure to replace CHANGE_THIS with the actual email address you want to use for your inbox. Also remember to pass the api_key you created in the previous step in the Authorization header.

curl -X POST "https://api.botmailroom.com/inbox/upsert" \
     -H "Authorization: Bearer ${api_key}" \
     -H "Content-Type: application/json" \
     -d '{
        "id": None,
        "name": "My First Inbox",
        "email_address": "CHANGE_THIS@inbox.botmailroom.com",
    }'

3. Send an Email to Your Inbox

Send a test email to the address of the inbox you created either by:

  1. Using a mail client of your choice.
  2. Sending a request with BotMailRoom

After sending the email, send a request to the get emails endpoint to get the metadata of the email you just sent. The below is an example of how to do this in bash, but the linked documentation also contains examples in other languages.

Make sure to pass the api_key you created in the previous step in the Authorization header.

curl -X GET "https://api.botmailroom.com/email" \
     -H "Authorization: Bearer ${api_key}"

And that's it! You can now do things like:

Python Client

The BotMailRoom python client provides both a synchronous and asynchronous interface for interacting with the BotMailRoom API.

1. Create an Api Key (if you don’t already have one)

Create an api key by going to the api keys page. You can also click the Create Your First Api Key button in the sidebar or navigate to the api keys page by clicking Settings, under the user dropdown at the bottom of the sidebar.

Be sure to save the api key somewhere safe. You will not be able to see it later if you lose it.

Create Your First Api Key

User Settings

2. Install the Client

pip install botmailroom

3. Initialize the Client

from botmailroom import BotMailRoom

client = BotMailRoom(api_key="your_api_key") # or set the BOTMAILROOM_API_KEY environment variable

4. Create an Inbox

Make sure to replace CHANGE_THIS with the actual email address you want to use for your inbox

inbox = client.create_inbox(name="My Inbox", email_address="CHANGE_THIS@inbox.botmailroom.com")

5. Check Emails

Send an email to the inbox’s email address and then check for new emails using the get_emails method.

emails = client.get_emails(inbox_id=inbox.id)
print(emails)