Table of Contents

    API

    Transparent Proxy

    Please sign in and we'll assign you a private URL to trace your traffic and help you implement the API.

Mailtrap API Documentation

Mailtrap API is based on REST principles, all you need to use it is your Mailtrap account. You have to be authenticated and call the simple HTTPs request on the URL specified below. The following documentation covers core resources that are used to manipulate with the main entities. First of all, read basic instructions to start using the API.

For using this API you need send authenticated HTTP requests. Exists several way to do this:

  • Send a HTTP header Api-Token: {api_token}, where {api_token} is your API token
  • Send a parameter api_token={api_token}, where {api_token} is your API token
  • Send a HTTP header Authorization: Token token={api_token}, where {api_token} is your API token (more info: Token Access Authentication)

Your API token you can find on profile page or API page in Mailtrap application.

Notice: No need send API Token for call /api/v1/user/api_token.

Allowed HTTPs requests:

  • POST - To create resource
  • PATCH - To update resource
  • GET - Get a resource or list of resources
  • DELETE - To delete resource

Description Of Usual Server Responses:

  • 200 OK - the request was successful (some API calls may return 201 instead).
  • 201 Created - the request was successful and a resource was created.
  • 204 No Content - the request was successful but there is no representation to return (i.e. the response is empty).
  • 400 Bad Request - the request could not be understood or was missing required parameters.
  • 401 Unauthorized - authentication failed or user doesn't have permissions for requested operation.
  • 403 Forbidden - access denied.
  • 404 Not Found - resource was not found.
  • 405 Method Not Allowed - requested method is not supported for resource.
  • 422 Unprocessable Entity - requested data contain invalid values.
  • 429 Too Many Requests - exceeded Mailtrap API limits. Pause requests, wait up to one minute, and try again.

API provide JSON and XML request and response. It's can be set by:

  • .json or .xml in the end or url
  • Accept and Content-Type headers

All requests must be send over HTTPS protocol.

User

The following is a section of resources related to the user.

GET

/api/v1/user

This resource does not have any attributes.

Response

200 (OK)
Content-Type: application/json
{
    "id": 1,
    "name": "Alexey Vasiliev",
    "email": "alexey.vasiliev@railsware.com",
    "api_token": "{api_token}",
    "gravatar_icon": "http://www.gravatar.com/avatar/2b18d4346ca1ec18cb310cd86a51a4e2?s=100",
    "gravatar_little_icon": "http://www.gravatar.com/avatar/2b18d4346ca1ec18cb310cd86a51a4e2?s=30"
}

PATCH

/api/v1/user

Update user information

Response

200 (OK)
Content-Type: application/json
{
    "id": 1,
    "name": "Alexey Vasiliev",
    "email": "alexey.vasiliev@railsware.com",
    "api_token": "{api_token}",
    "gravatar_icon": "http://www.gravatar.com/avatar/2b18d4346ca1ec18cb310cd86a51a4e2?s=100",
    "gravatar_little_icon": "http://www.gravatar.com/avatar/2b18d4346ca1ec18cb310cd86a51a4e2?s=30"
}

PATCH

/api/v1/user/reset_api_token

Reset user API token

Response

200 (OK)
Content-Type: application/json
{
    "id": 1,
    "name": "James Bond",
    "email": "alexey.vasiliev@railsware.com",
    "api_token": "{new_api_token}",
    "gravatar_icon": "http://www.gravatar.com/avatar/2b18d4346ca1ec18cb310cd86a51a4e2?s=100",
    "gravatar_little_icon": "http://www.gravatar.com/avatar/2b18d4346ca1ec18cb310cd86a51a4e2?s=30"
}

GET

/api/v1/user/api_token

Get API token by email and password

Response

200 (OK)
Content-Type: application/json
{
    "id": 1,
    "name": "James Bond",
    "email": "alexey.vasiliev@railsware.com",
    "api_token": "{api_token}",
    "gravatar_icon": "http://www.gravatar.com/avatar/2b18d4346ca1ec18cb310cd86a51a4e2?s=100",
    "gravatar_little_icon": "http://www.gravatar.com/avatar/2b18d4346ca1ec18cb310cd86a51a4e2?s=30"
}

Company

The following is a section of resources related to the company.

GET

/api/v1/companies

Get list of companies and inboxes

Response

200 (OK)
Content-Type: application/json
[
    {
        "id": 1,
        "name": "My inboxes",
        "is_owner": true,
        "share_link": "https://mailtrap.io/share/1/qwe3750e978284",
        "ext_id": "qwe3750e978284",
        "inboxes": [
            {
                "id": 3,
                "name": "Test inbox",
                "domain": "mailtrap.io",
                "username": "1da91769512fb",
                "password": "d71dfda027b54a",
                "max_size": 1000,
                "emails_count": 997,
                "emails_unread_count": 0,
                "last_message_sent_at_timestamp": 1380567707,
                "smtp_ports": [
                    25,
                    465,
                    2525
                ],
                "pop3_ports": [
                    110,
                    995
                ]
            }
        ]
    }
]

GET

/api/v1/companies/{id}

Get company and inboxes

Parameters
Name Description Details
id

company ID (identifier)

integer, required

Response

200 (OK)
Content-Type: application/json
{
    "id": 1,
    "name": "My inboxes",
    "is_owner": true,
    "share_link": "https://mailtrap.io/share/1/qwe3750e978284",
    "ext_id": "qwe3750e978284",
    "inboxes": [
        {
            "id": 3,
            "company_id": 1,
            "name": "Test inbox",
            "domain": "mailtrap.io",
            "username": "1da91769512fb",
            "password": "d71dfda027b54a",
            "max_size": 1000,
            "emails_count": 997,
            "emails_unread_count": 0,
            "last_message_sent_at_timestamp": 1380567707,
            "smtp_ports": [
                25,
                465,
                2525
            ],
            "pop3_ports": [
                110,
                995
            ]
        }
    ]
}

PATCH

/api/v1/companies/{id}

Update company

Parameters
Name Description Details
id

company ID (identifier)

integer, required

Response

200 (OK)
Content-Type: application/json
{
    "id": 1,
    "name": "New name",
    "is_owner": true,
    "share_link": "https://mailtrap.io/share/1/qwe3750e978284",
    "ext_id": "qwe3750e978284",
    "inboxes": [
        {
            "id": 3,
            "company_id": 1,
            "name": "Test inbox",
            "domain": "mailtrap.io",
            "username": "1da91769512fb",
            "password": "d71dfda027b54a",
            "max_size": 1000,
            "emails_count": 997,
            "emails_unread_count": 0,
            "last_message_sent_at_timestamp": 1380567707,
            "smtp_ports": [
                25,
                465,
                2525
            ],
            "pop3_ports": [
                110,
                995
            ]
        }
    ]
}

DELETE

/api/v1/companies/{id}

Delete company (only if you is owner of company, "is_owner: true")

