Muted
Sign in
API Reference

Endpoints available in the Muted API.

Muted Code IMAP · OAuth2 · TOTP

Pulls verification codes from mailboxes and generates TOTP tokens for two-factor authentication.

Retrieve a verification code from an email inbox or generate a TOTP 2FA token. If a 2fa header is provided, returns a 6-digit TOTP token. Otherwise, connects via IMAP and searches recent messages for a numeric code. Supports IMAP mailboxes of the popular services, Outlook over OAuth2, and mail.tm — it has no IMAP, so the code is fetched through their HTTP API with the same email and password. The current list of services and their availability is at GET /code/providers.

Parameters header
NameTypeDescription
email string optional Email address to connect to
password string optional Email password or app-password
2fa string optional TOTP secret key — if set, email/password are ignored
code_length integer optional Number of digits to look for (default 6)
search_in string optional subject, body or both (default)
sender_filter string optional Only match emails whose sender contains this value
refresh-token string optional OAuth2 refresh token (Outlook)
client-id string optional OAuth2 client ID (Outlook)
Response — email code
{
  "success": true,
  "code": "482916",
  "sender": "Example Service",
  "sender_mail": "[email protected]",
  "mail_date": "2025-01-01T12:00:00+00:00",
  "type": "email"
}
Response — 2FA token
{
  "success": true,
  "code": "739201",
  "remaining_seconds": 18,
  "type": "2fa"
}
Response — error
{
  "success": false,
  "message": "Код не найден."
}

The mail services Muted Code can pull codes from, their domains and current availability. Statuses are cached for a minute.

Parameters query
NameTypeDescription
check boolean optional Whether to ping the services. false returns the registry without checks (default true)
Response
{
  "providers": [
    {
      "id": "mailtm",
      "name": "Mail.tm",
      "site": "https://mail.tm",
      "kind": "api",
      "domains": ["emalupe.com"],
      "status_page": null,
      "check_url": "https://api.mail.tm/domains",
      "status": "up",
      "latency_ms": 339
    }
  ],
  "checked_at": "2025-01-01T12:00:00+00:00"
}