---
title: "Temporary Email Inbox & OTP API"
slug: temporary-email-inbox-otp
url: https://apyhub.com/dishis/service/temporary-email-inbox-otp
provider: DishIs Technologies LLC
categories: [Retrieval Kit, Verification Kit]
tags: [temporary-email, disposable-inbox, otp-extraction, verification-link, email-testing, temp-mail, email-otp, magic-link, qa-automation]
auth: api_key
version: 1.0.0
service_type: sync
endpoints: 8
atoms: 1-10
mcp: true
---

# Temporary Email Inbox & OTP API

Temp mail API to create inboxes, wait for new mail, and get OTP codes or verification links. Read, list, or delete messages. Free tier, no card.

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| GET | `https://api.eu.apyhub.com/dishis/temporary-email-inbox-otp/domains` | What it does Returns the available temp mail domains as a JSON object containing a total count, a d… | 1 |
| POST | `https://api.eu.apyhub.com/dishis/temporary-email-inbox-otp/inboxes` | What it does Creates a temporary inbox address. You can supply a specific email address to create,… | 5 |
| GET | `https://api.eu.apyhub.com/dishis/temporary-email-inbox-otp/inboxes/:inbox/wait` | What it does Waits for the next email in the specified inbox and returns the message details when o… | 10 |
| GET | `https://api.eu.apyhub.com/dishis/temporary-email-inbox-otp/inboxes/:inbox/otp` | What it does Retrieves the most recent OTP-related email details for a specified inbox, and returns… | 10 |
| GET | `https://api.eu.apyhub.com/dishis/temporary-email-inbox-otp/inboxes/:inbox/messages` | What it does Lists the messages for a specific inbox and returns a JSON object containing the total… | 2 |
| GET | `https://api.eu.apyhub.com/dishis/temporary-email-inbox-otp/inboxes/:inbox/messages/:id` | What it does Retrieves a single email message from the specified inbox using the inbox name and mes… | 3 |
| DELETE | `https://api.eu.apyhub.com/dishis/temporary-email-inbox-otp/inboxes/:inbox/messages/:id` | What it does Deletes a specific email message from the inbox identified by inbox, using the message… | 1 |
| DELETE | `https://api.eu.apyhub.com/dishis/temporary-email-inbox-otp/inboxes/:inbox` | What it does Deletes the inbox identified by the inbox path parameter. On success, it returns a JSO… | 1 |

## Endpoint reference

### List Temp Mail Domains

`GET https://api.eu.apyhub.com/dishis/temporary-email-inbox-otp/domains` · 1 atoms · accepts `application/json` · returns `application/json`

#### Quickstart

List the available temp email domains.

```bash
curl -X GET "https://api.eu.apyhub.com/dishis/temporary-email-inbox-otp/domains" \
  -H "apy-token: $APY_TOKEN"
```

#### What you'll get back

Returns a JSON object with `count` as an integer, `data` as an array of domain objects, and `success` as a boolean.

Each object in `data` can include `domain` as a string, `tier` as `"free"` or `"pro"`, and `tags` as an array of strings.

```json
{
  "count": 2,
  "data": [
    {
      "domain": "lumenbay.info",
      "tier": "free",
      "tags": ["popular"]
    }
  ],
  "success": true
}
```

### Create Temporary Inbox

`POST https://api.eu.apyhub.com/dishis/temporary-email-inbox-otp/inboxes` · 5 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `inbox` | body | string (email) | no | Address to create. Leave out for a random one. Example: `qa-run-42@lumenbay.info`. |

#### Quickstart

Create a temp inbox by sending its email address in the request body.

```bash
curl -X POST "https://api.eu.apyhub.com/dishis/temporary-email-inbox-otp/inboxes" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"inbox":"qa-run-42@lumenbay.info"}'
```

#### What you'll get back

Returns a JSON object with `inbox` string, `message` string, and `success` boolean fields.

```json
{
  "inbox": "qa-run-42@lumenbay.info",
  "message": "Inbox registered.",
  "success": true
}
```

