### Create Email - cURL Source: https://boomlify.com/en/temp-mail-api-docs This example shows how to create an email using cURL. Replace 'YOUR_API_KEY' with your actual API key for authentication. ```bash curl -X POST "https://v1.boomlify.com/api/v1/emails/create" ``` -------------------------------- ### Create Temporary Email via API Source: https://boomlify.com/en/temp-mail-api-docs Examples for creating a new temporary email address using different HTTP client libraries and command-line tools. ```javascript const response = await fetch("https://v1.boomlify.com/api/v1/emails/create", { method: "POST", headers: { "X-API-Key": "YOUR_API_KEY", "Content-Type": "application/json" } }); const data = await response.json(); ``` ```python import requests response = requests.post("https://v1.boomlify.com/api/v1/emails/create", headers={ "X-API-Key": "YOUR_API_KEY", "Content-Type": "application/json" } ) data = response.json() ``` ```php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://v1.boomlify.com/api/v1/emails/create"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "X-API-Key: YOUR_API_KEY", "Content-Type: application/json" ]); $response = curl_exec($ch); $data = json_decode($response, true); curl_close($ch); ``` ```bash curl -X POST "https://v1.boomlify.com/api/v1/emails/create" ``` -------------------------------- ### GET /api/v1/emails/{id}/messages Source: https://boomlify.com/en/temp-mail-api-docs Fetches messages for a specific dashboard email. Requires a valid UUID and credit consumption. ```APIDOC ## GET /api/v1/emails/{id}/messages ### Description Fetches messages for a specific dashboard email. This operation requires a paid plan and consumes 1 credit. ### Method GET ### Endpoint /api/v1/emails/{id}/messages ### Parameters #### Path Parameters - **id** (string) - Required - The UUID of the email you want to fetch messages for. #### Query Parameters - **include_dashboard** (boolean) - Required - Must be "true" to access dashboard email messages. Costs 1 credit. - **limit** (integer) - Optional - Maximum number of messages to return (1-100). - **offset** (integer) - Optional - Number of messages to skip for pagination. ### Error Handling - 403: TIER_RESTRICTED - Premium feature, requires a paid plan. - 402: INSUFFICIENT_CREDITS - Need 1 credit to perform this operation. - 404: EMAIL_NOT_FOUND - The requested email was not found or has expired. ``` -------------------------------- ### GET /api/v1/emails/{id}/telegram-status Source: https://boomlify.com/en/temp-mail-api-docs Inspects the Telegram forwarding status for a specific mailbox. ```APIDOC ## GET /api/v1/emails/{id}/telegram-status ### Description Inspects the Telegram forwarding status for a dashboard or permanent API mailbox. This operation requires a paid plan and consumes 2 credits. ### Method GET ### Endpoint /api/v1/emails/{id}/telegram-status ### Parameters #### Path Parameters - **id** (string) - Required - The mailbox ID to inspect. #### Query Parameters - **include_dashboard** (boolean) - Required - Must be "true" to access Telegram forwarding status. Costs 2 credits. ### Error Handling - 403: TIER_RESTRICTED - Premium feature, requires Basic plan or higher. - 402: INSUFFICIENT_CREDITS - Need 2 credits to perform this operation. - 404: EMAIL_NOT_FOUND - The requested mailbox was not found or is unsupported. ``` -------------------------------- ### GET /api/v1/emails/{id} Source: https://boomlify.com/en/temp-mail-api-docs Retrieves a specific email by its ID. This endpoint allows you to fetch the details and messages associated with a particular email address. ```APIDOC ## GET /api/v1/emails/{id} ### Description Retrieves a specific email by its ID. This endpoint allows you to fetch the details and messages associated with a particular email address. ### Method GET ### Endpoint https://v1.boomlify.com/api/v1/emails/{id} ### Parameters #### Path Parameters - **id** (string) - Required - Email ID (UUID format). Can be a time-based API email ID or dashboard email ID created with create_as_dashboard=true. Example: `550e8400-e29b-41d4-a716-446655440000`. Must be a valid UUID. #### Query Parameters - **limit** (integer) - Optional - Number of messages to return. Example: `50`. Maximum 100 messages. - **offset** (integer) - Optional - Number of messages to skip. Example: `0`. Must be a non-negative integer. ### Response #### Success Response (200) - **id** (string) - The unique identifier for the email. - **email** (string) - The email address. - **messages** (array) - An array of message objects associated with the email. - **id** (string) - Unique ID of the message. - **from** (string) - Sender's email address. - **subject** (string) - Subject of the email. - **body** (string) - Body of the email (HTML format). - **received_at** (string) - Timestamp when the email was received. #### Response Example ```json { "id": "550e8400-e29b-41d4-a716-446655440000", "email": "random_string@boomlify.com", "messages": [ { "id": "msg_12345", "from": "sender@example.com", "subject": "Test Email", "body": "