Parameters
Name Description Details
id

company ID (identifier)

integer, required

Response

200 (OK)
Content-Type: application/json
{
    "id": 1,
    "name": "New name",
    "is_owner": true,
    "share_link": "https://mailtrap.io/share/1/qwe3750e978284",
    "ext_id": "qwe3750e978284"
}

POST

/api/v1/companies/{id}/inboxes

Create inbox in company

Parameters
Name Description Details
id

company ID (identifier)

integer, required

Response

200 (OK)
Content-Type: application/json
{
    "id": 3,
    "company_id": 1,
    "name": "Test inbox",
    "domain": "mailtrap.io",
    "username": "1da91769512fb",
    "password": "d71dfda027b54a",
    "max_size": 1000,
    "emails_count": 997,
    "emails_unread_count": 0,
    "last_message_sent_at_timestamp": 1380567707,
    "smtp_ports": [
        25,
        465,
        2525
    ],
    "pop3_ports": [
        110,
        995
    ]
}

Inbox

The following is a section of resources related to the inbox

GET

/api/v1/inboxes

Get list of inboxes

Response

200 (OK)
Content-Type: application/json
[
    {
        "id": 3,
        "company_id": 1,
        "name": "Test inbox",
        "domain": "mailtrap.io",
        "username": "1da91769512fb",
        "password": "d71dfda027b54a",
        "max_size": 1000,
        "emails_count": 997,
        "emails_unread_count": 0,
        "last_message_sent_at_timestamp": 1380567707,
        "smtp_ports": [
            25,
            465,
            2525
        ],
        "pop3_ports": [
            110,
            995
        ]
    }
]

GET

/api/v1/inboxes/{id}

Get inbox

Parameters
Name Description Details
id

inbox ID (identifier)

integer, required

Response

200 (OK)
Content-Type: application/json
{
    "id": 3,
    "company_id": 1,
    "name": "Test inbox",
    "domain": "mailtrap.io",
    "username": "1da91769512fb",
    "password": "d71dfda027b54a",
    "max_size": 1000,
    "emails_count": 997,
    "emails_unread_count": 0,
    "last_message_sent_at_timestamp": 1380567707,
    "smtp_ports": [
        25,
        465,
        2525
    ],
    "pop3_ports": [
        110,
        995
    ]
}

PATCH

/api/v1/inboxes/{id}

Update inbox

Parameters
Name Description Details
id

inbox ID (identifier)

integer, required

Response

200 (OK)
Content-Type: application/json
{
    "id": 3,
    "company_id": 1,
    "name": "New inbox",
    "domain": "mailtrap.io",
    "username": "1da91769512fb",
    "password": "d71dfda027b54a",
    "max_size": 1000,
    "emails_count": 997,
    "emails_unread_count": 0,
    "last_message_sent_at_timestamp": 1380567707,
    "smtp_ports": [
        25,
        465,
        2525
    ],
    "pop3_ports": [
        110,
        995
    ]
}

DELETE

/api/v1/inboxes/{id}

Delete inbox

Parameters
Name Description Details
id

inbox ID (identifier)

integer, required

Response

200 (OK)
Content-Type: application/json
{
    "id": 3,
    "company_id": 1,
    "name": "Test inbox",
    "domain": "mailtrap.io",
    "username": "1da91769512fb",
    "password": "d71dfda027b54a",
    "max_size": 1000,
    "emails_count": 997,
    "emails_unread_count": 0,
    "last_message_sent_at_timestamp": 1380567707,
    "smtp_ports": [
        25,
        465,
        2525
    ],
    "pop3_ports": [
        110,
        995
    ]
}

PATCH

/api/v1/inboxes/{inbox_id}/clean

Clean all messages (emails) from inbox

Parameters
Name Description Details
inbox_id

inbox ID (identifier)

integer, required

Response

200 (OK)
Content-Type: application/json
{
    "id": 3,
    "company_id": 1,
    "name": "Test inbox",
    "domain": "mailtrap.io",
    "username": "123123123",
    "password": "234234234234",
    "max_size": 1000,
    "emails_count": 997,
    "emails_unread_count": 0,
    "last_message_sent_at_timestamp": 1380567707,
    "smtp_ports": [
        25,
        465,
        2525
    ],
    "pop3_ports": [
        110,
        995
    ]
}

PATCH

/api/v1/inboxes/{inbox_id}/all_read

Mark all messages (emails) as read

Parameters
Name Description Details
inbox_id

inbox ID (identifier)

integer, required

Response

200 (OK)
Content-Type: application/json
{
    "id": 3,
    "company_id": 1,
    "name": "Test inbox",
    "domain": "mailtrap.io",
    "username": "123123123",
    "password": "234234234234",
    "max_size": 1000,
    "emails_count": 997,
    "emails_unread_count": 0,
    "last_message_sent_at_timestamp": 1380567707,
    "smtp_ports": [
        25,
        465,
        2525
    ],
    "pop3_ports": [
        110,
        995
    ]
}

PATCH

/api/v1/inboxes/{inbox_id}/reset_credentials

Reset inbox credentials

Parameters
Name Description Details
inbox_id

inbox ID (identifier)

integer, required

Response

200 (OK)
Content-Type: application/json
{
    "id": 3,
    "company_id": 1,
    "name": "Test inbox",
    "domain": "mailtrap.io",
    "username": "123123123",
    "password": "234234234234",
    "max_size": 1000,
    "emails_count": 997,
    "emails_unread_count": 0,
    "last_message_sent_at_timestamp": 1380567707,
    "smtp_ports": [
        25,
        465,
        2525
    ],
    "pop3_ports": [
        110,
        995
    ]
}

Shared Inbox

The following is a section of resources related to the shared inbox

GET

/api/v1/shared_inboxes

Get list of shared inboxes

Response

200 (OK)
Content-Type: application/json
[
    {
        "id": 1,
        "company_id": 1,
        "name": "Staging",
        "domain": "mailtrap.io",
        "username": "test",
        "password": "test",
        "max_size": 100,
        "emails_count": 23,
        "emails_unread_count": 0,
        "last_message_sent_at_timestamp": 1399380496,
        "company_name": "Name"
    }
]

DELETE

/api/v1/shared_inboxes/{id}

Leave shared inbox

Parameters
Name Description Details
id

inbox ID (identifier)

integer, required

Response

200 (OK)
Content-Type: application/json
{
    "id": 1,
    "company_id": 1,
    "name": "Staging",
    "domain": "mailtrap.io",
    "username": "test",
    "password": "test",
    "max_size": 100,
    "emails_count": 23,
    "emails_unread_count": 0,
    "last_message_sent_at_timestamp": 1399380496,
    "company_name": "Name"
}

Message

The following is a section of resources related to the message

GET

/api/v1/inboxes/{inbox_id}/messages{?search,page,last_id}

Get messages from inbox. Params:

