Create an inbox
Create a new inbox in a folder. By default Mailtrap generates the inbox address automatically based on the name.
To create a catch-all inbox on your own domain, pass domain_id — the ID of a verified custom sending domain with inbound enabled. The inbox then receives mail sent to any address on that domain, and its address is returned as *@your-domain.com.
API token in Api-Token header
Inbound folder ID
1Support ticketsAttach the inbox to a verified custom sending domain (one with inbound enabled), creating a catch-all inbox that receives mail for any address on that domain. Omit to create a standard Mailtrap-hosted inbox. Requires the custom domains feature.
894Inbox created
1Support ticketsThe inbox's inbound address. For a standard Mailtrap-hosted inbox
this is a unique generated address. For a custom-domain inbox it is
the catch-all form *@your-domain.com, which receives mail sent to
any address on that domain.
support-tickets-1a2b3c4d@inbound-mailtrap.ioID of the sending domain the inbox is attached to. For a custom-domain inbox this is your own sending domain; for a standard hosted inbox it is the Mailtrap-managed domain backing the inbox.
892Unauthorized
Forbidden
Not found
Validation error
curl -X POST https://mailtrap.io/api/inbound/folders/{folder_id}/inboxes \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{ "name": "Support tickets" }'
{
"id": 1,
"name": "Support tickets",
"address": "support-tickets-1a2b3c4d@inbound-mailtrap.io",
"domain_id": 892
}Last updated
Was this helpful?

