Drift Mail

Drift Mail API

Create an address, save your token, and submit a message. Requests accept JSON or URL-encoded form data. Responses are JSON.

1. Create a mailbox

POST /api/signup
Content-Type: application/json

{"username":"research"}

The response includes account.address, account.expires_at, and token. Save your token; it is valid for 24 hours.

2. Send a message

POST /api/send
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{"to":"person@example.com","subject":"Hello","body":"Your message here"}

For GET integrations, URL-encode the fields and use the same Authorization header:

GET /api/send?to=person%40example.com&subject=Hello&body=Your%20message
Authorization: Bearer YOUR_TOKEN

Each successful call creates a new message record and returns HTTP 201 with its ID. Repeating a request creates another record. GET is supported for compatibility; POST keeps message text out of URL histories. Do not put tokens in query strings.

3. Read your mailbox

GET /api/me
GET /api/messages
Authorization: Bearer YOUR_TOKEN

History returns the latest 100 messages. The web flow uses a session cookie automatically.

Limits and errors

One recipient per message. Body up to 48 KiB, total POST request up to 64 KiB. HTTP 400 means invalid input, 401 means an expired or missing token, 429 means the service is busy, and 503 means storage is temporarily unavailable. A 503 response is not an accepted message.