mailfixture Phone Numbers API

Dedicated US numbers for inbound SMS (paid plans only; receive-only).

GitHub OpenAPI

Operations 3

GET /v1/phone-numbers List phone numbers #
POST /v1/phone-numbers Provision a phone number #
DELETE /v1/phone-numbers/{id} Release a phone number #

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-phone-numbers-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-phone-numbers-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 Phone Numbers API
  version: 0.1.0
servers:
- description: Canonical API origin
  url: https://api.mailfixture.com
security:
- apiKey: []
tags:
- description: Dedicated US numbers for inbound SMS (paid plans only; receive-only).
  name: Phone Numbers
paths:
  /v1/phone-numbers:
    get:
      operationId: list_phone_numbers
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneNumberList'
          description: The account's numbers.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
      summary: List phone numbers
      tags:
      - Phone Numbers
    post:
      description: Provisions a dedicated US number — no request body, US local is the only offering. Paid plans only. Numbers start `pending` and flip to `active` once the provider confirms (usually seconds). Creation shares the burst-10 creation bucket with inboxes.
      operationId: create_phone_number
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneNumber'
          description: Number ordered.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: Account frozen, phone numbers require a paid plan (the free cap is 0), or the plan's number cap is reached (solo 1, team 3, scale 10).
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
        '503':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: SMS is not configured on this deployment, or provisioning failed at the provider — safe to retry.
      summary: Provision a phone number
      tags:
      - Phone Numbers
  /v1/phone-numbers/{id}:
    delete:
      description: Releases the number at the provider first, then deletes it and all of its texts immediately. A provider failure leaves the number owned so the call can be retried.
      operationId: release_phone_number
      parameters:
      - description: Phone number id.
        in: path
        name: id
        required: true
        schema:
          format: uuid
          type: string
      responses:
        '204':
          description: Number released; its texts are gone.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: No such phone number on this account.
        '409':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The number order is still pending — wait for it to become active before releasing.
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
        '503':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: Release failed at the provider; try again shortly.
      summary: Release a phone number
      tags:
      - Phone Numbers
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
    PhoneNumberList:
      properties:
        phone_numbers:
          items:
            $ref: '#/components/schemas/PhoneNumber'
          type: array
      required:
      - phone_numbers
      type: object
    PhoneNumber:
      properties:
        created_at:
          format: date-time
          type: string
        id:
          format: uuid
          type: string
        phone_number:
          description: E.164, e.g. +15551234567.
          type: string
        release_after:
          description: Scheduled auto-release after a plan downgrade put the account over its number cap; null when not scheduled. Cleared if the account comes back within cap.
          format: date-time
          type:
          - string
          - 'null'
        status:
          description: '`pending` until the provider confirms the order.'
          enum:
          - pending
          - active
          type: string
      required:
      - id
      - phone_number
      - status
      - created_at
      - release_after
      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