### Wait for the Next Email

`GET https://api.eu.apyhub.com/dishis/temporary-email-inbox-otp/inboxes/:inbox/wait` · 10 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `inbox` | path | string | yes | Example: `qa-run-42@lumenbay.info`. |
| `timeout` | query | integer | no | Default: `20`. |

#### Quickstart

Wait for a new email in the specified inbox, using the inbox value in the path and the default timeout query parameter.

```bash
curl -X GET "https://api.eu.apyhub.com/dishis/temporary-email-inbox-otp/inboxes/:inbox/wait?timeout=20" \
  -H "apy-token: $APY_TOKEN"
```

#### What you'll get back

Returns a JSON object with `success` boolean, `message` string, and `data` object fields. `data` contains the email details: `id`, `to`, `otp` (nullable), `date`, `from`, `subject`, `hasAttachment`, and `verificationLink` (nullable).

```json
{
  "success": true,
  "message": "Email received",
  "data": {
    "id": "msg_12345",
    "to": "qa-run-42@lumenbay.info",
    "otp": "482931",
    "date": "2026-12-03T12:34:56Z",
    "from": "no-reply@example.com",
    "subject": "Your verification code",
    "hasAttachment": false,
    "verificationLink": null
  }
}
```

### Extract OTP Code and Verification Link

`GET https://api.eu.apyhub.com/dishis/temporary-email-inbox-otp/inboxes/:inbox/otp` · 10 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `inbox` | path | string | yes | Example: `qa-run-42@lumenbay.info`. |
| `since` | query | integer (int64) | no | Example: `1764230400000`. |

#### Quickstart

Fetch the latest OTP email for a specific inbox. Replace the inbox value in the path and run:

```bash
curl -X GET "https://api.eu.apyhub.com/dishis/temporary-email-inbox-otp/inboxes/:inbox/otp" \
  -H "apy-token: $APY_TOKEN"
```

#### What you'll get back

Returns a JSON object with fields such as `success` (`boolean`), `inbox` (`string`), `otp` (`string` or `null`), `code` (`string` or `null`), `subject` (`string`), `from` (`string`), `to` (`string`), `message` (`string`), `email_id` (`string`), `timestamp` (`integer`), `score` (`number` or `null`), and `verification_link` (`string` or `null`).

```json
{
  "success": true,
  "inbox": "qa-run-42@lumenbay.info",
  "otp": "482913",
  "code": "482913",
  "subject": "Your verification code",
  "from": "no-reply@example.com",
  "to": "qa-run-42@lumenbay.info",
  "message": "Your one-time code is 482913.",
  "email_id": "msg_12345",
  "timestamp": 1764230400000,
  "score": 0.99,
  "verification_link": null
}
```

### List Inbox Messages

`GET https://api.eu.apyhub.com/dishis/temporary-email-inbox-otp/inboxes/:inbox/messages` · 2 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `inbox` | path | string | yes | Example: `qa-run-42@lumenbay.info`. |

#### Quickstart

Fetch the messages for a single inbox.

```bash
curl -X GET "https://api.eu.apyhub.com/dishis/temporary-email-inbox-otp/inboxes/:inbox/messages" \
  -H "apy-token: $APY_TOKEN"
```

#### What you'll get back

Returns a JSON object with `count` as an integer, `data` as an array of message objects, and `success` as a boolean.

```json
{
  "count": 1,
  "data": [
    {
      "id": "msg_123",
      "to": "qa-run-42@lumenbay.info",
      "otp": "482931",
      "date": "2026-12-03T10:15:30Z",
      "from": "no-reply@example.com",
      "subject": "Your verification code",
      "hasAttachment": false,
      "verificationLink": "https://example.com/verify"
    }
  ],
  "success": true
}
```

### Read Email Message

`GET https://api.eu.apyhub.com/dishis/temporary-email-inbox-otp/inboxes/:inbox/messages/:id` · 3 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `inbox` | path | string | yes | Example: `qa-run-42@lumenbay.info`. |
| `id` | path | string | yes | Example: `wNp8N0KoV`. |