Parameters
Name Description Details
inbox_id

inbox ID (identifier)

integer, required
search

filter emails by this key

string, optional
page

page of emails (per page = 30 messages, not working with last_id param)

integer, optional
default: 1
last_id

get emails, where primary key less then this param (not working with page param)

integer, optional

Response

200 (OK)
Content-Type: application/json
[
    {
        "id": 54864,
        "inbox_id": 1,
        "subject": "SMTP e-mail test",
        "sent_at": "2013-08-25T19:32:07.567+03:00",
        "from_email": "me@railsware.com",
        "from_name": "Private Person",
        "to_email": "test@railsware.com",
        "to_name": "A Test User",
        "html_body": "",
        "text_body": "This is a test e-mail message.\r\n",
        "email_size": 193,
        "is_read": true,
        "created_at": "2013-08-25T19:32:07.576+03:00",
        "updated_at": "2013-08-25T19:32:09.232+03:00",
        "sent_at_timestamp": 1377448326,
        "human_size": "193 Bytes",
        "html_url": "https://mailtrap.io/api/v1/inboxes/1/messages/54864/body.html",
        "txt_url": "https://mailtrap.io/api/v1/inboxes/1/messages/54864/body.txt",
        "raw_url": "https://mailtrap.io/api/v1/inboxes/1/messages/54864/body.raw",
        "download_url": "https://mailtrap.io/api/v1/inboxes/1/messages/54864/body.eml",
        "viruses_report_info": false,
        "blacklists_report_info": {
            "result": "success",
            "domain": "railsware.com",
            "ip": "176.9.59.196",
            "report": [
                {
                    "name": "AHBL",
                    "url": "http://www.ahbl.org/",
                    "in_black_list": false
                },
                {
                    "name": "BACKSCATTERER",
                    "url": "http://www.backscatterer.org/index.php",
                    "in_black_list": false
                },
                {
                    "name": "BARRACUDA",
                    "url": "http://barracudacentral.org/rbl",
                    "in_black_list": false
                },
                {
                    "name": "BURNT-TECH",
                    "url": "http://dnsbl.burnt-tech.com/",
                    "in_black_list": false
                },
                {
                    "name": "CASA-CBLPLUS",
                    "url": "http://www.anti-spam.org.cn/CID/17",
                    "in_black_list": false
                },
                {
                    "name": "IMP-SPAM",
                    "url": "http://antispam.imp.ch/?lng=1",
                    "in_black_list": false
                },
                {
                    "name": "INPS_DE",
                    "url": "http://dnsbl.inps.de/index.cgi?lang=en",
                    "in_black_list": false
                },
                {
                    "name": "INVALUEMENT",
                    "url": "http://dnsbl.invaluement.com/",
                    "in_black_list": false
                },
                {
                    "name": "LASHBACK",
                    "url": "http://www.lashback.com/support/UnsubscribeBlacklistSupport.aspx",
                    "in_black_list": false
                },
                {
                    "name": "NIXSPAM",
                    "url": "http://www.heise.de/ix/nixspam/dnsbl_en/",
                    "in_black_list": false
                },
                {
                    "name": "PSBL",
                    "url": "http://psbl.surriel.com/",
                    "in_black_list": false
                },
                {
                    "name": "RATS-ALL",
                    "url": "http://www.spamrats.com/",
                    "in_black_list": false
                },
                {
                    "name": "SEM-BACKSCATTER",
                    "url": "http://spameatingmonkey.com/index.html",
                    "in_black_list": false
                },
                {
                    "name": "SEM-BLACK",
                    "url": "http://spameatingmonkey.com/index.html",
                    "in_black_list": false
                },
                {
                    "name": "SORBS-DUHL",
                    "url": "http://www.sorbs.net/lookup.shtml",
                    "in_black_list": false
                },
                {
                    "name": "SORBS-SPAM",
                    "url": "http://www.sorbs.net/lookup.shtml",
                    "in_black_list": false
                },
                {
                    "name": "SPAMCANNIBAL",
                    "url": "http://www.spamcannibal.org/",
                    "in_black_list": false
                },
                {
                    "name": "SPAMCOP",
                    "url": "http://spamcop.net/bl.shtml",
                    "in_black_list": false
                },
                {
                    "name": "SPAMHAUS-ZEN",
                    "url": "http://www.spamhaus.org/",
                    "in_black_list": false
                },
                {
                    "name": "TRUNCATE",
                    "url": "http://www.gbudb.com/truncate/index.jsp",
                    "in_black_list": false
                }
            ]
        }
    },
    {
        "id": 54863,
        "inbox_id": 1,
        "subject": "SMTP e-mail test",
        "sent_at": "2013-08-25T19:32:07.051+03:00",
        "from_email": "me@railsware.com",
        "from_name": "Private Person",
        "to_email": "test@railsware.com",
        "to_name": "A Test User",
        "html_body": "",
        "text_body": "This is a test e-mail message.\r\n",
        "email_size": 193,
        "is_read": true,
        "created_at": "2013-08-25T19:32:07.061+03:00",
        "updated_at": "2013-08-25T19:32:08.603+03:00",
        "sent_at_timestamp": 1377448326,
        "human_size": "193 Bytes",
        "html_url": "https://mailtrap.io/api/v1/inboxes/1/messages/54863/body.html",
        "txt_url": "https://mailtrap.io/api/v1/inboxes/1/messages/54863/body.txt",
        "raw_url": "https://mailtrap.io/api/v1/inboxes/1/messages/54863/body.raw",
        "download_url": "https://mailtrap.io/api/v1/inboxes/1/messages/54863/body.eml",
        "viruses_report_info": false,
        "blacklists_report_info": {
            "result": "success",
            "domain": "railsware.com",
            "ip": "176.9.59.196",
            "report": [
                {
                    "name": "AHBL",
                    "url": "http://www.ahbl.org/",
                    "in_black_list": false
                },
                {
                    "name": "BACKSCATTERER",
                    "url": "http://www.backscatterer.org/index.php",
                    "in_black_list": false
                },
                {
                    "name": "BARRACUDA",
                    "url": "http://barracudacentral.org/rbl",
                    "in_black_list": false
                },
                {
                    "name": "BURNT-TECH",
                    "url": "http://dnsbl.burnt-tech.com/",
                    "in_black_list": false
                },
                {
                    "name": "CASA-CBLPLUS",
                    "url": "http://www.anti-spam.org.cn/CID/17",
                    "in_black_list": false
                },
                {
                    "name": "IMP-SPAM",
                    "url": "http://antispam.imp.ch/?lng=1",
                    "in_black_list": false
                },
                {
                    "name": "INPS_DE",
                    "url": "http://dnsbl.inps.de/index.cgi?lang=en",
                    "in_black_list": false
                },
                {
                    "name": "INVALUEMENT",
                    "url": "http://dnsbl.invaluement.com/",
                    "in_black_list": false
                },
                {
                    "name": "LASHBACK",
                    "url": "http://www.lashback.com/support/UnsubscribeBlacklistSupport.aspx",
                    "in_black_list": false
                },
                {
                    "name": "NIXSPAM",
                    "url": "http://www.heise.de/ix/nixspam/dnsbl_en/",
                    "in_black_list": false
                },
                {
                    "name": "PSBL",
                    "url": "http://psbl.surriel.com/",
                    "in_black_list": false
                },
                {
                    "name": "RATS-ALL",
                    "url": "http://www.spamrats.com/",
                    "in_black_list": false
                },
                {
                    "name": "SEM-BACKSCATTER",
                    "url": "http://spameatingmonkey.com/index.html",
                    "in_black_list": false
                },
                {
                    "name": "SEM-BLACK",
                    "url": "http://spameatingmonkey.com/index.html",
                    "in_black_list": false
                },
                {
                    "name": "SORBS-DUHL",
                    "url": "http://www.sorbs.net/lookup.shtml",
                    "in_black_list": false
                },
                {
                    "name": "SORBS-SPAM",
                    "url": "http://www.sorbs.net/lookup.shtml",
                    "in_black_list": false
                },
                {
                    "name": "SPAMCANNIBAL",
                    "url": "http://www.spamcannibal.org/",
                    "in_black_list": false
                },
                {
                    "name": "SPAMCOP",
                    "url": "http://spamcop.net/bl.shtml",
                    "in_black_list": false
                },
                {
                    "name": "SPAMHAUS-ZEN",
                    "url": "http://www.spamhaus.org/",
                    "in_black_list": false
                },
                {
                    "name": "TRUNCATE",
                    "url": "http://www.gbudb.com/truncate/index.jsp",
                    "in_black_list": false
                }
            ]
        }
    }
]

