১৪. টেম্পমেইলগ এপিআই ডকুমেন্টেশন

REST API v1 & ওয়েবহুকস

TempMailg ডেভেলপার API ডকস

১৫. এই ডকুমেন্টেশনটি ব্যবহার করুন আপনার ব্যক্তিগত API কী তৈরি করতে, ডেডিকেটেড ব্যবহারকারী API হোস্ট সংযোগ করতে, মেইলবক্স বার্তা পড়তে, মালিকানাধীন মেইলবক্স পরিচালনা করতে এবং টেম্প মেইলকে আপনার নিজস্ব অ্যাপস বা অটোমেশনে একীভূত করতে।

বেয়ারার টোকেন প্রমাণীকরণ রিয়েল-টাইম ওয়েবহুকস জিমেইল & আউটলুক উপনাম JSON প্রতিক্রিয়া
৯. ব্যবহারকারী এপিআই বেস ইউআরএল HTTPS
১৬. অনুরোধের ফরম্যাট ১৭. শুধুমাত্র অথেনটিকেশন বিয়ারার হেডারে আপনার API কী ব্যবহার করুন এবং এন্ডপয়েন্ট ইউআরএল পরিষ্কার রাখুন।

Mailbox Management

Fetch allowed domains, create, update lifetimes, switch, and delete temporary email addresses.

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

List Allowed Domains

List available domains for creating temporary emails. Filter by type to see only free, premium, or custom domains supported by your subscription plan.

প্যারামিটার 1
প্যারামিটার অবস্থান ১৩. ধরন স্থিতি ২২. বিবরণ
type query string ঐচ্ছিক
Domain tier filter. Allowed values: free, basic, pro, premium, custom, ultimate, all
ডিফল্ট: free
১৩. অনুমোদিত ডোমেইন পান
curl --request GET \
  --url 'https://v1.tempmailg.com/api/domains?type=free' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_USER_API_KEY'
১৪. উদাহরণ প্রতিক্রিয়া
200 OK • JSON
{
    "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 Temporary Mailbox

Create a new temporary email address. By default, a random email address is generated. You can customize the email username, domain, or domain type by providing the appropriate parameters in the JSON request body.

প্যারামিটার 4
প্যারামিটার অবস্থান ১৩. ধরন স্থিতি ২২. বিবরণ
username body string ঐচ্ছিক
Custom mailbox username prefix (subject to plan custom username permissions).
ডিফল্ট: Randomly generated
domain body string ঐচ্ছিক
One of the allowed domains returned by GET /domains.
ডিফল্ট: Default allowed domain
lifetime body string ঐচ্ছিক
Mailbox duration: 10m, 1h, 2h, 1d, 1w, 1m, or unlimited (also accepts mailbox_lifetime or email_lifetime).
ডিফল্ট: Plan default lifetime
provider body string ঐচ্ছিক
Mailbox provider: standard, gmail_alias, or outlook_alias.
ডিফল্ট: standard
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). Omit lifetime, or leave it empty, to use the Default Email Lifetime configured for your current monthly/yearly plan. Send a permitted lifetime such as 1h to override that default. Unlimited is used only when configured as the plan default or explicitly requested and permitted. The body parameters mailbox_lifetime and email_lifetime are also accepted; the first non-empty value wins in this order: lifetime, mailbox_lifetime, email_lifetime. Invalid or disallowed values return HTTP 422 instead of silently selecting a default.
Create mailbox
curl --request POST \
  --url 'https://v1.tempmailg.com/api/emails' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_USER_API_KEY'
১৪. উদাহরণ প্রতিক্রিয়া
200 OK • JSON
{
    "status": true,
    "data": {
        "id": 2301,
        "email": "customuser@example.com",
        "domain": "example.com",
        "provider": "standard",
        "expire_at": "2026-10-30T06:08:49+00:00",
        "expires_in_seconds": 86400,
        "created_at": "2026-10-29T06:08:49+00:00",
        "email_token": "encrypted-email-token"
    }
}
POST https://v1.tempmailg.com/api/emails/{email}/{username}/{domain}
#

Update / Switch Mailbox

Update or switch an existing owned mailbox to a new username and allowed domain. This operation applies only to mailboxes owned by the authenticated user.

