Τεκμηρίωση API TempMail

TempMailg Τεκμηρίωση API

Χρησιμοποιήστε αυτήν την τεκμηρίωση για να δημιουργήσετε το προσωπικό σας κλειδί API, να συνδεθείτε με τον αφιερωμένο host API χρήστη, να διαβάσετε μηνύματα ταχυδρομείου, να διαχειριστείτε τα mailbox που ανήκουν σε εσάς και να ενσωματώσετε το Temp Mail στις δικές σας εφαρμογές ή αυτοματοποιήσεις.

Βασική Διεύθυνση URL API Χρήστη
Μορφή αιτήματος Χρησιμοποιήστε το κλειδί API σας μόνο στο header Αυθεντικοποίησης Bearer και κρατήστε τα URL των endpoint καθαρά.

Τερματικά API χρήστη

Κάθε τερματικό παρακάτω χρησιμοποιεί την ίδια βάση URL και το ίδιο token Bearer. Οι αιτήσεις Mailbox, μήνυμα και συνημμένο ελέγχονται έναντι του λογαριασμού του αυθεντικοποιημένου χρήστη.

GET https://v1.tempmailg.com/api/domains?type={type}

Λάβετε τις περιοχές που επιτρέπονται για το τρέχον σχέδιο και λογαριασμό χρήστη.

Επιτρεπόμενες τιμές τύπου: free, basic, pro, premium, custom, ultimate, all. Free plan can query free. Paid plans (including any custom plans created in admin panel) can query their plan tag, custom domains, or all.
Λάβετε τις επιτρεπόμενες περιοχές
curl --request GET \
  --url 'https://v1.tempmailg.com/api/domains?type=free' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_USER_API_KEY'

Παράδειγμα απόκρισης

{
    "status": true,
    "data": {
        "requested_type": "free",
        "plan": "pro",
        "plan_name": "Pro Plan",
        "allowed_types": [
            "free",
            "basic",
            "pro",
            "premium",
            "custom",
            "ultimate",
            "all"
        ],
        "domains": [
            {
                "domain": "example.com",
                "type": "Free",
                "custom": false
            }
        ]
    }
}
POST https://v1.tempmailg.com/api/emails

Create a new random or custom mailbox owned by the authenticated user.

Optional body parameters: username (custom username if allowed by plan), domain (allowed domain, e.g. example.com), lifetime (allowed values: 10m, 1h, 2h, 1d, 1w, 1m, unlimited), provider (standard, gmail_alias, outlook_alias).
Create mailbox
curl --request POST \
  --url 'https://v1.tempmailg.com/api/emails' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_USER_API_KEY'

Παράδειγμα απόκρισης

{
    "status": true,
    "data": {
        "id": 2301,
        "email": "customuser@example.com",
        "domain": "example.com",
        "provider": "standard",
        "expire_at": "2026-09-19T10:14:10+00:00",
        "expires_in_seconds": 86400,
        "created_at": "2026-09-18T10:14:10+00:00",
        "email_token": "encrypted-email-token"
    }
}
POST https://v1.tempmailg.com/api/emails/{email}/{username}/{domain}

Ενημερώστε ή αλλάξτε ένα υπάρχον mailbox που ανήκει στον χρήστη σε ένα νέο όνομα χρήστη και επιτρεπόμενη περιοχή.

Χρησιμοποιήστε ένα υπάρχον mailbox email στο {email}. Optional body parameter: lifetime (allowed values: 10m, 1h, 2h, 1d, 1w, 1m, unlimited).
Ενημερώστε το mailbox που ανήκει στον χρήστη
curl --request POST \
  --url 'https://v1.tempmailg.com/api/emails/current@example.com/demo123/example.com' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_USER_API_KEY'

Παράδειγμα απόκρισης

