Dokumentacioni i API-ve të TempMail

TempMailg Dokumentacioni i API

Përdorni këtë dokumentacion për të gjeneruar çelësin tuaj personal API, lidhjen me hostin e API-ve të përdoruesit, lexoni mesazhet e kutisë postare, menaxhoni kutitë postare të pronësuara dhe integroni Temp Mail në aplikacionet ose automatizimet tuaja.

URL Baza e API të Përdoruesit
Format i kërkesës Përdorni çelësin tuaj API vetëm në header-in e Autorizimit Bearer dhe mbani URL-të pastër të pikënisjes.

Pikët e fundit e API të përdoruesit

Çdo pikë e fundit më poshtë përdor të njëjtin URL bazë dhe të njëjtin token Bearer. Kërkesat e kutisë së postës, mesazhit dhe shtojcës kontrollohen kundër llogarisë së autentikuar të përdoruesit.

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

Merr domenet e lejuara për planin dhe llogarinë e përdoruesit aktual.

Vlera e lejuar e tipave: free, premium, all. Plan i lirë mund të përdorë vetëm free. Plan premium mund të përdorë free, premium, ose all.
Merr domene të lejuara
curl --request GET \
  --url 'https://v1.tempmailg.com/api/domains?type=free' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_USER_API_KEY'

Përgjigje e shembullit

{
    "status": true,
    "data": {
        "requested_type": "free",
        "allowed_types": [
            "free"
        ],
        "domains": [
            {
                "domain": "example.com",
                "type": "Free",
                "custom": false
            }
        ]
    }
}
POST https://v1.tempmailg.com/api/emails

Krijo një kuti postare të re të rastësishme të pronësuar nga përdoruesi i autentikuar.

Krijo kuti postare të rastësishme
curl --request POST \
  --url 'https://v1.tempmailg.com/api/emails' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_USER_API_KEY'

Përgjigje e shembullit

{
    "status": true,
    "data": {
        "id": 2301,
        "email": "randombox@example.com",
        "domain": "example.com",
        "expire_at": "2026-06-28T09:49:09+00:00",
        "expires_in_seconds": 600,
        "created_at": "2026-06-28T09:39:09+00:00",
        "email_token": "encrypted-email-token"
    }
}
POST https://v1.tempmailg.com/api/emails/{email}/{username}/{domain}

Përditëso ose kthe një kuti postare ekzistuese të pronësuar në një emër përdoruesi të ri dhe një domenë e lejuar.

Përdor një kuti postare ekzistuese të pronësuar në {email}.
Përditëso kuti postare të pronësuar
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'

Përgjigje e shembullit

{
    "status": true,
    "data": {
        "id": 2302,
        "email": "demo123@example.com",
        "domain": "example.com",
        "expire_at": "2026-06-28T09:49:09+00:00",
        "expires_in_seconds": 600,
        "created_at": "2026-06-28T09:39:09+00:00",
        "email_token": "encrypted-email-token"
    }
}
DELETE https://v1.tempmailg.com/api/emails/{email}

Fshijeni një kuti postare të pronësuar.

Fshij kuti postare të pronësuar
curl --request DELETE \
  --url 'https://v1.tempmailg.com/api/emails/demo123@example.com' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_USER_API_KEY'

Përgjigje e shembullit

{
    "status": true,
    "message": "Email has been successfully deleted."
}
GET https://v1.tempmailg.com/api/messages?email={email}

Lista mesazheve për një kuti postare të pronësuar.

Parametri i pyetjes së email duhet të përkasë llogarisë së përdoruesit të autentikuar.
Lexo mesazhet e kutisë postare
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'

Përgjigje e shembullit

{
    "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-06-28 09:39:09",
            "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}

Lexo një mesazh të vetëm të pronësuar.

Lexo një mesazh
curl --request GET \
  --url 'https://v1.tempmailg.com/api/messages/ap94AWDg123ELQz07vrVB9dLXlbqZM5NGwYxOJKko8n6m1' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_USER_API_KEY'

Përgjigje e shembullit

{
    "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-06-28 09:39:09",
        "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}

Fshij një mesazh të vetëm të pronësuar.

Fshij një mesazh
curl --request DELETE \
  --url 'https://v1.tempmailg.com/api/messages/ap94AWDg123ELQz07vrVB9dLXlbqZM5NGwYxOJKko8n6m1' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_USER_API_KEY'

Përgjigje e shembullit

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

Shkarko një shtojcë nga një mesazh i pronësuar.

Ky endpoint shkarkon direkt skedarin.
Shkarko një shtojcë
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
Sjellja e shkarkimit Ky pikë e fundit kthen skedarin e kërkuar direkt në vend të një trupi JSON.
A pranon cookies?

Ne përdorim cookie për të përmirësuar përvojën tuaj të shfletimit. Duke përdorur këtë vend, ju jeni dakord me politikën tonë të cookie-ve.

Më shumë
Loading chat...
Connecting to community chat.