Create Inbox
Create a permanent, ephemeral, or hidden test inbox.
Create a permanent, ephemeral, or hidden test inbox.
Scope: email_testing.inboxes.write
Request Body
domain_idstringoptionalThe ID of the custom domain to create the inbox on. Leave it out to use the shared sandbox domain (sandbox.maileroo.net).
local_partstringrequiredThe part of the address before the @, for example signup-tests for [email protected].
kindstringoptionalWhat kind of inbox to create: permanent, ephemeral (expires automatically), or invisible (hidden from the default list).
smtp_responsestringoptionalHow the inbox answers incoming mail: accept, soft_bounce (temporary failure), hard_bounce (permanent failure), or complaint (accepted, then reported as spam). Magic tags in the address override this per message.
invisiblebooleanoptionalHide this inbox from the dashboard and the default inbox list. Handy for throwaway inboxes created by automated tests.
ttl_secondsintegeroptionalHow long until the inbox expires, in seconds. Setting this makes the inbox expire even if kind is permanent.
Sample Request
curl -X POST "https://api.maileroo.com/v1/email-testing/mailboxes" \
-H "Authorization: Bearer roo_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"local_part":"inbox","smtp_response":"accept"}'Sample Response
The response is wrapped in a data object.
{
"data": {
"id": "35a3cb89-ea59-4ea3-8edc-a5c5f7bf0bda",
"account_id": "12345",
"domain_id": "sandbox",
"local_part": "inbox",
"address": "[email protected]",
"kind": "permanent",
"smtp_response": "accept",
"invisible": false,
"expires_at": null,
"created_at": "2025-01-01T12:00:00Z"
}
}Errors
400 Bad Request— the request parameters are invalid.404 Not Found— the referenced resource does not exist or is not owned by the account.429 Too Many Requests— the account reached its test-inbox limit.