Your Gmail,
as a REST API.
Sign in with Google and get a personal key to read, search and send your own mail from any script. Disposable aliases are built in: one inbox, unlimited addresses, one endpoint that works out the rest.
Works with any Gmail address · tokens encrypted at rest · revoke anytime · open source
curl -H "Authorization: Bearer $KEY" \
"https://mailapi.pushkarsingh4343.workers.dev/v1/messages?q=is:unread&maxResults=2"{
"mailbox": "you@gmail.com",
"messages": [
{
"from": "GitHub <noreply@github.com>",
"subject": "Your build passed",
"labels": ["INBOX", "UNREAD"]
}
]
}curl -H "Authorization: Bearer $KEY" \
"https://mailapi.pushkarsingh4343.workers.dev/v1/messages?email=you%2Bnetflix%40gmail.com"{
"mailbox": "you+netflix@gmail.com",
"messages": [
{
"from": "Netflix <info@netflix.com>",
"subject": "Your verification code",
"to": "you+netflix@gmail.com"
}
]
}curl -X POST "https://mailapi.pushkarsingh4343.workers.dev/v1/messages/send" \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{"to":"friend@example.com","subject":"Hi","text":"sent via my API"}'{
"id": "18f3a9c2b7e1d604",
"threadId": "18f3a9c2b7e1d604",
"labelIds": ["SENT"]
}Sample responses. Plain curl, no SDK.
One inbox, unlimited addresses.
Gmail ignores dots and anything after the +. Hand every site its own address, then ask the API for just that address.
- you+netflix@gmail.comyou@gmail.com?email=you+netflix@gmail.com
- y.o.u+shop@gmail.comyou@gmail.com?email=y.o.u+shop@gmail.com
- you+ci@gmail.comyou@gmail.com?email=you+ci@gmail.com
Built for scripts and automations.
Everything a mailbox integration needs, nothing it doesn't.
- One key, your whole mailbox
- A personal API key to list, read and send mail. Rotate or delete it whenever you want.
- Multiple Google accounts
- Link several Gmail accounts to one key and use them all at the same time. Each request just names the address it wants.
- Disposable aliases
- +tag and dot aliases are free temp addresses. Pass one as
emailand only its mail comes back. - Auto-detected addresses
- One
emailparameter for everything: a plain address returns its inbox, an alias returns just that alias. No separate endpoint. - Fast and serverless
- Runs on Cloudflare Workers at the edge. No servers to manage, nothing to maintain.
- Open source
- The whole project is open source. Read the code, self-host it on your own Cloudflare account, or send a pull request on GitHub.
- Zero lock-in
- Delete your account in one click. Google access is revoked and all stored data wiped instantly.
Up and running in two minutes.
Everything works from plain curl.
Sign in with Google
Approve read and send access. You land on a dashboard with your API key.
Read your inbox
Any Gmail search works as the
qparameter.curl -H "Authorization: Bearer $KEY" "https://mailapi.pushkarsingh4343.workers.dev/v1/messages?q=is:unread"Make a temp address
Give a site
you+netflix@gmail.com, then read only that alias.curl -H "Authorization: Bearer $KEY" "https://mailapi.pushkarsingh4343.workers.dev/v1/messages?email=you%2Bnetflix%40gmail.com"Send mail
One POST. Add
fromto send as any linked address or alias.{"to":"friend@example.com","subject":"Hi","text":"sent via my API"}