Learn how to create API keys, authenticate requests, create inboxes, fetch messages, and handle common Run2Mail API responses.
Generate developer API keys from your dashboard. Each key is shown in full only once, then stored as a secure hash for future verification.
Use a Bearer token in the Authorization header for every protected request.
Authorization: Bearer YOUR_API_KEY
If the key is invalid, revoked, or missing, the API responds with an authentication error.
The most common workflow is: inspect the authenticated user, create an inbox, then fetch messages from that inbox.
curl -X GET "https://run2mail.com/api/v1/me" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Accept: application/json"
curl -X POST "https://run2mail.com/api/v1/emails/create" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"type": "random"
}'
curl -X GET "https://run2mail.com/api/v1/emails/example@2mail.lol/messages" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Accept: application/json"
{
"success": true,
"data": {
"email": "example@2mail.lol",
"messages": []
}
}
Run2Mail applies plan-based request limits and daily inbox creation limits to protect the service and keep API access stable.
This area is reserved for future screenshots of the API key manager and usage dashboard.