{
    "status": true,
    "data": {
        "id": 2302,
        "email": "demo123@example.com",
        "domain": "example.com",
        "expire_at": "2026-09-18T10:24:10+00:00",
        "expires_in_seconds": 600,
        "created_at": "2026-09-18T10:14:10+00:00",
        "email_token": "encrypted-email-token"
    }
}
DELETE https://v1.tempmailg.com/api/emails/{email}

Διαγράψτε ένα mailbox που належить σε εσάς.

Διαγράψτε το mailbox που ανήκει στον χρήστη
curl --request DELETE \
  --url 'https://v1.tempmailg.com/api/emails/demo123@example.com' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_USER_API_KEY'

Παράδειγμα απόκρισης

{
    "status": true,
    "message": "Email has been successfully deleted."
}
POST https://v1.tempmailg.com/api/gmail-alias/emails

Create a new Gmail alias temporary mailbox owned by the authenticated user.

Requires the Gmail Alias API permission to be enabled on your subscription plan or unlocked via an API Credit package. Optional parameters: mode (auto, dot, plus, plus_word), username (custom alias username), domain (e.g. gmail.com, googlemail.com), lifetime (allowed values: 10m, 1h, 2h, 1d, 1w, 1m, unlimited).
Create Gmail alias mailbox
curl --request POST \
  --url 'https://v1.tempmailg.com/api/gmail-alias/emails' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_USER_API_KEY'

Παράδειγμα απόκρισης

{
    "status": true,
    "data": {
        "id": 2305,
        "email": "myname.alias123@gmail.com",
        "domain": "gmail.com",
        "provider": "gmail_alias",
        "expire_at": "2026-09-18T11:14:10+00:00",
        "expires_in_seconds": 3600,
        "created_at": "2026-09-18T10:14:10+00:00",
        "email_token": "encrypted-email-token"
    }
}
GET https://v1.tempmailg.com/api/outlook-alias/domains

Fetch active Outlook / Hotmail alias domains available for mailbox generation.

Requires the Outlook Alias API permission to be enabled on your subscription plan or unlocked via an API Credit package. Indicates whether specific domain selection is unlocked on your plan.
Get Outlook alias domains
curl --request GET \
  --url 'https://v1.tempmailg.com/api/outlook-alias/domains' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_USER_API_KEY'

Παράδειγμα απόκρισης

{
    "status": true,
    "data": {
        "domains": [
            {
                "domain": "outlook.com",
                "type": "Outlook/Hotmail",
                "selectable": true,
                "locked": false,
                "disabled_reason": null
            },
            {
                "domain": "hotmail.com",
                "type": "Outlook/Hotmail",
                "selectable": true,
                "locked": false,
                "disabled_reason": null
            }
        ]
    }
}
POST https://v1.tempmailg.com/api/outlook-alias/emails

Create a new Outlook / Hotmail alias temporary mailbox owned by the authenticated user.

Requires the Outlook Alias API permission to be enabled on your subscription plan or unlocked via an API Credit package. Optional parameters: domain (e.g. outlook.com, hotmail.com), username (custom alias username), lifetime (allowed values: 10m, 1h, 2h, 1d, 1w, 1m, unlimited).
Create Outlook alias mailbox
curl --request POST \
  --url 'https://v1.tempmailg.com/api/outlook-alias/emails' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_USER_API_KEY'

Παράδειγμα απόκρισης

{
    "status": true,
    "data": {
        "id": 2306,
        "email": "fastuser_alias45@outlook.com",
        "domain": "outlook.com",
        "provider": "outlook_alias",
        "expire_at": "2026-09-18T11:14:10+00:00",
        "expires_in_seconds": 3600,
        "created_at": "2026-09-18T10:14:10+00:00",
        "email_token": "encrypted-email-token"
    }
}
GET https://v1.tempmailg.com/api/messages?email={email}

Κατάλογος μηνυμάτων για ένα mailbox που ανήκει στον χρήστη.

