Mailfornet Messages API

The Messages API from Mailfornet — 3 operation(s) for messages.

GitHub OpenAPI

Operations 3

GET /inboxes/{address}/messages List messages #
GET /inboxes/{address}/code Wait for a verification code or link #
GET /messages/{id} Read one message #

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/mailfornet-com:mailfornet-com-messages-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

mailfornet-com-messages-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Mailfornet Messages API
  version: 1.1.0
  summary: Disposable inboxes for automated testing
  description: Create a disposable inbox from your code and read the mail that arrives in it. Built for the test that signs up, waits for a verification code and types it back in.
  termsOfService: https://mailfornet.com/terms
  contact:
    name: Mailfornet support
    url: https://mailfornet.com/contact
servers:
- url: https://api.mailfornet.com/v1
security:
- bearerAuth: []
tags:
- name: Messages
paths:
  /inboxes/{address}/messages:
    get:
      tags:
      - Messages
      summary: List messages
      description: With `wait`, the request holds open until a message arrives, so no polling loop is needed.
      operationId: listMessages
      parameters:
      - $ref: '#/components/parameters/Address'
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 50
      - name: wait
        in: query
        schema:
          type: integer
          minimum: 0
          maximum: 60
          default: 0
        description: Seconds to hold the connection open waiting for mail.
      - name: since
        in: query
        schema:
          type: integer
        description: Only mail received after this unix timestamp in milliseconds.
      - name: from
        in: query
        schema:
          type: string
        description: Only messages whose sender contains this text (case-insensitive).
      - name: subject
        in: query
        schema:
          type: string
        description: Only messages whose subject contains this text (case-insensitive).
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  address:
                    type: string
                  messages:
                    type: array
                    items:
                      $ref: '#/components/schemas/MessageSummary'
                  waited:
                    type: boolean
        '404':
          $ref: '#/components/responses/Error'
        '410':
          $ref: '#/components/responses/Error'
  /inboxes/{address}/code:
    get:
      tags:
      - Messages
      summary: Wait for a verification code or link
      operationId: waitForCode
      description: Holds the request until a message carrying a verification code or confirmation link arrives, then returns just that. Messages with neither (welcome mails, newsletters) are skipped. Answers 404 code_not_found if none arrives within wait.
      parameters:
      - $ref: '#/components/parameters/Address'
      - name: wait
        in: query
        schema:
          type: integer
          minimum: 0
          maximum: 60
          default: 0
        description: Seconds to hold the connection open waiting for mail.
      - name: since
        in: query
        schema:
          type: integer
        description: Only mail received after this unix timestamp in milliseconds.
      - name: from
        in: query
        schema:
          type: string
        description: Only messages whose sender contains this text.
      - name: subject
        in: query
        schema:
          type: string
        description: Only messages whose subject contains this text.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VerificationCode'
        '404':
          $ref: '#/components/responses/Error'
  /messages/{id}:
    get:
      tags:
      - Messages
      summary: Read one message
      operationId: getMessage
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: address
        in: query
        required: true
        schema:
          type: string
          format: email
        description: The inbox the message belongs to.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
        '404':
          $ref: '#/components/responses/Error'
components:
  schemas:
    MessageSummary:
      type: object
      properties:
        id:
          type: string
        from:
          type: string
        subject:
          type: string
        intro:
          type: string
          description: The first line, for matching without a second call.
        date:
          type: string
          format: date-time
          description: When the message arrived.
    VerificationCode:
      type: object
      properties:
        address:
          type: string
          format: email
        code:
          type:
          - string
          - 'null'
          examples:
          - '482913'
        link:
          type:
          - string
          - 'null'
          format: uri
        messageId:
          type: string
        from:
          type: string
        subject:
          type: string
        receivedAt:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
              - invalid_request_error
              - authentication_error
              - rate_limit_error
              - api_error
            code:
              type: string
              description: Stable machine-readable code. Branch on this, not on the message.
              examples:
              - address_taken
              - quota_exceeded
              - invalid_api_key
            message:
              type: string
            docUrl:
              type: string
              format: uri
        requestId:
          type: string
          description: Also sent as the Mailfornet-Request-Id header.
    Message:
      allOf:
      - $ref: '#/components/schemas/MessageSummary'
      - type: object
        properties:
          to:
            type: string
            format: email
          text:
            type: string
          html:
            type: string
          attachments:
            type: array
            items:
              type: object
          code:
            type:
            - string
            - 'null'
            description: The verification code or OTP found in the message, if any.
            examples:
            - '482913'
          links:
            type: array
            items:
              $ref: '#/components/schemas/Link'
            description: Every http(s) link, HTML anchors first. At most 50.
          verificationLink:
            type:
            - string
            - 'null'
            format: uri
            description: The link that most likely confirms, verifies or signs in. Unsubscribe and social links are never chosen.
    Link:
      type: object
      properties:
        url:
          type: string
          format: uri
        text:
          type: string
          description: The anchor text, empty for a bare URL in the plain-text part.
  responses:
    Error:
      description: Something was wrong with the request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  parameters:
    Address:
      name: address
      in: path
      required: true
      schema:
        type: string
        format: email
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Your API key, created at https://mailfornet.com/account