GPTMail Temporary Email API Quick Start: Key, Receiving, Rate Limits, and Subdomains
With the GPTMail API, you can generate temporary addresses, query the inbox, and read or delete emails. This article covers the current integration flow and common pitfalls; full API parameters are linked to the official documentation.
Content verified: November 15, 2026. Original publication date retained; for dynamic pricing, quotas, and availability, refer to the current descriptions in the linked pages.

Before You Start
The API base URL is https://mail.chatgpt.org.uk, and the request header uses X-API-Key. Get the public test Key for the day fromthe latest GPTMail API documentation, or log in to manage your own personal Key and credits. Do not use the fixed test Key from older articles or the store entry point that has been discontinued.
Minimal Request Example
The following only demonstrates address generation; it does not send emails, register third-party accounts, or modify an existing inbox. Keep the key in an environment variable:
curl --fail-with-body -H "X-API-Key: $GPTMAIL_API_KEY" "https://mail.chatgpt.org.uk/api/generate-email"
After obtaining the full email address, send an email to it in your own test flow, then query the inbox. Do not treat the example domain example.com as an actual domain that can receive mail.
Common Endpoints
| Purpose | Method and Path | Notes |
|---|---|---|
| Generate address | GET / POST /api/generate-email | See the official documentation for domain and prefix parameters |
| Query inbox | GET /api/emails?email=full address | URL-encode the address |
| Read one email | GET /api/email/{id}?email=full address | Pass both the email ID and the corresponding address |
| Delete one email | DELETE /api/email/{id}?email=full address | Do not confuse reading with deleting |
| Clear inbox | DELETE /api/emails/clear?email=full address | May be processed in batches; check has_more |
| Public domain directory | GET /api/domains/public | Use this to select a currently valid suffix |
| Statistics | GET /api/stats | Refer to the fields and permissions in the documentation |
How Do Subdomains Work?
The public domain directory lists available subdomains. For projects that support wildcards, you can use an allowed single-level prefix; if wildcards are not supported, choose from the returned children. The email username is the part before @ , not the subdomain prefix. Private domains and login-exclusive domains are not available through the public API Key.
Four Checks for Stable Calls
- Check the HTTP status code and Content-Type first, then parse the JSON; proxy or platform errors may return HTML.
- Address generation GET/POST share a source IP rate limit: currently 30 requests per 10 seconds. When a 429 occurs, follow Retry-After and use backoff.
- Do not regenerate the mailbox for every receiving poll; keep the full address and poll moderately to avoid consuming shared resources.
- The clear endpoint is a destructive operation; when has_more is true, it means there are still pending batches, so a single response cannot be treated as complete deletion.
Security and retention period
Public temporary inboxes are not suitable for sensitive information, financial accounts, password recovery, or long-term communication; emails are retained for a maximum of 24 hours. Email addresses under known available domains can be formed from valid usernames, but this does not imply account ownership or any privacy guarantee.
This article no longer reproduces the entire API reference, to avoid having two conflicting sets of documentation after response fields are updated. For request bodies, response examples, error codes, and real-time rules, seethe latest GPTMail API documentation; for how to obtain a key, seeAPI Key and Credits Guide。
评论与讨论
还没有评论,欢迎留下第一条讨论