GET

/api/v1/inboxes/{inbox_id}/messages/{id}

Get one message from inbox

Parameters
Name Description Details
inbox_id

inbox ID (identifier)

integer, required
id

message ID (identifier)

integer, required

Response

200 (OK)
Content-Type: application/json
{
    "id": 54864,
    "inbox_id": 1,
    "subject": "SMTP e-mail test",
    "sent_at": "2013-08-25T19:32:07.567+03:00",
    "from_email": "me@railsware.com",
    "from_name": "Private Person",
    "to_email": "test@railsware.com",
    "to_name": "A Test User",
    "html_body": "",
    "text_body": "This is a test e-mail message.\r\n",
    "email_size": 193,
    "is_read": true,
    "created_at": "2013-08-25T19:32:07.576+03:00",
    "updated_at": "2013-08-25T19:32:09.232+03:00",
    "sent_at_timestamp": 1377448326,
    "human_size": "193 Bytes",
    "html_url": "https://mailtrap.io/api/v1/inboxes/1/messages/54864/body.html",
    "txt_url": "https://mailtrap.io/api/v1/inboxes/1/messages/54864/body.txt",
    "raw_url": "https://mailtrap.io/api/v1/inboxes/1/messages/54864/body.raw",
    "download_url": "https://mailtrap.io/api/v1/inboxes/1/messages/54864/body.eml",
    "viruses_report_info": false,
    "blacklists_report_info": {
        "result": "success",
        "domain": "railsware.com",
        "ip": "176.9.59.196",
        "report": [
            {
                "name": "AHBL",
                "url": "http://www.ahbl.org/",
                "in_black_list": false
            },
            {
                "name": "BACKSCATTERER",
                "url": "http://www.backscatterer.org/index.php",
                "in_black_list": false
            },
            {
                "name": "BARRACUDA",
                "url": "http://barracudacentral.org/rbl",
                "in_black_list": false
            },
            {
                "name": "BURNT-TECH",
                "url": "http://dnsbl.burnt-tech.com/",
                "in_black_list": false
            },
            {
                "name": "CASA-CBLPLUS",
                "url": "http://www.anti-spam.org.cn/CID/17",
                "in_black_list": false
            },
            {
                "name": "IMP-SPAM",
                "url": "http://antispam.imp.ch/?lng=1",
                "in_black_list": false
            },
            {
                "name": "INPS_DE",
                "url": "http://dnsbl.inps.de/index.cgi?lang=en",
                "in_black_list": false
            },
            {
                "name": "INVALUEMENT",
                "url": "http://dnsbl.invaluement.com/",
                "in_black_list": false
            },
            {
                "name": "LASHBACK",
                "url": "http://www.lashback.com/support/UnsubscribeBlacklistSupport.aspx",
                "in_black_list": false
            },
            {
                "name": "NIXSPAM",
                "url": "http://www.heise.de/ix/nixspam/dnsbl_en/",
                "in_black_list": false
            },
            {
                "name": "PSBL",
                "url": "http://psbl.surriel.com/",
                "in_black_list": false
            },
            {
                "name": "RATS-ALL",
                "url": "http://www.spamrats.com/",
                "in_black_list": false
            },
            {
                "name": "SEM-BACKSCATTER",
                "url": "http://spameatingmonkey.com/index.html",
                "in_black_list": false
            },
            {
                "name": "SEM-BLACK",
                "url": "http://spameatingmonkey.com/index.html",
                "in_black_list": false
            },
            {
                "name": "SORBS-DUHL",
                "url": "http://www.sorbs.net/lookup.shtml",
                "in_black_list": false
            },
            {
                "name": "SORBS-SPAM",
                "url": "http://www.sorbs.net/lookup.shtml",
                "in_black_list": false
            },
            {
                "name": "SPAMCANNIBAL",
                "url": "http://www.spamcannibal.org/",
                "in_black_list": false
            },
            {
                "name": "SPAMCOP",
                "url": "http://spamcop.net/bl.shtml",
                "in_black_list": false
            },
            {
                "name": "SPAMHAUS-ZEN",
                "url": "http://www.spamhaus.org/",
                "in_black_list": false
            },
            {
                "name": "TRUNCATE",
                "url": "http://www.gbudb.com/truncate/index.jsp",
                "in_black_list": false
            }
        ]
    }
}

PATCH

/api/v1/inboxes/{inbox_id}/messages/{id}

Update message attributes (right now available only is_read attribute for modification)

Parameters
Name Description Details
inbox_id

inbox ID (identifier)

integer, required
id

message ID (identifier)

integer, required

Response

