وثائق واجهة برمجة تطبيقات TempMailg

TempMailg وثائق واجهة برمجة التطبيقات

استخدم هذه الوثائق لتوليد مفتاح API الشخصي الخاص بك، وربط مضيف واجهة برمجة تطبيقات المستخدم المخصص، وقراءة رسائل صندوق البريد، وإدارة صناديق البريد المملوكة، ودمج Temp Mail في تطبيقاتك أو أتمتاتك الخاصة.

عنوان आधة واجهة برمجة التطبيقات للمستخدم
تنسيق الطلب استخدم مفتاح API الخاص بك فقط في ترويسة Authorization Bearer وحافظ على نظافة عناوين URL لنقاط النهاية.

نقاط نهاية واجهة برمجة تطبيقات المستخدم

تستخدم كل نقطة نهاية أدناه نفس عنوان URL الأساسي ونفس رمز Bearer. يتم التحقق من طلبات صندوق البريد والرسائل والمرفقات مقابل حساب المستخدم المصادق عليه.

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-28T09:47:48+00:00",
        "expires_in_seconds": 600,
        "created_at": "2026-06-28T09:37:48+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-28T09:47:48+00:00",
        "expires_in_seconds": 600,
        "created_at": "2026-06-28T09:37:48+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 09:37:48",
            "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 09:37:48",
        "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
سلوك التنزيل تقوم نقطة النهاية هذه بإرجاع الملف المطلوب مباشرة بدلاً من نص JSON.
هل تقبل ملفات التعريف الارتباطية؟

نحن نستخدم ملفات تعريف الارتباط لتحسين تجربتك في التصفح. باستخدام هذا الموقع، فإنك توافق على سياسة ملفات تعريف الارتباط الخاصة بنا.

أكثر
Loading chat...
Connecting to community chat.