mailfixture Inboxes API

Receiving addresses. Deleting an inbox drops its messages immediately.

GitHub OpenAPI

Operations 4

GET /v1/inboxes List inboxes #
POST /v1/inboxes Create an inbox #
DELETE /v1/inboxes/{id} Delete an inbox #
POST /v1/inboxes/{id}/clear Clear an inbox #

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/mailfixture-com:mailfixture-com-inboxes-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

mailfixture-com-inboxes-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    email: support@mailfixture.com
    name: mailfixture support
  description: 'REST API for mailfixture: create inboxes, trigger your app''s email flow, then read messages back and assert on extracted OTPs, links, SPF/DKIM/DMARC verdicts, and a SpamAssassin score. Paid plans add dedicated US phone numbers with the same loop for SMS.


    Conventions:

    - Every request needs `Authorization: Bearer mfx_`.

    - Errors are RFC 7807 `application/problem+json` (`{type, title, status, detail}`); `type` is always `about:blank`. 404 uniformly covers both missing and not-owned resources.

    - Rate limiting is a per-key token bucket: 2 requests/second sustained, burst 60 (policy `requests`). Refusals are 429 with a `Retry-After` header (integer seconds). Inbox, phone-number, and capture-hook creation draw on a shared second per-key bucket (burst 10, refills 10/minute; policy `creates`).

    - Every authenticated response carries rate-limit headers: `RateLimit-Policy: "requests";q=60;w=30` and `RateLimit: "requests";r=;t=` (draft-ietf-httpapi-ratelimit-headers syntax) plus `RateLimit-Limit` / `RateLimit-Remaining` / `RateLimit-Reset` integers. A 429 reports the bucket that refused with `r=0`.

    - A 401 carries `WWW-Authenticate: Bearer realm="mailfixture"` (`error="invalid_token"` when a key was presented but rejected).

    - Timestamps are RFC 3339 UTC strings; ids are UUIDs. Nullable fields serialize as JSON `null`, never omitted (except where a schema notes otherwise).

    - List responses wrap the array in an object key (`{"messages": [...]}`) and are not paginated; message lists take a `since` cursor instead.

    - Long-polling: message list endpoints accept `wait` (clamped to 60 s) and hold the request until a match arrives or the window closes. An empty window is a 200 with an empty array, never 204 or 408.'
  summary: 'Programmatic email inboxes (and SMS numbers) for automated testing. Receive-only: mailfixture never sends.'
  termsOfService: https://mailfixture.com/terms
  title: mailfixture Inboxes API
  version: 0.1.0
servers:
- description: Canonical API origin
  url: https://api.mailfixture.com
security:
- apiKey: []
tags:
- description: Receiving addresses. Deleting an inbox drops its messages immediately.
  name: Inboxes
paths:
  /v1/inboxes:
    get:
      description: Newest first. At most 500 inboxes are returned; there is no pagination.
      operationId: list_inboxes
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InboxList'
          description: The account's inboxes.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
      summary: List inboxes
      tags:
      - Inboxes
    post:
      description: 'Creates a receiving address. The body is optional: with no body the inbox gets a random 10-character local part on the shared domain and no expiry. Creation draws on a second per-key bucket (burst 10, refills 10/minute) in addition to the general request budget — either can answer 429.'
      operationId: create_inbox
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateInboxRequest'
        required: false
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Inbox'
          description: Inbox created.
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: Invalid `local_part` (1–64 chars of [a-z0-9._-], must not start or end with a dot) or `ttl_seconds` out of range (60–2592000).
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: Account frozen, or the plan's active-inbox cap is reached (free 25, solo 250, team 1000, scale 5000).
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: '`domain` names a domain that is neither shared nor owned by this account.'
        '409':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: That address already exists.
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
        '503':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: No shared domain is configured on this deployment (only when `domain` was omitted).
      summary: Create an inbox
      tags:
      - Inboxes
  /v1/inboxes/{id}:
    delete:
      description: Deletes the inbox and all of its messages immediately — there is no history-until-retention.
      operationId: delete_inbox
      parameters:
      - description: Inbox id.
        in: path
        name: id
        required: true
        schema:
          format: uuid
          type: string
      responses:
        '204':
          description: Inbox and its messages deleted.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: No such inbox on this account.
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
      summary: Delete an inbox
      tags:
      - Inboxes
  /v1/inboxes/{id}/clear:
    post:
      description: Deletes all messages but keeps the inbox and its address. Idempotent — clearing an empty inbox is still 204.
      operationId: clear_inbox
      parameters:
      - description: Inbox id.
        in: path
        name: id
        required: true
        schema:
          format: uuid
          type: string
      responses:
        '204':
          description: Messages deleted; inbox kept.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: No such inbox on this account.
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
      summary: Clear an inbox
      tags:
      - Inboxes
