mailfixture Domains API

Custom receiving domains (TXT + MX verification) plus the shared utility domains.

GitHub OpenAPI

Operations 4

GET /v1/domains List domains #
POST /v1/domains Add a custom domain #
DELETE /v1/domains/{id} Delete a custom domain #
POST /v1/domains/{id}/verify Run domain verification now #

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-domains-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-domains-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 Domains API
  version: 0.1.0
servers:
- description: Canonical API origin
  url: https://api.mailfixture.com
security:
- apiKey: []
tags:
- description: Custom receiving domains (TXT + MX verification) plus the shared utility domains.
  name: Domains
paths:
  /v1/domains:
    get:
      description: The account's custom domains plus the shared utility domains. `setup` is present only on unverified custom domains.
      operationId: list_domains
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DomainList'
          description: Available domains.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
      summary: List domains
      tags:
      - Domains
    post:
      description: Registers a custom receiving domain. The response's `setup` object carries the exact TXT challenge and MX records to publish; mail is accepted only after verification. Newly created domains are auto-rechecked every 60 s for their first 7 days.
      operationId: create_domain
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDomainRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Domain'
          description: Domain registered, verification pending.
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: '`fqdn` is not a valid domain name.'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: Custom domains require a paid plan.
        '409':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: That domain is already registered.
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
      summary: Add a custom domain
      tags:
      - Domains
  /v1/domains/{id}:
    delete:
      operationId: delete_domain
      parameters:
      - description: Domain id.
        in: path
        name: id
        required: true
        schema:
          format: uuid
          type: string
      responses:
        '204':
          description: Domain deleted.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: No such custom domain on this account.
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
      summary: Delete a custom domain
      tags:
      - Domains
  /v1/domains/{id}/verify:
    post:
      description: Runs live DNS TXT + MX checks (fresh, uncached resolution) and persists the result. Always 200 — failed checks are reported in `txt_ok`/`mx_ok`, never as an error status.
      operationId: verify_domain
      parameters:
      - description: Domain id.
        in: path
        name: id
        required: true
        schema:
          format: uuid
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DomainVerifyResult'
          description: Check results and current verification state.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: No such custom domain on this account.
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
      summary: Run domain verification now
      tags:
      - Domains
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
    DomainVerifyResult:
      properties:
        fqdn:
          type: string
        id:
          format: uuid
          type: string
        mx_ok:
          description: This check run saw the MX record.
          type: boolean
        mx_ok_at:
          format: date-time
          type:
          - string
          - 'null'
        setup:
          $ref: '#/components/schemas/DomainSetup'
        txt_ok:
          description: This check run saw the TXT challenge.
          type: boolean
        verified_at:
          format: date-time
          type:
          - string
          - 'null'
      required:
      - id
      - fqdn
      - txt_ok
      - mx_ok
      - verified_at
      - mx_ok_at
      - setup
      type: object
    DomainSetup:
      properties:
        mx:
          properties:
            name:
              type: string
            priority:
              type: integer
            value:
              description: The MX hostname to point at.
              type: string
          required:
          - name
          - value
          - priority
          type: object
        txt:
          properties:
            name:
              description: Record name, `_mfx.<fqdn>`.
              type: string
            value:
              description: Record value, `mfx-verify=<token>`.
              type: string
          required:
          - name
          - value
          type: object
      required:
      - txt
      - mx
      type: object
    Domain:
      properties:
        created_at:
          format: date-time
          type: string
        fqdn:
          type: string
        id:
          format: uuid
          type: string
        kind:
          enum:
          - shared
          - custom
          type: string
        mx_ok_at:
          format: date-time
          type:
          - string
          - 'null'
        setup:
          $ref: '#/components/schemas/DomainSetup'
          description: DNS records to publish; present on creation and on unverified custom domains in lists.
        verified_at:
          format: date-time
          type:
          - string
          - 'null'
        verify_txt_token:
          description: TXT challenge value; null for shared domains.
          type:
          - string
          - 'null'
      required:
      - id
      - fqdn
      - kind
      - verify_txt_token
      - verified_at
      - mx_ok_at
      - created_at
      type: object
    DomainList:
      properties:
        domains:
          items:
            $ref: '#/components/schemas/Domain'
          type: array
      required:
      - domains
      type: object
    CreateDomainRequest:
      properties:
        fqdn:
          description: Fully-qualified domain like mail.example.com; trimmed, trailing dot stripped, lowercased. Prefer a dedicated subdomain.
          maxLength: 253
          type: string
      required:
      - fqdn
      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