{
  "info": {
    "_postman_id": "7fa84d2b-93bf-4f67-8e62-c124e39b7012",
    "name": "TempMailAPI - Official Collection",
    "description": "Official Postman Collection for TempMailAPI (https://private.tempmailc.com).\nIncludes REST API v1, Real-time SSE Stream, Webhooks, and Kopeechka 2.0 protocol.\n\n### Authentication\nPass your Master API Code via query parameter `?code={{apiKey}}`, `?token={{apiKey}}`, or header `X-API-Key: {{apiKey}}`.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://private.tempmailc.com",
      "type": "string",
      "description": "Base URL of the TempMailAPI private gateway"
    },
    {
      "key": "apiKey",
      "value": "YOUR_API_KEY",
      "type": "string",
      "description": "Your Master API Code found on your TempMailAPI Dashboard"
    },
    {
      "key": "email",
      "value": "test@yourdomain.com",
      "type": "string",
      "description": "Target mailbox address on one of your assigned domains"
    },
    {
      "key": "taskId",
      "value": "100001",
      "type": "string",
      "description": "Task ID returned by Kopeechka mailbox-get-email"
    }
  ],
  "item": [
    {
      "name": "REST API v1",
      "description": "Core REST endpoints for checking domains, instant OTP extraction, inboxes, and isolated HTML rendering.",
      "item": [
        {
          "name": "1. List Assigned Domains",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/domains?code={{apiKey}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "domains"
              ],
              "query": [
                {
                  "key": "code",
                  "value": "{{apiKey}}",
                  "description": "Master API code"
                }
              ]
            },
            "description": "Returns the active private domains assigned to your account."
          }
        },
        {
          "name": "2. Get Instant OTP Code",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/code?email={{email}}&code={{apiKey}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "code"
              ],
              "query": [
                {
                  "key": "email",
                  "value": "{{email}}",
                  "description": "Email address to check"
                },
                {
                  "key": "code",
                  "value": "{{apiKey}}",
                  "description": "Master API code"
                }
              ]
            },
            "description": "Fast-path OTP extraction (<1ms). Returns numeric or alphanumeric code."
          }
        },
        {
          "name": "3. Get Full Inbox (Parsed Message)",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/inbox?email={{email}}&code={{apiKey}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "inbox"
              ],
              "query": [
                {
                  "key": "email",
                  "value": "{{email}}",
                  "description": "Email address to check"
                },
                {
                  "key": "code",
                  "value": "{{apiKey}}",
                  "description": "Master API code"
                }
              ]
            },
            "description": "Returns parsed message with sender, subject, date, and plain text."
          }
        },
        {
          "name": "4. Get Message by ID",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/message?email={{email}}&msg_id=&code={{apiKey}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "message"
              ],
              "query": [
                {
                  "key": "email",
                  "value": "{{email}}"
                },
                {
                  "key": "msg_id",
                  "value": "",
                  "description": "Message ID (optional)"
                },
                {
                  "key": "code",
                  "value": "{{apiKey}}"
                }
              ]
            },
            "description": "Fetches a specific message by its ID."
          }
        },
        {
          "name": "5. Get Raw HTML",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/html?email={{email}}&code={{apiKey}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "html"
              ],
              "query": [
                {
                  "key": "email",
                  "value": "{{email}}"
                },
                {
                  "key": "code",
                  "value": "{{apiKey}}"
                }
              ]
            },
            "description": "Returns raw HTML content of the latest incoming email in JSON format."
          }
        },
        {
          "name": "6. View Sandboxed HTML (Browser)",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/view-html?email={{email}}&code={{apiKey}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "view-html"
              ],
              "query": [
                {
                  "key": "email",
                  "value": "{{email}}"
                },
                {
                  "key": "code",
                  "value": "{{apiKey}}"
                }
              ]
            },
            "description": "Renders email inside a SEC-03 isolated sandbox iframe."
          }
        }
      ]
    },
    {
      "name": "Realtime & Webhooks",
      "description": "Real-time Server-Sent Events (SSE) and HTTP push webhooks for microsecond delivery.",
      "item": [
        {
          "name": "1. Realtime SSE Stream",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "text/event-stream",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/stream?email={{email}}&code={{apiKey}}&full=false",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "stream"
              ],
              "query": [
                {
                  "key": "email",
                  "value": "{{email}}"
                },
                {
                  "key": "code",
                  "value": "{{apiKey}}"
                },
                {
                  "key": "full",
                  "value": "false",
                  "description": "Include full HTML in stream event"
                }
              ]
            },
            "description": "Server-Sent Events (SSE) stream. Pushes emails in sub-milliseconds without polling."
          }
        },
        {
          "name": "2. Get Webhook Config & Logs",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/webhook?code={{apiKey}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "webhook"
              ],
              "query": [
                {
                  "key": "code",
                  "value": "{{apiKey}}"
                }
              ]
            },
            "description": "Returns current webhook URL and last 10 delivery logs."
          }
        },
        {
          "name": "3. Set Webhook URL",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"url\": \"https://webhook.site/your-unique-id\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/api/v1/webhook?code={{apiKey}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "webhook"
              ],
              "query": [
                {
                  "key": "code",
                  "value": "{{apiKey}}"
                }
              ]
            },
            "description": "Sets destination HTTP URL where new incoming emails are POSTed instantly."
          }
        },
        {
          "name": "4. Trigger Test Webhook Dispatch",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/webhook/test?code={{apiKey}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "webhook",
                "test"
              ],
              "query": [
                {
                  "key": "code",
                  "value": "{{apiKey}}"
                }
              ]
            },
            "description": "Sends a mock email payload to your configured webhook URL to test connectivity."
          }
        },
        {
          "name": "5. Delete Webhook URL",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/webhook?code={{apiKey}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "webhook"
              ],
              "query": [
                {
                  "key": "code",
                  "value": "{{apiKey}}"
                }
              ]
            },
            "description": "Removes your configured webhook URL."
          }
        }
      ]
    },
    {
      "name": "Kopeechka 2.0 API",
      "description": "100% drop-in compatible with Kopeechka protocol for automated account creators and bots.",
      "item": [
        {
          "name": "1. Generate Mailbox (mailbox-get-email)",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/mailbox-get-email?site=any&token={{apiKey}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "mailbox-get-email"
              ],
              "query": [
                {
                  "key": "site",
                  "value": "any",
                  "description": "Target site or service"
                },
                {
                  "key": "token",
                  "value": "{{apiKey}}",
                  "description": "API Token (Master code)"
                }
              ]
            },
            "description": "Generates a fresh mailbox and returns task ID + email address."
          }
        },
        {
          "name": "2. Get OTP or Link (mailbox-get-message)",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/mailbox-get-message?id={{taskId}}&token={{apiKey}}&full=1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "mailbox-get-message"
              ],
              "query": [
                {
                  "key": "id",
                  "value": "{{taskId}}",
                  "description": "Task ID from mailbox-get-email"
                },
                {
                  "key": "token",
                  "value": "{{apiKey}}"
                },
                {
                  "key": "full",
                  "value": "1",
                  "description": "Return full message if 1"
                }
              ]
            },
            "description": "Polls for verification code or link. Returns OK with code or WAIT_LINK."
          }
        },
        {
          "name": "3. Check Balance (user-balance)",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/user-balance?token={{apiKey}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "user-balance"
              ],
              "query": [
                {
                  "key": "token",
                  "value": "{{apiKey}}"
                }
              ]
            },
            "description": "Returns remaining daily request balance."
          }
        },
        {
          "name": "4. Cancel Mailbox (mailbox-cancel)",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/mailbox-cancel?id={{taskId}}&token={{apiKey}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "mailbox-cancel"
              ],
              "query": [
                {
                  "key": "id",
                  "value": "{{taskId}}"
                },
                {
                  "key": "token",
                  "value": "{{apiKey}}"
                }
              ]
            },
            "description": "Cancels an active mailbox order and releases task quota."
          }
        }
      ]
    }
  ]
}