TempMailg एपीआई प्रलेखन

TempMailg एपीआई दस्तावेज़ीकरण

अपनी व्यक्तिगत एपीआई कुंजी उत्पन्न करने, समर्पित उपयोगकर्ता एपीआई होस्ट से कनेक्ट करने, मेलबॉक्स संदेश पढ़ने, स्वामित्व वाले मेलबॉक्स प्रबंधित करने और अपने स्वयं के ऐप्स या स्वचालन में Temp Mail एकीकृत करने के लिए इस प्रलेखन का उपयोग करें।

उपयोगकर्ता एपीआई बेस यूआरएल
अनुरोध प्रारूप केवल अधिकृत बियरर हेडर में अपनी एपीआई कुंजी का उपयोग करें और एंडपॉइंट यूआरएल को साफ रखें।

उपयोगकर्ता एपीआई एंडपॉइंट

नीचे दिए गए हर एंडपॉइंट में समान बेस यूआरएल और समान बियरर टोकन का उपयोग किया जाता है। मेलबॉक्स, संदेश और अनुलग्नक अनुरोध प्रमाणित उपयोगकर्ता खाते के खिलाफ जाँचे जाते हैं।

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

वर्तमान उपयोगकर्ता योजना और खाते के लिए अनुमत डोमेन प्राप्त करें।

अनुमत प्रकार मान: free, premium, all. मुफ्त योजना का उपयोग केवल free. प्रीमियम योजना का उपयोग कर सकते हैं free, premium, या 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",
        "allowed_types": [
            "free"
        ],
        "domains": [
            {
                "domain": "example.com",
                "type": "Free",
                "custom": false
            }
        ]
    }
}
POST https://v1.tempmailg.com/api/emails

प्रमाणित उपयोगकर्ता द्वारा स्वामित्व वाला एक नया यादृच्छिक मेलबॉक्स बनाएं।

यादृच्छिक मेलबॉक्स बनाएं
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": "randombox@example.com",
        "domain": "example.com",
        "expire_at": "2026-06-28T11:11:07+00:00",
        "expires_in_seconds": 600,
        "created_at": "2026-06-28T11:01:07+00:00",
        "email_token": "encrypted-email-token"
    }
}
POST https://v1.tempmailg.com/api/emails/{email}/{username}/{domain}

एक मौजूदा स्वामित्व वाले मेलबॉक्स को एक नए उपयोगकर्ता नाम और अनुमत डोमेन में अद्यतन या स्विच करें।

{email} में एक मौजूदा स्वामित्व वाले मेलबॉक्स ईमेल का उपयोग करें।
स्वामित्व वाले मेलबॉक्स को अद्यतन करें
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-06-28T11:11:07+00:00",
        "expires_in_seconds": 600,
        "created_at": "2026-06-28T11:01:07+00:00",
        "email_token": "encrypted-email-token"
    }
}
DELETE https://v1.tempmailg.com/api/emails/{email}

२५. एक स्वामित्व वाला मेलबॉक्स हटाएं।

स्वामित्व वाले मेलबॉक्स को हटाएं
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."
}
GET https://v1.tempmailg.com/api/messages?email={email}

स्वामित्व वाले मेलबॉक्स के लिए संदेश सूची।

ईमेल प्रश्न प्रतिबंध प्रमाणित उपयोगकर्ता खाते से संबंधित होना चाहिए।
मेलबॉक्स संदेश पढ़ें
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-06-28 11:01:07",
            "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-06-28 11:01:07",
        "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}

स्वामित्व वाले संदेश से एक संलग्नक डाउनलोड करें।

यह एंडपॉइंट सीधे फ़ाइल डाउनलोड करता है।
एक संलग्नक डाउनलोड करें
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
डाउनलोड व्यवहार यह एंडपॉइंट अनुरोधित फ़ाइल को सीधे लौटाता है, जेसन बॉडी के बजाय।
क्या आप कुकीज़ स्वीकार करते हैं?

हम आपकी ब्राउज़िंग अनुभव को बेहतर बनाने के लिए कुकीज़ का उपयोग करते हैं। इस साइट का उपयोग करके, आप हमारी कुकी नीति के लिए सहमति देते हैं।

अधिक
Loading chat...
Connecting to community chat.