#### Quickstart

Fetch a single message from an inbox by its inbox name and message ID.

```bash
curl -X GET "https://api.eu.apyhub.com/dishis/temporary-email-inbox-otp/inboxes/:inbox/messages/:id"
```

#### What you'll get back

Returns a JSON object with a `data` object and a `success` boolean. The `data` object includes the message details such as `id`, `to`, `from`, `subject`, `date`, and optional fields like `otp`, `html`, `text`, `attachments`, and `verificationLink`.

```json
{
  "data": {
    "id": "wNp8N0KoV",
    "to": "qa-run-42@lumenbay.info",
    "otp": null,
    "date": "2024-01-01T12:00:00Z",
    "from": "no-reply@example.com",
    "html": null,
    "text": "Your verification code is 123456.",
    "subject": "Your verification code",
    "attachments": [],
    "hasAttachment": false,
    "verificationLink": null
  },
  "success": true
}
```

### Delete Email Message

`DELETE https://api.eu.apyhub.com/dishis/temporary-email-inbox-otp/inboxes/:inbox/messages/:id` · 1 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `inbox` | path | string | yes | Example: `qa-run-42@lumenbay.info`. |
| `id` | path | string | yes | Example: `wNp8N0KoV`. |

#### Quickstart

Delete a specific message from an inbox by putting the inbox name and message ID in the URL.

```bash
curl -X DELETE "https://api.eu.apyhub.com/dishis/temporary-email-inbox-otp/inboxes/:inbox/messages/:id" \
  -H "apy-token: $APY_TOKEN"
```

#### What you'll get back

Returns a JSON object with a `message` string and a `success` boolean.

```json
{
  "message": "Message deleted.",
  "success": true
}
```

### Delete Inbox

`DELETE https://api.eu.apyhub.com/dishis/temporary-email-inbox-otp/inboxes/:inbox` · 1 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `inbox` | path | string | yes | Example: `qa-run-42@lumenbay.info`. |

#### Quickstart

Delete an inbox by passing its inbox address in the path.

```bash
curl -X DELETE "https://api.eu.apyhub.com/dishis/temporary-email-inbox-otp/inboxes/:inbox" \
  -H "apy-token: $APY_TOKEN"
```

#### What you'll get back

Returns a JSON object with `message` as a string and `success` as a boolean.

```json
{
  "message": "Inbox unregistered.",
  "success": true
}
```

## About

## What it does
The Temporary Email Inbox & OTP API creates a temporary email inbox and pulls the one-time code (OTP) and verification link out of every email it receives. Your tests and AI agents get the code directly, without parsing email HTML.

Send `POST /inboxes` with an empty body to get a random address, or set `inbox` to pick your own name at one of the provider's domains. `GET /domains` lists the domains you can use. Then trigger the email from your app. `GET /inboxes/{inbox}/otp` returns the code and link from the newest email. Set `since` to ignore codes from earlier test runs. You can also call `GET /inboxes/{inbox}/wait`, which holds the request open until the next email arrives. Set its `timeout` between 10 and 25 seconds.

The API detects codes of 4 to 8 characters, numeric or alphanumeric. Messages are kept for 24 hours. Other endpoints list, read and delete messages and inboxes.

Teams use this temporary email API to run end-to-end tests of sign-up, login and password-reset flows in Playwright, Selenium or Cypress. It gives each CI run a fresh inbox and lets AI agents confirm verification emails on their own. AI agents can call it through ApyHub MCP.

Before you test sign-ups with a temp mail API, check whether your own form blocks disposable addresses with the [Email Validation API](https://apyhub.com/apyhub/service/verify-email-validity-and-deliverability). Use the [Generate Webpage Screenshot API](https://apyhub.com/apyhub/service/capture-webpage-screenshot) to capture the confirmation page after each test.

## Usage

Base URL: `https://api.eu.apyhub.com` (default region — see
`GET https://apyhub.com/api/public/regions` for the rest).

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/dishis/service/temporary-email-inbox-otp