Ο παράμετρος ερωτήματος email πρέπει να ανήκει στο λογαριασμό του πιστοποιημένου χρήστη.
Διαβάστε τα μηνύματα του mailbox
curl --request GET \
  --url 'https://v1.tempmailg.com/api/messages?email=demo123@example.com' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_USER_API_KEY'

Παράδειγμα απόκρισης

{
    "status": true,
    "mailbox": "randombox@example.com",
    "messages": [
        {
            "is_seen": false,
            "subject": "Welcome to Temp Mail",
            "from": "Example Sender",
            "from_email": "hello@example.org",
            "to": "randombox@example.com",
            "receivedAt": "2026-09-18 10:14:10",
            "id": "ap94AWDg123ELQz07vrVB9dLXlbqZM5NGwYxOJKko8n6m1",
            "html": true,
            "content": "<p>Hello from the inbox.</p>",
            "attachments": [
                {
                    "name": "file.txt",
                    "extension": "txt",
                    "size": 91,
                    "url": "https://v1.tempmailg.com/api/messages/ap94AWDg123ELQz07vrVB9dLXlbqZM5NGwYxOJKko8n6m1/attachments/file.txt"
                }
            ]
        }
    ]
}
GET https://v1.tempmailg.com/api/messages/{messageId}

Διαβάστε ένα μόνο μήνυμα που ανήκει στον χρήστη.

Διαβάστε ένα μήνυμα
curl --request GET \
  --url 'https://v1.tempmailg.com/api/messages/ap94AWDg123ELQz07vrVB9dLXlbqZM5NGwYxOJKko8n6m1' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_USER_API_KEY'

Παράδειγμα απόκρισης

{
    "status": true,
    "data": {
        "is_seen": true,
        "subject": "Welcome to Temp Mail",
        "from": "Example Sender",
        "from_email": "hello@example.org",
        "to": "randombox@example.com",
        "receivedAt": "2026-09-18 10:14:10",
        "id": "ap94AWDg123ELQz07vrVB9dLXlbqZM5NGwYxOJKko8n6m1",
        "html": true,
        "content": "<p>Hello from the inbox.</p>",
        "attachments": [
            {
                "name": "file.txt",
                "extension": "txt",
                "size": 91,
                "url": "https://v1.tempmailg.com/api/messages/ap94AWDg123ELQz07vrVB9dLXlbqZM5NGwYxOJKko8n6m1/attachments/file.txt"
            }
        ]
    }
}
DELETE https://v1.tempmailg.com/api/messages/{messageId}

Διαγράψτε ένα μόνο μήνυμα που ανήκει στον χρήστη.

Διαγράψτε ένα μήνυμα
curl --request DELETE \
  --url 'https://v1.tempmailg.com/api/messages/ap94AWDg123ELQz07vrVB9dLXlbqZM5NGwYxOJKko8n6m1' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_USER_API_KEY'

Παράδειγμα απόκρισης

{
    "status": true,
    "message": "Message was deleted successfully."
}
GET https://v1.tempmailg.com/api/messages/{messageId}/attachments/{filename}

Κατεβάστε μια συνημμένη αρχείο από ένα μήνυμα που ανήκει σε εσάς.

Αυτό το endpoint κατεβάζει το αρχείο απευθείας.
Κατεβάστε μια συνημμένη αρχείο
curl --request GET \
  --url 'https://v1.tempmailg.com/api/messages/ap94AWDg123ELQz07vrVB9dLXlbqZM5NGwYxOJKko8n6m1/attachments/file.txt' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_USER_API_KEY' \
  --output file.txt
Συμπεριφορά λήψης Αυτό το τερματικό επιστρέφει το αιτούμενο αρχείο απευθείας αντί για σώμα JSON.
Αποδέχεστε τα cookies;

Χρησιμοποιούμε cookies για να βελτιώσουμε την εμπειρία πλοήγησής σας. Με τη χρήση αυτού του ιστότοπου, συναινείτε στην πολιτική μας σχετικά με τα cookies.

Περισσότερα
Loading chat...
Connecting to community chat.