Skip to main content
API

TempMail API integration

The REST interface for partners and internal integrations: domain discovery, address provisioning, mailbox sign-in and message operations.

Every request carries an API key we issue to a partner or an internal integration, as the bearer in the authorization header. Keys are not self-service; contact us to arrange one.

Base URLhttps://api.linuxhackingid.com/mail

Endpoints

  • GET
    /domains

    List active receiving domains

    Required: authorization

  • POST
    /mailboxes

    Provision a free temporary address

    Required: authorization

  • POST
    /mailbox/login

    Reopen a mailbox with its address and password

    Required: authorization

  • GET
    /messages

    List messages in the active inbox

    Required: authorization, x-mailbox-token

  • GET
    /messages/{id}

    Fetch one message with its plain-text body

    Required: authorization, x-mailbox-token

  • DELETE
    /mailbox

    Delete the mailbox and everything in it

    Required: authorization, x-mailbox-token

# 1. create a mailbox with the API key issued to you
curl -s -X POST \
  https://api.linuxhackingid.com/mail/mailboxes \
  -H "authorization: Bearer $LHI_API_KEY" \
  -H "content-type: application/json" \
  -d '{"domain_id":"<id from GET /domains>"}'

# -> 201 Created
# { "success": true, "data": { "address": "...", "mailbox_token": "..." } }

# 2. read the mailbox it just minted: the same API key, plus the mailbox_token
# from step 1 - every call below the mailbox itself carries both headers
curl -s \
  https://api.linuxhackingid.com/mail/messages \
  -H "authorization: Bearer $LHI_API_KEY" \
  -H "x-mailbox-token: $MAILBOX_TOKEN"

# -> 200 OK
# { "success": true, "data": [ ... ] }

Rate limit: the gateway caps requests per caller - per signed-in user, or per IP address - and there is no separate per-token quota. A mailbox token expires with its mailbox and cannot outlive it.

Need your own domain?

Run temporary email on your domain

Get in touch