প্যারামিটার 4
প্যারামিটার অবস্থান ১৩. ধরন স্থিতি ২২. বিবরণ
email path string প্রয়োজনীয়
Current full email address of the owned mailbox to switch.
username path string প্রয়োজনীয়
New desired username prefix.
domain path string প্রয়োজনীয়
New allowed domain name.
lifetime body string ঐচ্ছিক
Optional new mailbox lifetime duration.
ডিফল্ট: Current remaining / plan default
১৮. {email} এ একটি বিদ্যমান মালিকানাধীন মেইলবক্স ইমেল ব্যবহার করুন। Optional body parameter: lifetime (allowed values: 10m, 1h, 2h, 1d, 1w, 1m, unlimited). Omit lifetime, or leave it empty, to use the Default Email Lifetime configured for your current monthly/yearly plan. Send a permitted lifetime such as 1h to override that default. Unlimited is used only when configured as the plan default or explicitly requested and permitted. The body parameters mailbox_lifetime and email_lifetime are also accepted; the first non-empty value wins in this order: lifetime, mailbox_lifetime, email_lifetime. Invalid or disallowed values return HTTP 422 instead of silently selecting a default.
১৯. মালিকানাধীন মেইলবক্স আপডেট করুন
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'
১৪. উদাহরণ প্রতিক্রিয়া
200 OK • JSON
{
    "status": true,
    "data": {
        "id": 2302,
        "email": "demo123@example.com",
        "domain": "example.com",
        "expire_at": "2026-10-29T06:18:49+00:00",
        "expires_in_seconds": 600,
        "created_at": "2026-10-29T06:08:49+00:00",
        "email_token": "encrypted-email-token"
    }
}
DELETE https://v1.tempmailg.com/api/emails/{email}
#

Delete Mailbox

Delete a temporary email address. The email address is immediately marked as expired and soft-deleted, along with all its associated messages.

প্যারামিটার 1
প্যারামিটার অবস্থান ১৩. ধরন স্থিতি ২২. বিবরণ
email path string প্রয়োজনীয়
Full email address of the owned mailbox to delete.
২০. মালিকানাধীন মেইলবক্স মুছে ফেলুন
curl --request DELETE \
  --url 'https://v1.tempmailg.com/api/emails/demo123@example.com' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_USER_API_KEY'
১৪. উদাহরণ প্রতিক্রিয়া
200 OK • JSON
{
    "status": true,
    "message": "Email has been successfully deleted."
}

জিমেইল & আউটলুক উপনাম

Generate high-reputation Gmail and Outlook/Hotmail alias mailboxes.

POST https://v1.tempmailg.com/api/gmail-alias/emails
#

Create Gmail Alias

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

প্যারামিটার 4
প্যারামিটার অবস্থান ১৩. ধরন স্থিতি ২২. বিবরণ
mode body string ঐচ্ছিক
Generation mode: auto, dot, plus, or plus_word.
ডিফল্ট: auto
username body string ঐচ্ছিক
Custom alias username prefix.
ডিফল্ট: Auto-generated
domain body string ঐচ্ছিক
Allowed domain: gmail.com or googlemail.com.
ডিফল্ট: gmail.com
lifetime body string ঐচ্ছিক
Duration: 10m, 1h, 2h, 1d, 1w, 1m, or unlimited.
ডিফল্ট: Plan default lifetime
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). Omit lifetime, or leave it empty, to use the Default Email Lifetime configured for your current monthly/yearly plan. Send a permitted lifetime such as 1h to override that default. Unlimited is used only when configured as the plan default or explicitly requested and permitted. The body parameters mailbox_lifetime and email_lifetime are also accepted; the first non-empty value wins in this order: lifetime, mailbox_lifetime, email_lifetime. Invalid or disallowed values return HTTP 422 instead of silently selecting a default.
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'
১৪. উদাহরণ প্রতিক্রিয়া
200 OK • JSON
{
    "status": true,
    "data": {
        "id": 2305,
        "email": "myname.alias123@gmail.com",
        "domain": "gmail.com",
        "provider": "gmail_alias",
        "expire_at": "2026-10-29T07:08:50+00:00",
        "expires_in_seconds": 3600,
        "created_at": "2026-10-29T06:08:50+00:00",
        "email_token": "encrypted-email-token"
    }
}
GET https://v1.tempmailg.com/api/outlook-alias/domains
#

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'
১৪. উদাহরণ প্রতিক্রিয়া
200 OK • JSON
{
    "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 Outlook Alias

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

প্যারামিটার 3
প্যারামিটার অবস্থান ১৩. ধরন স্থিতি ২২. বিবরণ
domain body string ঐচ্ছিক
Target Outlook domain, e.g. outlook.com or hotmail.com.
ডিফল্ট: First available
username body string ঐচ্ছিক
Custom alias prefix if allowed by subscription.
ডিফল্ট: Auto-generated
lifetime body string ঐচ্ছিক
Duration: 10m, 1h, 2h, 1d, 1w, 1m, or unlimited.
ডিফল্ট: Plan default lifetime
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). Omit lifetime, or leave it empty, to use the Default Email Lifetime configured for your current monthly/yearly plan. Send a permitted lifetime such as 1h to override that default. Unlimited is used only when configured as the plan default or explicitly requested and permitted. The body parameters mailbox_lifetime and email_lifetime are also accepted; the first non-empty value wins in this order: lifetime, mailbox_lifetime, email_lifetime. Invalid or disallowed values return HTTP 422 instead of silently selecting a default.
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'
১৪. উদাহরণ প্রতিক্রিয়া
200 OK • JSON
{
    "status": true,
    "data": {
        "id": 2306,
        "email": "fastuser_alias45@outlook.com",
        "domain": "outlook.com",
        "provider": "outlook_alias",
        "expire_at": "2026-10-29T07:08:51+00:00",
        "expires_in_seconds": 3600,
        "created_at": "2026-10-29T06:08:51+00:00",
        "email_token": "encrypted-email-token"
    }
}

