-
Notifications
You must be signed in to change notification settings - Fork 0
v1 API Endpoints
These docs are for legacy purposes, please upgrade to v2 of the API. Preface all requests to v1 with /v1/ to avoid interruptions.
Base URL: https://api.tempmail.lol
Feel free to join the Discord Server if you need help with anything API related. Email us if you need assistance with billing, subscriptions, or anything else: [email protected].
Inboxes expire after a certain amount of time:
Subscription | Inbox Lifespan |
---|---|
free | One Hour |
TempMail Plus | Ten Hours |
TempMail Ultra | Thirty Hours |
Inboxes no longer expire after 10 minutes since last check.
These expiration dates do not apply to custom domain inboxes.
Custom Domains have an inbox size of 300 emails, or 16 MB, whichever comes first.
Custom Domain Inboxes may be erased after one month of last check to protect user's privacy (and to free up storage).
First, you do not need an API key to use the free tier; however, you will need either an API Key or a legacy ID/Token to use TempMail Plus or Ultra.
Authorization: Bearer tm.1234567890.abcdefghijklmnopqrstuvwxyzanditkeepsgoingon
Make sure to copy the FULL API Key from your dashboard. If you lose it, you will need to make a new one.
This authorization uses the form id,token
, such as:
Authorization: 123456781234567812345678,ABCDEFGHIJKLMNOPQRSTUVWXYZ
Replace with your own BananaCrumbs ID and token.
No new time can be added to legacy accounts; however, you can merge legacy accounts here after creating a new TempMail Account.
Field | Type | Description |
---|---|---|
from | string | Email address of the sender |
to | string | The address the email was sent to |
subject | string | The email subject |
body | string | The text body of the email |
date | number | Unix timestamp (millis) the email was received |
ip | string | The IP address of the sender (not always accurate) |
html | ?string | The HTML of the email (possibly undefined) |
Field | Type | Description |
---|---|---|
address | string | The email address of this inbox |
token | string | The token used to access this inbox |
Generate a normal, community, or specific domain. You can use any subdomain on the normal domains, or a random one will be used.
JSON field | Type | Description |
---|---|---|
address | string | The email address you have created |
token | string | The token used to access the inbox |
JSON field | Type | Description |
---|---|---|
error | string | An error explaining why an email could not be created |
JSON field | Type | Description |
---|---|---|
Email[] | Array of Email objects, or null if it is invalid |
|
token | ?string |
"invalid" if the token is invalid, otherwise not present |
Custom domains are completely different in v1 than they are v2, if you are going to use the old custom domains, call v1 on the API.
You must have TempMail Plus or higher to use Custom Domains
Configure legacy custom domains here.
The password
field is the long token given on the custom domain configuration page. The value added to the _tmpml
TXT record is an SHA512 hash
of that password.
Retruns:
JSON field | Type | Description |
---|---|---|
Email[] | Array of Email objects |
v1 will not alert you if the password is invalid. Upgrade to v2 to use that.
Adds a webhook to your account, must have TempMail Ultra and sign in to use this. Webhook should start with https://
before the URL.
Removes the webhook from your account.
Adds a community domain. Configure community domains here.
Get the stats for TempMail.