Hello!

", "received_at": "2023-10-27T10:05:00Z" } ] } ``` ### Error Handling - **404 EMAIL_NOT_FOUND**: The requested email was not found or has expired. Email does not exist or has already been deleted. - **400 INVALID_LIMIT**: Limit must be between 1 and 100. Limit parameter is out of valid range. ``` -------------------------------- ### Create Email - Python Requests Source: https://boomlify.com/en/temp-mail-api-docs This Python snippet demonstrates how to create an email using the requests library. Remember to substitute 'YOUR_API_KEY' with your valid API key. ```python import requests response = requests.post("https://v1.boomlify.com/api/v1/emails/create", headers={ "X-API-Key": "YOUR_API_KEY", "Content-Type": "application/json" } ) data = response.json() ``` -------------------------------- ### POST /api/v1/emails/create Source: https://boomlify.com/en/temp-mail-api-docs Creates a new email entry. This endpoint is used to initiate the process of generating a temporary email address. ```APIDOC ## POST /api/v1/emails/create ### Description Creates a new email entry. This endpoint is used to initiate the process of generating a temporary email address. ### Method POST ### Endpoint https://v1.boomlify.com/api/v1/emails/create ### Request Body - **create_as_dashboard** (boolean) - Optional - If true, the email will be created as a dashboard email, allowing for easier management and retrieval via the dashboard interface. ### Request Example ```json { "create_as_dashboard": true } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier for the created email. This ID is a UUID and can be used in other API calls to reference this specific email. - **email** (string) - The generated temporary email address. - **created_at** (string) - Timestamp indicating when the email was created. #### Response Example ```json { "id": "550e8400-e29b-41d4-a716-446655440000", "email": "random_string@boomlify.com", "created_at": "2023-10-27T10:00:00Z" } ``` ### Error Handling - **404 EMAIL_NOT_FOUND**: The requested email was not found or has expired. Email ID is invalid or email has expired. - **400 INVALID_LIMIT**: Limit must be between 1 and 100. Limit parameter is out of valid range. ``` -------------------------------- ### Create Email - JavaScript Fetch API Source: https://boomlify.com/en/temp-mail-api-docs Use this snippet to create a new email using the Fetch API in JavaScript. Ensure you replace 'YOUR_API_KEY' with your actual API key. ```javascript const response = await fetch("https://v1.boomlify.com/api/v1/emails/create", { method: "POST", headers: { "X-API-Key": "YOUR_API_KEY", "Content-Type": "application/json" } }); const data = await response.json(); ``` -------------------------------- ### POST /api/v1/emails/create Source: https://boomlify.com/en/temp-mail-api-docs Creates a new temporary email address. Supports optional custom usernames, custom domains, and premium dashboard-style email creation. ```APIDOC ## POST /api/v1/emails/create ### Description Create a new temporary email address. Now supports optional custom_username parameter to create emails with personalized addresses. ### Method POST ### Endpoint https://v1.boomlify.com/api/v1/emails/create ### Parameters #### Query Parameters - **custom_username** (string) - Optional - Custom username for the email address. Must be 3-30 characters. - **time** (string) - Optional - Expiration time. Must be one of: 10min, 1hour, 1day, permanent. - **domain** (string) - Optional - Custom domain for the email address. Must be a verified domain. - **create_as_dashboard** (string) - Optional - Premium feature. Set to "true" to create a dashboard-style email with fixed 2-month expiry. ### Response #### Success Response (200) - **email** (string) - The created email address. #### Error Examples - **400** - INVALID_USERNAME: Custom username validation failed. - **409** - EMAIL_IN_USE: The custom username is already taken. - **400** - DOMAIN_NOT_FOUND: The specified domain does not exist or is not verified. - **429** - DAILY_LIMIT_EXCEEDED: Daily limit exceeded for email type. ``` -------------------------------- ### POST /api/v1/emails/create (with ID) Source: https://boomlify.com/en/temp-mail-api-docs Retrieves a specific dashboard email by its ID. This is a premium feature that requires credits and a paid plan. It can also handle cases where the email is not found or has expired. ```APIDOC ## POST /api/v1/emails/create/{id} ### Description Retrieves a specific dashboard email by its ID. This is a premium feature that requires credits and a paid plan. It can also handle cases where the email is not found or has expired. ### Method POST ### Endpoint https://v1.boomlify.com/api/v1/emails/create/{id} ### Path Parameters - **id** (string) - Required - Dashboard email ID (UUID format) - Copy this from your dashboard or from the list-dashboard-emails endpoint. Example: `550e8400-e29b-41d4-a716-446655440000`. Warning: Must be a valid UUID from your dashboard emails. ### Query Parameters - **include_dashboard** (boolean) - Required - Must be "true" to search dashboard emails. Charges 1 credit. Example: `true`. ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example ```json { "example": "response body" } ``` ### Error Handling #### 403 **TIER_RESTRICTED** - Premium feature. Dashboard email access requires a paid plan. #### 402 **INSUFFICIENT_CREDITS** - Need 1 credit to access dashboard email. This operation costs 1 credit. #### 404 **EMAIL_NOT_FOUND** - Email not found. The requested email was not found or has expired. ``` -------------------------------- ### POST /api/v1/emails/create Source: https://boomlify.com/en/temp-mail-api-docs Creates a new email entry. This endpoint can be used to generate new email addresses. It supports query parameters to include dashboard emails or expired emails, with associated costs for premium features. ```APIDOC ## POST /api/v1/emails/create ### Description Creates a new email entry. This endpoint can be used to generate new email addresses. It supports query parameters to include dashboard emails or expired emails, with associated costs for premium features. ### Method POST ### Endpoint https://v1.boomlify.com/api/v1/emails/create ### Query Parameters - **include_dashboard** (boolean) - Optional - Must be set to "true" to access dashboard emails. This enables the premium feature and charges 2 credits. Warning: Must be "true" - Free tier users will receive a 403 error. - **include_expired** (boolean) - Optional - Include expired emails in the response (both API and dashboard emails). Example: `false`. - **limit** (integer) - Optional - Maximum number of emails to return (max: 100). Warning: Must be between 1 and 100. ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example ```json { "example": "response body" } ``` ### Error Handling #### 403 **TIER_RESTRICTED** - Dashboard email access requires a paid plan (Basic or higher). This is a premium feature. Free tier users cannot access dashboard emails via API. #### 402 **INSUFFICIENT_CREDITS** - Need 2 credits to list dashboard emails. This operation costs 2 credits. Please add more credits to your account. ``` -------------------------------- ### Create Email Request (PHP) Source: https://boomlify.com/en/temp-mail-api-docs This PHP code uses cURL to make a POST request to the Boomlify API for creating an email address. Replace 'YOUR_API_KEY' with your actual API key. ```php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://v1.boomlify.com/api/v1/emails/create"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "X-API-Key: YOUR_API_KEY", "Content-Type": "application/json" ]); $response = curl_exec($ch); $data = json_decode($response, true); curl_close($ch); ``` -------------------------------- ### POST /api/v1/emails/create Source: https://boomlify.com/en/temp-mail-api-docs Creates a new temporary email address. You can specify a custom username, domain, or opt for a dashboard-style email with a fixed expiry. ```APIDOC ## POST /api/v1/emails/create ### Description Creates a new temporary email address. Supports custom usernames, domains, and dashboard-style emails with fixed expiry. ### Method POST ### Endpoint /api/v1/emails/create ### Parameters #### Query Parameters - **create_as_dashboard** (boolean) - Optional - Set to "true" to create a dashboard-style email stored in database with a fixed 2-month expiry. If omitted, creates a time-based API email in memory. Both support custom_username. Dashboard emails cost 15 credits and are not available for free tier users. - **custom_username** (string) - Optional - Custom username for the email address. Can contain letters, numbers, dots, hyphens, and underscores. Must be 3-30 characters. If omitted, a random username is generated. Cannot start/end with special characters. If already taken, returns 409 Conflict. - **domain** (string) - Optional - Custom domain name for the email address. If not specified, a random public domain will be used. Must be a verified domain in your account. ### Request Example ```json { "create_as_dashboard": true, "custom_username": "john.doe", "domain": "mail.yourdomain.com" } ``` ### Response #### Success Response (200) - **email** (string) - The created email address. - **username** (string) - The username part of the email. - **domain** (string) - The domain part of the email. - **expiry** (string) - The expiry time of the email. #### Response Example ```json { "email": "john.doe@mail.yourdomain.com", "username": "john.doe", "domain": "mail.yourdomain.com", "expiry": "2024-08-15T10:00:00Z" } ``` ### Error Handling - **403 TIER_RESTRICTED**: Dashboard email creation requires a paid plan. - **402 INSUFFICIENT_CREDITS**: Need 15 credits to create dashboard email. - **400 INVALID_USERNAME**: Username must be at least 3 characters and contain valid characters. - **409 EMAIL_IN_USE**: The custom username is already taken. - **400 INVALID_TIME_PARAMETER**: Invalid time parameter. Time must be one of: 10min, 1hour, 1day, permanent. - **401 UNAUTHORIZED**: Invalid or missing API key. ``` -------------------------------- ### POST /api/v1/emails/create Source: https://boomlify.com/en/temp-mail-api-docs Creates a new temporary email address. This endpoint can also be used to enable Telegram forwarding for existing email IDs. ```APIDOC ## POST /api/v1/emails/create ### Description Creates a new temporary email address. This endpoint can also be used to enable Telegram forwarding for existing email IDs. ### Method POST ### Endpoint https://v1.boomlify.com/api/v1/emails/create ### Parameters #### Query Parameters - **include_dashboard** (string) - Required - Must be set to "true" to bulk enable Telegram mailbox forwarding. Charges 2 credits. Example: `true`. ⚠️ Must be "true" - Free tier users will receive a 403 error. #### Request Body - **email_ids** (array) - Required - Body field containing a non-empty array of owned mailbox IDs. In the test form, you can enter a single mailbox ID or a JSON array. Example: `["550e8400-e29b-41d4-a716-446655440000"]`. ⚠️ Must resolve to a non-empty array of owned dashboard mailbox IDs or permanent API mailbox IDs. The bulk limit is 150 IDs per request. ### Request Example ```json { "email_ids": ["550e8400-e29b-41d4-a716-446655440000"] } ``` ### Response #### Success Response (200) - **id** (string) - The ID of the created email address. - **email** (string) - The created email address. #### Response Example ```json { "id": "550e8400-e29b-41d4-a716-446655440000", "email": "random_string@example.com" } ``` ### Error Handling - **403 TIER_RESTRICTED**: Dashboard email access requires a paid plan (Basic or higher). This is a premium feature. Free tier users cannot update dashboard email forwarding via API. - **402 INSUFFICIENT_CREDITS**: Need 2 credits to update dashboard email Telegram forwarding. This operation costs 2 credits. Please add more credits to your account. - **400 NO_TELEGRAM_BINDING**: No active Telegram binding found. Please bind your Telegram account first. Forwarding cannot be enabled until the account has an active verified Telegram binding. - **403 FORWARDING_LIMIT_EXCEEDED**: Forwarding limit exceeded. The user has reached the plan limit for active Telegram forwardings. - **404 EMAIL_NOT_FOUND**: Email not found. The requested mailbox was not found, is unsupported, or has expired. ``` -------------------------------- ### Create Email - PHP cURL Source: https://boomlify.com/en/temp-mail-api-docs This PHP snippet utilizes cURL to create an email. Ensure you replace 'YOUR_API_KEY' with your valid API key and handle the JSON response appropriately. ```php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://v1.boomlify.com/api/v1/emails/create"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "X-API-Key: YOUR_API_KEY", "Content-Type: application/json" ]); $response = curl_exec($ch); $data = json_decode($response, true); curl_close($ch); ``` -------------------------------- ### POST /api/v1/emails/create Source: https://boomlify.com/en/temp-mail-api-docs Creates a new temporary email address. You can specify a custom username, expiration time, and custom domain. A premium feature allows for creating dashboard-style emails with a fixed expiry. ```APIDOC ## POST /api/v1/emails/create ### Description Creates a new temporary email address. You can specify a custom username, expiration time, and custom domain. A premium feature allows for creating dashboard-style emails with a fixed expiry. ### Method POST ### Endpoint https://v1.boomlify.com/api/v1/emails/create ### Parameters #### Query Parameters - **custom_username** (string) - Optional - Custom username for the email address. Can contain letters, numbers, dots, hyphens, and underscores. Must be 3-30 characters. If omitted, a random username is generated. - **timeSelect** (string) - Optional - Expiration time. Must be one of: 10min, 1hour, 1day, permanent. - **domain** (string) - Optional - Custom domain for the email address. Must be a verified domain in your account. If not specified, a random public domain is used. - **create_as_dashboard** (string) - Optional - Set to "true" to create a dashboard-style email stored in database with fixed 2-month expiry instead of a time-based API email. Omit or set to "false" for time-based emails (default). Dashboard emails cost 15 credits. Free tier users will receive 403 error. ### Request Example ```json { "example": "POST /api/v1/emails/create?custom_username=testuser&timeSelect=1hour&domain=example.com&create_as_dashboard=true" } ``` ### Response #### Success Response (200) - **email** (string) - The created temporary email address. - **expires_at** (string) - The expiration timestamp of the email address. #### Response Example ```json { "example": { "email": "testuser@example.com", "expires_at": "2023-10-27T10:00:00Z" } } ``` #### Error Handling - **401 UNAUTHORIZED**: Invalid or missing API key. API key is required and must be valid. - **409**: Custom username is taken. - **400**: Custom domain is not available or invalid. ``` -------------------------------- ### PUT /api/v1/emails/{id}/telegram-forwarding Source: https://boomlify.com/en/temp-mail-api-docs Updates the Telegram forwarding configuration for a specific mailbox. ```APIDOC ## PUT /api/v1/emails/{id}/telegram-forwarding ### Description Updates the Telegram forwarding status for a dashboard or permanent API mailbox. This operation requires a paid plan and consumes 2 credits. ### Method PUT ### Endpoint /api/v1/emails/{id}/telegram-forwarding ### Parameters #### Path Parameters - **id** (string) - Required - The mailbox ID to update. #### Query Parameters - **include_dashboard** (boolean) - Required - Must be "true" to update forwarding. Costs 2 credits. #### Request Body - **is_enabled** (boolean) - Required - Set true to enable forwarding or false to disable. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.