Jo-Mail-API für Entwickler

Erstellen Sie temporäre Postfächer und lesen Sie eingehende Nachrichten aus Ihrem eigenen Code, etwa zum Testen von Registrierungsabläufen.

Authentifizierung

Erstellen Sie im Dashboard einen Schlüssel und senden Sie ihn mit jeder Anfrage in einem dieser Header.

X-Api-Key: jm_xxxxxxxxxxxxxxxx
# or
Authorization: Bearer jm_xxxxxxxxxxxxxxxx

Endpunkte

POST   /api/inbox                         create an inbox   {"guest":true,"name":"optional","domain":"jo-mail.org","ttl_minutes":60}
                                          -> {"inbox":{"id":1,"address":"...","expires_at":...},"key":"1.abcdef..."}
GET    /api/inbox                         list messages     (header X-Inbox: <key>)
GET    /api/inbox/wait?after=<lastId>     long-poll: returns {"changed":true} as soon as a new message arrives
GET    /api/inbox/messages/{id}           read one message  (subject, from, text, html, attachments)
GET    /api/inbox/attachments/{id}        download an attachment
DELETE /api/inbox/messages/{id}           delete a message
POST   /api/inbox/renew                   extend the lifetime
DELETE /api/inbox                         delete the inbox

Beispiele

# 1) create an inbox
curl -s -X POST https://jo-mail.org/api/inbox \
  -H "X-Api-Key: $JM_KEY" -H "Content-Type: application/json" \
  -d '{"guest":true}'

# 2) wait for mail, then read it
curl -s "https://jo-mail.org/api/inbox/wait?after=0" -H "X-Inbox: $INBOX_KEY"
curl -s https://jo-mail.org/api/inbox -H "X-Inbox: $INBOX_KEY"
// JavaScript
const r = await fetch('https://jo-mail.org/api/inbox', {
  method: 'POST',
  headers: { 'X-Api-Key': KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({ guest: true }),
});
const { inbox, key } = await r.json();
console.log(inbox.address);   // use it to sign up, then poll /api/inbox/wait

Limit: 600 Postfächer pro Stunde und Schlüssel. Postfachschlüssel sind geheim: Wer den Schlüssel hat, kann dieses Postfach lesen.