Mailosaur Devices API

Operations for managing virtual security devices and retrieving their current one-time passwords (OTPs), used to automate testing of app-based multi-factor authentication.

Operations 5

GET /api/devices List devices #
POST /api/devices Create a device #
DELETE /api/devices/{deviceId} Delete a device #
GET /api/devices/{deviceId}/otp Get OTP for a device #
POST /api/devices/otp Get OTP by shared secret #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/mailosaur-devices-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

mailosaur-devices-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Mailosaur Analysis Devices API
  description: REST API for email and SMS testing. Provides endpoints for managing test inboxes (servers), retrieving and searching messages, running deliverability checks, generating OTPs for authenticator testing, and accessing account usage data. All requests authenticate via HTTP Basic Auth using an API key.
  version: 1.0.0
  contact:
    name: Mailosaur Support
    url: https://mailosaur.com/docs/api
  termsOfService: https://mailosaur.com/terms
  license:
    name: Commercial
    url: https://mailosaur.com/terms
servers:
- url: https://mailosaur.com
  description: Mailosaur production API
security:
- basicAuth: []
tags:
- name: Devices
  description: Operations for managing virtual security devices and retrieving their current one-time passwords (OTPs), used to automate testing of app-based multi-factor authentication.
paths:
  /api/devices:
    get:
      operationId: listDevices
      summary: List devices
      description: Returns a list of your virtual security devices.
      tags:
      - Devices
      responses:
        '200':
          description: A list of virtual security devices.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceListResult'
    post:
      operationId: createDevice
      summary: Create a device
      description: Creates a new virtual security device.
      tags:
      - Devices
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeviceCreateOptions'
      responses:
        '200':
          description: The newly-created virtual security device.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Device'
  /api/devices/{deviceId}:
    delete:
      operationId: deleteDevice
      summary: Delete a device
      description: Permanently delete a virtual security device. This operation cannot be undone.
      tags:
      - Devices
      parameters:
      - $ref: '#/components/parameters/deviceId'
      responses:
        '204':
          description: The device was successfully deleted.
  /api/devices/{deviceId}/otp:
    get:
      operationId: getDeviceOtp
      summary: Get OTP for a device
      description: Retrieves the current one-time password for a saved device.
      tags:
      - Devices
      parameters:
      - $ref: '#/components/parameters/deviceId'
      responses:
        '200':
          description: The current one-time password result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OtpResult'
  /api/devices/otp:
    post:
      operationId: getOtpBySharedSecret
      summary: Get OTP by shared secret
      description: Retrieves the current one-time password given a base32-encoded shared secret.
      tags:
      - Devices
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                sharedSecret:
                  type: string
                  description: The base32-encoded shared secret.
              required:
              - sharedSecret
      responses:
        '200':
          description: The current one-time password result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OtpResult'
components:
  schemas:
    OtpResult:
      type: object
      description: A one-time password result from a virtual security device.
      properties:
        code:
          type: string
          description: The current one-time password.
        expires:
          type: string
          format: date-time
          description: The expiry date/time of the current one-time password.
    DeviceCreateOptions:
      type: object
      description: Options used to create a new Mailosaur virtual security device.
      properties:
        name:
          type: string
          description: A name used to identify the device.
        sharedSecret:
          type: string
          description: The base32-encoded shared secret for this device.
    Device:
      type: object
      description: A Mailosaur virtual security device (for TOTP/2FA testing).
      properties:
        id:
          type: string
          description: Unique identifier for the device.
        name:
          type: string
          description: The name of the device.
    DeviceListResult:
      type: object
      description: A list of virtual security devices.
      properties:
        items:
          type: array
          description: A list of devices.
          items:
            $ref: '#/components/schemas/Device'
  parameters:
    deviceId:
      name: deviceId
      in: path
      required: true
      description: The unique identifier of the virtual security device.
      schema:
        type: string
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic Auth using your Mailosaur API key as the username and an empty password, or your API key as both username and password.