Messages & Attachments

Fetch incoming inboxes, read full HTML/text messages, and stream attachments.

GET https://v1.tempmailg.com/api/messages?email={email}
#

List Mailbox Messages

Retrieve all messages from a temporary email inbox. Returns message details, including message ID, sender, subject, received date, read status, and email preview.

প্যারামিটার 1
প্যারামিটার অবস্থান ১৩. ধরন স্থিতি ২২. বিবরণ
email query string প্রয়োজনীয়
Full email address of the owned mailbox to read messages from.
২১. ইমেইল অনুসন্ধান পরামিতি অবশ্যই সত্যায়িত ব্যবহারকারীর অ্যাকাউন্টের অন্তর্গত হতে হবে।
২২. মেইলবক্স বার্তা পড়ুন
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'
১৪. উদাহরণ প্রতিক্রিয়া
200 OK • JSON
{
    "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-10-29 06:08:51",
            "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}
#

Get Single Message

Retrieve a specific email message by its ID (`hash_id`). Returns the full message content, including the HTML body and attachments.

প্যারামিটার 1
প্যারামিটার অবস্থান ১৩. ধরন স্থিতি ২২. বিবরণ
messageId path string প্রয়োজনীয়
Unique message ID returned in the message list.
২৪. একটি বার্তা পড়ুন
curl --request GET \
  --url 'https://v1.tempmailg.com/api/messages/ap94AWDg123ELQz07vrVB9dLXlbqZM5NGwYxOJKko8n6m1' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_USER_API_KEY'
১৪. উদাহরণ প্রতিক্রিয়া
200 OK • JSON
{
    "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-10-29 06:08:51",
        "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}
#

বার্তা মুছুন

২৫. একটি একক মালিকানাধীন বার্তা মুছে ফেলুন।

প্যারামিটার 1
প্যারামিটার অবস্থান ১৩. ধরন স্থিতি ২২. বিবরণ
messageId path string প্রয়োজনীয়
Unique message ID string to permanently delete.
১. একটি বার্তা মুছে ফেলুন
curl --request DELETE \
  --url 'https://v1.tempmailg.com/api/messages/ap94AWDg123ELQz07vrVB9dLXlbqZM5NGwYxOJKko8n6m1' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_USER_API_KEY'
১৪. উদাহরণ প্রতিক্রিয়া
200 OK • JSON
{
    "status": true,
    "message": "Message was deleted successfully."
}
GET https://v1.tempmailg.com/api/messages/{messageId}/attachments/{filename}
#

Download Attachment

২. একটি মালিকানাধীন বার্তা থেকে একটি অ্যাটাচমেন্ট ডাউনলোড করুন।

প্যারামিটার 2
প্যারামিটার অবস্থান ১৩. ধরন স্থিতি ২২. বিবরণ
messageId path string প্রয়োজনীয়
ID of the message containing the file.
filename path string প্রয়োজনীয়
Filename and extension of the attachment to download.
This endpoint downloads the file directly. Downloads are subject to the maximum attachment size (MB) limit configured for your plan; oversized files return HTTP 403.
৪. একটি অ্যাটাচমেন্ট ডাউনলোড করুন
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 বডির পরিবর্তে অনুরোধ করা ফাইলটি সরাসরি প্রদান করে।

Rate Limits & Quotas

Monitor real-time request budgets, rate limits, and account quotas without consuming credits.

GET https://v1.tempmailg.com/api/rate-limit
#

Rate Limit & Quota

Check your current rate limit and quota status without consuming any API usage. This endpoint is quota-free and does not deduct monthly API credits (abuse protection limit: 60 requests/min).

X-RateLimit-* describes the indicated request budget; X-Quota-* describes monthly and purchased capacity when available. X-Mailbox-RateLimit-* reports the separate mailbox creation/update budget. A mailbox-only rejection uses mailbox scope and its own retry window. Minute-limit rejections may omit quota information. Retry-After is included only for a timed retry; disabled access may require an account change. In this successful status response, data.limit, data.remaining and data.reset describe the account minute budget, not spendable credits. The data.quota object describes monthly allowance, credit balances and usage. The existing data.monthly_limit, data.monthly_remaining and data.purchased_credits fields remain aliases of the corresponding quota fields. A successful status check does not authorize another API operation. Operations still require enabled access, available quota and admission through all applicable limits. The quota snapshot does not promise capacity already reserved by an in-progress request.
Check rate limit status
curl --request GET \
  --url 'https://v1.tempmailg.com/api/rate-limit' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_USER_API_KEY'
১৪. উদাহরণ প্রতিক্রিয়া
200 OK • JSON
{
    "status": "success",
    "data": {
        "limit": 60,
        "remaining": 45,
        "reset": 32,
        "plan": "premium",
        "monthly_limit": 50000,
        "monthly_remaining": 48210,
        "purchased_credits": 5000,
        "quota": {
            "enabled": true,
            "user_api_status": true,
            "plan_name": "Premium Plan",
            "period": "2026-10",
            "base_limit": 50000,
            "extra_requests": 0,
            "monthly_limit": 50000,
            "monthly_remaining": 48210,
            "used": 1790,
            "purchased_credits": 5000,
            "bonus_credits": 1000,
            "direct_purchased_credits": 4000,
            "remaining": 53210,
            "unlimited": false,
            "usage_percent": 3,
            "reset_at": "2026-11-01T00:00:00+00:00"
        }
    }
}
প্রতিক্রিয়া ক্ষেত্রসমূহ
ক্ষেত্র ১৩. ধরন ২২. বিবরণ
data.limit integer|string
Account requests-per-minute limit. The string unlimited denotes an unlimited minute budget; this is independent of monthly quota.
data.remaining integer|string
Remaining account minute-budget slots, or the string unlimited. A positive value does not mean that API credits remain.
data.reset integer
Seconds for the account minute window, not the monthly quota reset. Disabled or unlimited minute budgets can retain a nominal 60-second value; this does not promise access after waiting.
data.plan string
Current plan tag. The readable plan name is provided separately in data.quota.plan_name.
data.quota.enabled boolean
Whether global and plan/credit API access is enabled. This does not indicate remaining capacity or replace the user API switch.
data.quota.user_api_status boolean
Whether the user has enabled their User API switch. Operations require this switch as well as enabled access and available capacity.
data.quota.plan_name string
Readable name of the current plan.
data.quota.period string
Calendar-month usage period in YYYY-MM format, using the application timezone; not necessarily the subscription billing period.
data.quota.base_limit integer
Base monthly plan allowance. A value of -1 means unlimited.
data.quota.extra_requests integer
Additional monthly allowance granted for the current usage period; separate from purchased credits.
data.quota.monthly_limit integer
Base allowance plus current-period extra requests. A value of -1 means unlimited. Purchased credits are not included.
data.quota.monthly_remaining integer|null
Remaining finite monthly allowance, or null when monthly quota is unlimited. Null must not be interpreted as zero.
data.quota.used integer
Successful, counted API operations in the current usage period, including operations using credits. Status checks do not increase this value.
data.quota.purchased_credits integer
Current credit balance, including active plan bonus credits. Bonus credits must not be added to this balance a second time.
data.quota.bonus_credits integer
Active plan-bonus portion of the credit balance; a breakdown of purchased_credits, not additional capacity.
data.quota.direct_purchased_credits integer
Credit balance excluding the active plan-bonus portion. This value plus bonus_credits equals purchased_credits.
data.quota.remaining integer|null
Monthly remaining allowance plus the current credit balance, without double-counting bonuses. Null means unlimited monthly quota. Individual feature permissions and other request limits still apply.
data.quota.unlimited boolean
Whether monthly quota is unlimited. This does not make the account minute budget or other feature limits unlimited.
data.quota.usage_percent integer
Dashboard-compatible rounded percentage from 0 to 100: used divided by used plus remaining, multiplied by 100. It includes available credit capacity, so recharging can lower the percentage. It is 0 for unlimited quota or a zero-sized pool; it is not the minute rate-limit percentage or an access decision.
data.quota.reset_at string
ISO-8601 timestamp with timezone offset for the next calendar-month quota reset. This is not the subscription expiry date, and the monthly reset does not refill purchased credits.

মেইলবক্স পিন সুরক্ষা

চালিয়ে যেতে PIN প্রবেশ করুন। আপনার মেলবক্স এই ওয়েবসাইট সেশনে বর্তমান থাকাকালীন আনলক থাকে।

আপনি কি কুকি গ্রহণ করেন?

আমরা আপনার ব্রাউজিং অভিজ্ঞতা উন্নত করতে কুকিজ ব্যবহার করি। এই সাইটটি ব্যবহার করে, আপনি আমাদের কুকি নীতিতে সম্মতি দেন।

বেশি
Loading chat...
Connecting to community chat.