200 (OK)
Content-Type: application/json
{
    "id": 54864,
    "inbox_id": 1,
    "subject": "SMTP e-mail test",
    "sent_at": "2013-08-25T19:32:07.567+03:00",
    "from_email": "me@railsware.com",
    "from_name": "Private Person",
    "to_email": "test@railsware.com",
    "to_name": "A Test User",
    "html_body": "",
    "text_body": "This is a test e-mail message.\r\n",
    "email_size": 193,
    "is_read": true,
    "created_at": "2013-08-25T19:32:07.576+03:00",
    "updated_at": "2013-08-25T19:32:09.232+03:00",
    "sent_at_timestamp": 1377448326,
    "human_size": "193 Bytes",
    "html_url": "https://mailtrap.io/api/v1/inboxes/1/messages/54864/body.html",
    "txt_url": "https://mailtrap.io/api/v1/inboxes/1/messages/54864/body.txt",
    "raw_url": "https://mailtrap.io/api/v1/inboxes/1/messages/54864/body.raw",
    "download_url": "https://mailtrap.io/api/v1/inboxes/1/messages/54864/body.eml",
    "viruses_report_info": false,
    "blacklists_report_info": {
        "result": "success",
        "domain": "railsware.com",
        "ip": "176.9.59.196",
        "report": [
            {
                "name": "AHBL",
                "url": "http://www.ahbl.org/",
                "in_black_list": false
            },
            {
                "name": "BACKSCATTERER",
                "url": "http://www.backscatterer.org/index.php",
                "in_black_list": false
            },
            {
                "name": "BARRACUDA",
                "url": "http://barracudacentral.org/rbl",
                "in_black_list": false
            },
            {
                "name": "BURNT-TECH",
                "url": "http://dnsbl.burnt-tech.com/",
                "in_black_list": false
            },
            {
                "name": "CASA-CBLPLUS",
                "url": "http://www.anti-spam.org.cn/CID/17",
                "in_black_list": false
            },
            {
                "name": "IMP-SPAM",
                "url": "http://antispam.imp.ch/?lng=1",
                "in_black_list": false
            },
            {
                "name": "INPS_DE",
                "url": "http://dnsbl.inps.de/index.cgi?lang=en",
                "in_black_list": false
            },
            {
                "name": "INVALUEMENT",
                "url": "http://dnsbl.invaluement.com/",
                "in_black_list": false
            },
            {
                "name": "LASHBACK",
                "url": "http://www.lashback.com/support/UnsubscribeBlacklistSupport.aspx",
                "in_black_list": false
            },
            {
                "name": "NIXSPAM",
                "url": "http://www.heise.de/ix/nixspam/dnsbl_en/",
                "in_black_list": false
            },
            {
                "name": "PSBL",
                "url": "http://psbl.surriel.com/",
                "in_black_list": false
            },
            {
                "name": "RATS-ALL",
                "url": "http://www.spamrats.com/",
                "in_black_list": false
            },
            {
                "name": "SEM-BACKSCATTER",
                "url": "http://spameatingmonkey.com/index.html",
                "in_black_list": false
            },
            {
                "name": "SEM-BLACK",
                "url": "http://spameatingmonkey.com/index.html",
                "in_black_list": false
            },
            {
                "name": "SORBS-DUHL",
                "url": "http://www.sorbs.net/lookup.shtml",
                "in_black_list": false
            },
            {
                "name": "SORBS-SPAM",
                "url": "http://www.sorbs.net/lookup.shtml",
                "in_black_list": false
            },
            {
                "name": "SPAMCANNIBAL",
                "url": "http://www.spamcannibal.org/",
                "in_black_list": false
            },
            {
                "name": "SPAMCOP",
                "url": "http://spamcop.net/bl.shtml",
                "in_black_list": false
            },
            {
                "name": "SPAMHAUS-ZEN",
                "url": "http://www.spamhaus.org/",
                "in_black_list": false
            },
            {
                "name": "TRUNCATE",
                "url": "http://www.gbudb.com/truncate/index.jsp",
                "in_black_list": false
            }
        ]
    }
}

DELETE

/api/v1/inboxes/{inbox_id}/messages/{id}

Delete email from inbox

Parameters
Name Description Details
inbox_id

inbox ID (identifier)

integer, required
id

message ID (identifier)

integer, required

Response

200 (OK)
Content-Type: application/json
{
    "id": 54864,
    "inbox_id": 1,
    "subject": "SMTP e-mail test",
    "sent_at": "2013-08-25T19:32:07.567+03:00",
    "from_email": "me@railsware.com",
    "from_name": "Private Person",
    "to_email": "test@railsware.com",
    "to_name": "A Test User",
    "html_body": "",
    "text_body": "This is a test e-mail message.\r\n",
    "email_size": 193,
    "is_read": true,
    "created_at": "2013-08-25T19:32:07.576+03:00",
    "updated_at": "2013-08-25T19:32:09.232+03:00",
    "sent_at_timestamp": 1377448326,
    "human_size": "193 Bytes",
    "html_url": "https://mailtrap.io/api/v1/inboxes/1/messages/54864/body.html",
    "txt_url": "https://mailtrap.io/api/v1/inboxes/1/messages/54864/body.txt",
    "raw_url": "https://mailtrap.io/api/v1/inboxes/1/messages/54864/body.raw",
    "download_url": "https://mailtrap.io/api/v1/inboxes/1/messages/54864/body.eml",
    "viruses_report_info": false,
    "blacklists_report_info": {
        "result": "success",
        "domain": "railsware.com",
        "ip": "176.9.59.196",
        "report": [
            {
                "name": "AHBL",
                "url": "http://www.ahbl.org/",
                "in_black_list": false
            },
            {
                "name": "BACKSCATTERER",
                "url": "http://www.backscatterer.org/index.php",
                "in_black_list": false
            },
            {
                "name": "BARRACUDA",
                "url": "http://barracudacentral.org/rbl",
                "in_black_list": false
            },
            {
                "name": "BURNT-TECH",
                "url": "http://dnsbl.burnt-tech.com/",
                "in_black_list": false
            },
            {
                "name": "CASA-CBLPLUS",
                "url": "http://www.anti-spam.org.cn/CID/17",
                "in_black_list": false
            },
            {
                "name": "IMP-SPAM",
                "url": "http://antispam.imp.ch/?lng=1",
                "in_black_list": false
            },
            {
                "name": "INPS_DE",
                "url": "http://dnsbl.inps.de/index.cgi?lang=en",
                "in_black_list": false
            },
            {
                "name": "INVALUEMENT",
                "url": "http://dnsbl.invaluement.com/",
                "in_black_list": false
            },
            {
                "name": "LASHBACK",
                "url": "http://www.lashback.com/support/UnsubscribeBlacklistSupport.aspx",
                "in_black_list": false
            },
            {
                "name": "NIXSPAM",
                "url": "http://www.heise.de/ix/nixspam/dnsbl_en/",
                "in_black_list": false
            },
            {
                "name": "PSBL",
                "url": "http://psbl.surriel.com/",
                "in_black_list": false
            },
            {
                "name": "RATS-ALL",
                "url": "http://www.spamrats.com/",
                "in_black_list": false
            },
            {
                "name": "SEM-BACKSCATTER",
                "url": "http://spameatingmonkey.com/index.html",
                "in_black_list": false
            },
            {
                "name": "SEM-BLACK",
                "url": "http://spameatingmonkey.com/index.html",
                "in_black_list": false
            },
            {
                "name": "SORBS-DUHL",
                "url": "http://www.sorbs.net/lookup.shtml",
                "in_black_list": false
            },
            {
                "name": "SORBS-SPAM",
                "url": "http://www.sorbs.net/lookup.shtml",
                "in_black_list": false
            },
            {
                "name": "SPAMCANNIBAL",
                "url": "http://www.spamcannibal.org/",
                "in_black_list": false
            },
            {
                "name": "SPAMCOP",
                "url": "http://spamcop.net/bl.shtml",
                "in_black_list": false
            },
            {
                "name": "SPAMHAUS-ZEN",
                "url": "http://www.spamhaus.org/",
                "in_black_list": false
            },
            {
                "name": "TRUNCATE",
                "url": "http://www.gbudb.com/truncate/index.jsp",
                "in_black_list": false
            }
        ]
    }
}