components:
  schemas:
    Problem:
      description: 'RFC 7807 problem document — every error response uses this shape with `Content-Type: application/problem+json`.'
      properties:
        detail:
          description: Human-readable specifics; null on 500.
          type:
          - string
          - 'null'
        status:
          description: The HTTP status, duplicated in the body.
          type: integer
        title:
          description: Fixed short phrase for the status class, e.g. `bad request`, `not found`.
          type: string
        type:
          const: about:blank
          type: string
      required:
      - type
      - title
      - status
      - detail
      type: object
    InboxList:
      properties:
        inboxes:
          items:
            $ref: '#/components/schemas/InboxSummary'
          type: array
      required:
      - inboxes
      type: object
    Inbox:
      properties:
        created_at:
          format: date-time
          type: string
        domain:
          type: string
        email_address:
          description: '`local_part@domain` — the address to send to.'
          type: string
        id:
          format: uuid
          type: string
        local_part:
          type: string
        ttl_expires_at:
          format: date-time
          type:
          - string
          - 'null'
      required:
      - id
      - email_address
      - local_part
      - domain
      - ttl_expires_at
      - created_at
      type: object
    InboxSummary:
      properties:
        created_at:
          format: date-time
          type: string
        fqdn:
          type: string
        id:
          format: uuid
          type: string
        local_part:
          type: string
        message_count:
          type: integer
        ttl_expires_at:
          format: date-time
          type:
          - string
          - 'null'
      required:
      - id
      - local_part
      - fqdn
      - ttl_expires_at
      - created_at
      - message_count
      type: object
    CreateInboxRequest:
      description: All fields optional; an empty or absent body creates a random address on the shared domain with no expiry.
      properties:
        domain:
          description: A shared domain or one of the account's verified custom domains. Omit for the shared domain.
          type: string
        local_part:
          description: Lowercased on input; must not start or end with a dot. Omit for a random 10-char local part.
          maxLength: 64
          minLength: 1
          pattern: ^[a-z0-9._-]+$
          type: string
        ttl_seconds:
          description: Auto-expire the inbox after this many seconds (max 30 days). Expired inboxes 550-reject new mail and are swept hourly. Omit for no expiry.
          maximum: 2592000
          minimum: 60
          type: integer
      type: object
  responses:
    Unauthorized:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      description: Missing bearer token, malformed key, or unknown/revoked/invalid API key.
      headers:
        WWW-Authenticate:
          description: 'RFC 6750 Bearer challenge: `Bearer realm="mailfixture"` when no token was sent, with `error="invalid_token"` when one was sent but rejected.'
          schema:
            type: string
    RateLimited:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      description: Per-key rate limit exceeded. `Retry-After` says when the next request will be admitted; the RateLimit headers name the bucket that refused (`requests` or `creates`) with `r=0`.
      headers:
        RateLimit:
          description: 'Live bucket state: `"<bucket>";r=<remaining>;t=<seconds until full>`. Present on every authenticated response, not only 429s.'
          schema:
            type: string
        RateLimit-Limit:
          description: Bucket size (legacy integer form).
          schema:
            type: integer
        RateLimit-Policy:
          description: 'Quota policy, draft-ietf-httpapi-ratelimit-headers syntax: `"<bucket>";q=<size>;w=<seconds to refill fully>`.'
          schema:
            type: string
        RateLimit-Remaining:
          description: Whole tokens left (legacy integer form).
          schema:
            type: integer
        RateLimit-Reset:
          description: Seconds until the bucket is full (legacy integer form).
          schema:
            type: integer
        Retry-After:
          description: Seconds until the next token is available.
          schema:
            type: integer
    ServerError:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      description: Unexpected server error. `detail` is null — internals are never leaked.
  securitySchemes:
    apiKey:
      description: mailfixture API key (`mfx_…`) as a Bearer token. Create one in the dashboard (/app/keys) or via POST /v1/keys.
      scheme: bearer
      type: http
externalDocs:
  description: Hand-written API reference
  url: https://mailfixture.com/docs/api