shitty.email

Developer Documentation

REST API

Simple JSON API. No authentication required. Rate limited to prevent abuse. Using it in automated tests? See the email testing guide for Playwright and pytest examples.

POST/api/inbox

Create a new temporary inbox. Returns an email address and session token.

curl -X POST https://shitty.email/api/inbox

Response:

{
  "email": "abc1234@shitty.email",
  "token": "your-session-token",
  "expiresAt": "2026-02-03T15:00:00.000Z"
}
Save the token! You need it for all other API calls.

GET/api/inbox

Fetch all emails in your inbox.

curl -H "X-Session-Token: {your_token}" \
  https://shitty.email/api/inbox

Response:

{
  "emails": [
    {
      "id": "msg_a1b2c3d4e5",
      "from": "sender@example.com",
      "subject": "Welcome!",
      "date": "2026-02-03T14:30:00.000Z"
    }
  ]
}

GET/api/email/:id

Get full email content including HTML and plain text body.

curl -H "X-Session-Token: {your_token}" \
  https://shitty.email/api/email/{email_id}
The {email_id} is the message ID from the inbox response (e.g. msg_a1b2c3d4e5), NOT your email address.

POST/api/inbox/extend

Extend inbox lifetime by 1 hour (max 24 hours total).

curl -X POST -H "X-Session-Token: {your_token}" \
  https://shitty.email/api/inbox/extend

DELETE/api/inbox

Delete your inbox and all emails immediately.

curl -X DELETE -H "X-Session-Token: {your_token}" \
  https://shitty.email/api/inbox

Limits

  • Inbox lifetime: 1 hour (extendable to 24 hours)
  • Max email size: 1 MB
  • Rate limit: 25 new inboxes per IP per hour; 30 API requests per IP per minute
  • Receive only - no outbound email
← Back to inbox