POST

/api/v1/inboxes/{inbox_id}/messages/{id}/forward

Forward message to email address

Parameters
Name Description Details
inbox_id

inbox ID (identifier)

integer, required
id

message ID (identifier)

integer, required

Response

200 (OK)
Content-Type: application/json
{
    "message": "email successful forwarded"
}

GET

/api/v1/inboxes/{inbox_id}/messages/{id}/body.html

Get HTML email body (if exist)

Parameters
Name Description Details
inbox_id

inbox ID (identifier)

integer, required
id

message ID (identifier)

integer, required

Response

200 (OK)
Content-Type: text/html
"HTML email body"

GET

/api/v1/inboxes/{inbox_id}/messages/{id}/body.txt

Get TEXT email body (if exist)

Parameters
Name Description Details
inbox_id

inbox ID (identifier)

integer, required
id

message ID (identifier)

integer, required

Response

200 (OK)
Content-Type: text/plain
"TEXT email body"

GET

/api/v1/inboxes/{inbox_id}/messages/{id}/body.raw

Get RAW email body

Parameters
Name Description Details
inbox_id

inbox ID (identifier)

integer, required
id

message ID (identifier)

integer, required

Response

200 (OK)
Content-Type: text/plain
"RAW email body"

GET

/api/v1/inboxes/{inbox_id}/messages/{id}/body.eml

Download RAW email body

Parameters
Name Description Details
inbox_id

inbox ID (identifier)

integer, required
id

message ID (identifier)

integer, required

Response

200 (OK)
Content-Type: message/rfc822
"RAW email body"

GET

/api/v1/inboxes/{inbox_id}/messages/{id}/mail_headers

Get headers of message

Parameters
Name Description Details
inbox_id

inbox ID (identifier)

integer, required
id

message ID (identifier)

integer, required

Response

200 (OK)
Content-Type: application/json
{
    "headers": {
        "message_id": "0d5d0266aadcf764e7b171154ea6ac@alexeys-macbook-pro-2.local",
        "date": "Fri, 18 Apr 2014 12:37:40 +0000",
        "x_mailer": "Super SMTP client",
        "sender": null,
        "to": "Receiver Name <to@example.com>",
        "cc": "Receiver Second Name <to2@example.com>",
        "bcc": null,
        "resent_bcc": null
    }
}

GET

/api/v1/inboxes/{inbox_id}/messages/{id}/spam_report

Get spam report for message

Parameters
Name Description Details
inbox_id

inbox ID (identifier)

integer, required
id

message ID (identifier)

integer, required

Response

200 (OK)
Content-Type: application/json
{
  "report": {
      "ResponseCode": 0,
      "ResponseMessage": "EX_OK",
      "Score": 1.5,
      "Spam": false,
      "Threshold": 5,
      "Details": [
          {
              "Pts": "-0.0",
              "RuleName": "NO_RELAYS",
              "Description": "Informational: message was not relayed via SMTP"
          },
          {
              "Pts": "0.1",
              "RuleName": "MISSING_MID",
              "Description": "Missing Message-Id: header"
          },
          {
              "Pts": "-0.0",
              "RuleName": "NO_RECEIVED",
              "Description": "Informational: message has no Received headers"
          },
          {
              "Pts": "1.4",
              "RuleName": "MISSING_DATE",
              "Description": "Missing Date: header"
          }
      ]
  }
}

GET

/api/v1/inboxes/{inbox_id}/messages/{id}/analyze

Get info about HTML part

Parameters
Name Description Details
inbox_id

inbox ID (identifier)

integer, required
id

message ID (identifier)

integer, required

Response

200 (OK)
Content-Type: application/json
{
    "report": {
        "status": "success",
        "errors": [
            {
                "error_line": 3,
                "rule_name": "background-image",
                "email_clients": {
                    "web": [
                        "Outlook.com"
                    ],
                    "desktop": [
                        "Outlook '07 / '10 / ‘13",
                        "Notes 6 / 7",
                        "Lotus Notes 8.5"
                    ]
                }
            },
            {
                "error_line": 3,
                "rule_name": "background-position",
                "email_clients": {
                    "web": [
                        "Outlook.com"
                    ],
                    "desktop": [
                        "Outlook '07 / '10 / ‘13",
                        "Notes 6 / 7",
                        "Lotus Notes 8.5"
                    ],
                    "mobile": [
                        "Gmail",
                        "Windows Mobile 7.5"
                    ]
                }
            },
            {
                "error_line": 3,
                "rule_name": "background-repeat",
                "email_clients": {
                    "web": [
                        "Outlook.com"
                    ],
                    "desktop": [
                        "Outlook '07 / '10 / ‘13",
                        "Notes 6 / 7",
                        "Lotus Notes 8.5"
                    ]
                }
            },
            {
                "error_line": 3,
                "rule_name": "margin",
                "email_clients": {
                    "web": [
                        "Outlook.com"
                    ],
                    "desktop": [
                        "Notes 6 / 7"
                    ]
                }
            },
            {
                "error_line": 3,
                "rule_name": "padding",
                "email_clients": {
                    "desktop": [
                        "Outlook '07 / '10 / ‘13 (Partial)",
                        "Notes 6 / 7"
                    ]
                }
            },
            {
                "error_line": 5,
                "rule_name": "background-image",
                "email_clients": {
                    "web": [
                        "Outlook.com"
                    ],
                    "desktop": [
                        "Outlook '07 / '10 / ‘13",
                        "Notes 6 / 7",
                        "Lotus Notes 8.5"
                    ]
                }
            },
            {
                "error_line": 5,
                "rule_name": "background-position",
                "email_clients": {
                    "web": [
                        "Outlook.com"
                    ],
                    "desktop": [
                        "Outlook '07 / '10 / ‘13",
                        "Notes 6 / 7",
                        "Lotus Notes 8.5"
                    ],
                    "mobile": [
                        "Gmail",
                        "Windows Mobile 7.5"
                    ]
                }
            },
            {
                "error_line": 5,
                "rule_name": "background-repeat",
                "email_clients": {
                    "web": [
                        "Outlook.com"
                    ],
                    "desktop": [
                        "Outlook '07 / '10 / ‘13",
                        "Notes 6 / 7",
                        "Lotus Notes 8.5"
                    ]
                }
            },
            {
                "error_line": 9,
                "rule_name": "display",
                "email_clients": {
                    "web": [
                        "Gmail"
                    ],
                    "desktop": [
                        "Outlook '07 / '10 / ‘13"
                    ],
                    "mobile": [
                        "Gmail",
                        "Windows Mobile 7.5"
                    ]
                }
            },
            {
                "error_line": 20,
                "rule_name": "display",
                "email_clients": {
                    "web": [
                        "Gmail"
                    ],
                    "desktop": [
                        "Outlook '07 / '10 / ‘13"
                    ],
                    "mobile": [
                        "Gmail",
                        "Windows Mobile 7.5"
                    ]
                }
            },
            {
                "error_line": 24,
                "rule_name": "line-height",
                "email_clients": {
                    "desktop": [
                        "Notes 6 / 7"
                    ]
                }
            },
            {
                "error_line": 31,
                "rule_name": "font-size",
                "email_clients": {
                    "mobile": [
                        "iPhone / iPad (Partial)",
                        "Blackberry 6"
                    ]
                }
            },
            {
                "error_line": 32,
                "rule_name": "width",
                "email_clients": {
                    "desktop": [
                        "Outlook '07 / '10 / ‘13 (Partial)",
                        "Notes 6 / 7"
                    ]
                }
            },
            {
                "error_line": 32,
                "rule_name": "display",
                "email_clients": {
                    "web": [
                        "Gmail"
                    ],
                    "desktop": [
                        "Outlook '07 / '10 / ‘13"
                    ],
                    "mobile": [
                        "Gmail",
                        "Windows Mobile 7.5"
                    ]
                }
            },
            {
                "error_line": 37,
                "rule_name": "font-size",
                "email_clients": {
                    "mobile": [
                        "iPhone / iPad (Partial)",
                        "Blackberry 6"
                    ]
                }
            },
            {
                "error_line": 39,
                "rule_name": "line-height",
                "email_clients": {
                    "desktop": [
                        "Notes 6 / 7"
                    ]
                }
            },
            {
                "error_line": 40,
                "rule_name": "width",
                "email_clients": {
                    "desktop": [
                        "Outlook '07 / '10 / ‘13 (Partial)",
                        "Notes 6 / 7"
                    ]
                }
            },
            {
                "error_line": 40,
                "rule_name": "display",
                "email_clients": {
                    "web": [
                        "Gmail"
                    ],
                    "desktop": [
                        "Outlook '07 / '10 / ‘13"
                    ],
                    "mobile": [
                        "Gmail",
                        "Windows Mobile 7.5"
                    ]
                }
            },
            {
                "error_line": 50,
                "rule_name": "padding",
                "email_clients": {
                    "desktop": [
                        "Outlook '07 / '10 / ‘13 (Partial)",
                        "Notes 6 / 7"
                    ]
                }
            },
            {
                "error_line": 51,
                "rule_name": "font-size",
                "email_clients": {
                    "mobile": [
                        "iPhone / iPad (Partial)",
                        "Blackberry 6"
                    ]
                }
            },
            {
                "error_line": 53,
                "rule_name": "width",
                "email_clients": {
                    "desktop": [
                        "Outlook '07 / '10 / ‘13 (Partial)",
                        "Notes 6 / 7"
                    ]
                }
            },
            {
                "error_line": 53,
                "rule_name": "display",
                "email_clients": {
                    "web": [
                        "Gmail"
                    ],
                    "desktop": [
                        "Outlook '07 / '10 / ‘13"
                    ],
                    "mobile": [
                        "Gmail",
                        "Windows Mobile 7.5"
                    ]
                }
            },
            {
                "error_line": 65,
                "rule_name": "width",
                "email_clients": {
                    "desktop": [
                        "Outlook '07 / '10 / ‘13 (Partial)",
                        "Notes 6 / 7"
                    ]
                }
            },
            {
                "error_line": 65,
                "rule_name": "display",
                "email_clients": {
                    "web": [
                        "Gmail"
                    ],
                    "desktop": [
                        "Outlook '07 / '10 / ‘13"
                    ],
                    "mobile": [
                        "Gmail",
                        "Windows Mobile 7.5"
                    ]
                }
            },
            {
                "error_line": 81,
                "rule_name": "display",
                "email_clients": {
                    "web": [
                        "Gmail"
                    ],
                    "desktop": [
                        "Outlook '07 / '10 / ‘13"
                    ],
                    "mobile": [
                        "Gmail",
                        "Windows Mobile 7.5"
                    ]
                }
            },
            {
                "error_line": 91,
                "rule_name": "display",
                "email_clients": {
                    "web": [
                        "Gmail"
                    ],
                    "desktop": [
                        "Outlook '07 / '10 / ‘13"
                    ],
                    "mobile": [
                        "Gmail",
                        "Windows Mobile 7.5"
                    ]
                }
            }
        ]
    }
}

Attachment

GET

/api/v1/inboxes/{inbox_id}/messages/{message_id}/attachments{?attachment_type}

Get message attachments.

Parameters
Name Description Details
inbox_id

inbox ID (identifier)

integer, required
message_id

message ID (identifier)

integer, required
attachment_type

attachment type, can be "attachment" or "inline"

string, optional

Response

200 (OK)
Content-Type: application/json
[
    {
        "id": 1737,
        "message_id": 54508,
        "filename": "Photos.png",
        "attachment_type": "attachment",
        "content_type": "image/png",
        "content_id": "",
        "transfer_encoding": "base64",
        "attachment_size": 213855,
        "created_at": "2013-08-16T00:39:34.677+03:00",
        "updated_at": "2013-08-16T00:39:34.677+03:00",
        "attachment_human_size": "210 KB",
        "download_url": "https://mailtrap.io/api/v1/inboxes/3/messages/54508/attachments/1737/download"
    },
    {
        "id": 1739,
        "message_id": 54508,
        "filename": "bg_pattern.jpg",
        "attachment_type": "inline",
        "content_type": "image/jpg",
        "content_id": "54BE4E31-D6A4-4C82-9DA5-3A243CC92F97/bg_pattern.jpg",
        "transfer_encoding": "base64",
        "attachment_size": 27235,
        "created_at": "2013-08-16T00:39:34.693+03:00",
        "updated_at": "2013-08-16T00:39:34.693+03:00",
        "attachment_human_size": "27 KB",
        "download_url": "https://mailtrap.io/api/v1/inboxes/3/messages/54508/attachments/1739/download"
    }
]

GET

/api/v1/inboxes/{inbox_id}/messages/{message_id}/attachments/{id}

Get message attachment

Parameters
Name Description Details
inbox_id

inbox ID (identifier)

integer, required
message_id

message ID (identifier)

integer, required
id

attachment ID (identifier)

integer, required

Response

200 (OK)
Content-Type: application/json
{
    "id": 1737,
    "message_id": 54508,
    "filename": "Photos.png",
    "attachment_type": "attachment",
    "content_type": "image/png",
    "content_id": "",
    "transfer_encoding": "base64",
    "attachment_size": 213855,
    "created_at": "2013-08-16T00:39:34.677+03:00",
    "updated_at": "2013-08-16T00:39:34.677+03:00",
    "attachment_human_size": "210 KB",
    "download_url": "https://mailtrap.io/api/v1/inboxes/3/messages/54508/attachments/1737/download"
}

Forward Email

The following is a section of resources related to the forward email

GET

/api/v1/inboxes/{inbox_id}/forward_emails

Get forward emails for inbox

Parameters
Name Description Details
inbox_id

inbox ID (identifier)

integer, required

Response

200 (OK)
Content-Type: application/json
[
    {
        "id": 2,
        "inbox_id": 1,
        "email": "forward@example.com"
    }
]

GET

/api/v1/inboxes/{inbox_id}/forward_emails/{id}

Get forward email for inbox

Parameters
Name Description Details
inbox_id

inbox ID (identifier)

integer, required
id

forward email ID (identifier)

integer, required

Response

200 (OK)
Content-Type: application/json
{
    "id": 2,
    "inbox_id": 1,
    "email": "forward@example.com"
}

POST

/api/v1/inboxes/{inbox_id}/forward_emails/{id}

Create forward email in inbox

Parameters
Name Description Details
inbox_id

inbox ID (identifier)

integer, required
id

forward email ID (identifier)

integer, required

Response

200 (OK)
Content-Type: application/json
{
    "id": 9,
    "inbox_id": 1,
    "email": "new-forward@example.com"
}

PATCH

/api/v1/inboxes/{inbox_id}/forward_emails/{id}

Update forward email in inbox

Parameters
Name Description Details
inbox_id

inbox ID (identifier)

integer, required
id

forward email ID (identifier)

integer, required

Response

200 (OK)
Content-Type: application/json
{
    "id": 2,
    "inbox_id": 1,
    "email": "updated-forward@example.com"
}

DELETE

/api/v1/inboxes/{inbox_id}/forward_emails/{id}

Delete forward email in inbox

Parameters
Name Description Details
inbox_id

inbox ID (identifier)

integer, required
id

forward email ID (identifier)

integer, required

Response

200 (OK)
Content-Type: application/json
{
    "id": 2,
    "inbox_id": 1,
    "email": "updated-forward@example.com"
}

Inbox User

The following is a section of resources related to the inbox user

GET

/api/v1/inboxes/{inbox_id}/inboxes_users

Get inbox users for inbox

Parameters
Name Description Details
inbox_id

inbox ID (identifier)

integer, required

Response

200 (OK)
Content-Type: application/json
[
    {
        "id": 1,
        "inbox_id": 8,
        "created_at": "2014-05-31T20:03:20.186Z",
        "updated_at": "2014-05-31T20:03:20.186Z",
        "email": "example@example.com"
    }
]

GET

/api/v1/inboxes/{inbox_id}/inboxes_users/{id}

Get inbox user for inbox

Parameters
Name Description Details
inbox_id

inbox ID (identifier)

integer, required
id

forward email ID (identifier)

integer, required

Response

200 (OK)
Content-Type: application/json
{
    "id": 1,
    "inbox_id": 8,
    "created_at": "2014-05-31T20:03:20.186Z",
    "updated_at": "2014-05-31T20:03:20.186Z",
    "email": "example@example.com"
}

DELETE

/api/v1/inboxes/{inbox_id}/inboxes_users/{id}

Delete inbox user in inbox

Parameters
Name Description Details
inbox_id

inbox ID (identifier)

integer, required
id

forward email ID (identifier)

integer, required

Response

200 (OK)
Content-Type: application/json
{
    "id": 1,
    "inbox_id": 8,
    "created_at": "2014-05-31T20:03:20.186Z",
    "updated_at": "2014-05-31T20:03:20.186Z",
    "email": "example@example.com"
}

CORS domain

The following is a section of resources related to the CORS domain

GET

/api/v1/cors_domains

Get CORS domains

Response

200 (OK)
Content-Type: application/json
[
    {
        "id": 19,
        "user_id": 1,
        "domain": "example.com"
    }
]

GET

/api/v1/cors_domains/{id}

Get CORS domain

Parameters
Name Description Details
id

CORS domain ID (identifier)

integer, required

Response

200 (OK)
Content-Type: application/json
{
    "id": 19,
    "user_id": 1,
    "domain": "example.com"
}

POST

/api/v1/cors_domains/{id}

Create CORS domain

Parameters
Name Description Details
id

CORS domain ID (identifier)

integer, required

Response

200 (OK)
Content-Type: application/json
{
    "id": 20,
    "user_id": 1,
    "domain": "example.com"
}

PATCH

/api/v1/cors_domains/{id}

Update CORS domain

Parameters
Name Description Details
id

CORS domain ID (identifier)

integer, required

Response

200 (OK)
Content-Type: application/json
{
    "id": 20,
    "user_id": 1,
    "domain": "new-example.com"
}

DELETE

/api/v1/cors_domains/{id}

Delete CORS domain

Parameters
Name Description Details
id

CORS domain ID (identifier)

integer, required

Response

200 (OK)
Content-Type: application/json
{
    "id": 20,
    "user_id": 1,
    "domain": "new-example.com"
}

Shared user

The following is a section of resources related to the shared user

GET

/api/v1/companies/{company_id}/shared_users

Get shared users in company

Parameters
Name Description Details
company_id

company ID (identifier)

integer, required

Response

200 (OK)
Content-Type: application/json
[
    {
        "id": 20,
        "role": "user",
        "is_owner": false,
        "name": "Alex Chaplinsky",
        "email": "user@example.com"
    }
]

GET

/api/v1/companies/{company_id}/shared_users/{id}

Get shared user in company

Parameters
Name Description Details
company_id

company ID (identifier)

integer, required
id

shared user ID (identifier)

integer, required

Response

200 (OK)
Content-Type: application/json
{
    "id": 20,
    "role": "user",
    "is_owner": false,
    "name": "Alex Chaplinsky",
    "email": "user@example.com"
}

DELETE

/api/v1/companies/{company_id}/shared_users/{id}

Delete shared user from company

Parameters
Name Description Details
company_id

company ID (identifier)

integer, required
id

shared user ID (identifier)

integer, required

Response

200 (OK)
Content-Type: application/json
{
    "id": 20,
    "role": "user",
    "is_owner": false,
    "name": "Alex Chaplinsky",
    "email": "user@example.com"
}