mailfixture Keys API
API keys. Secrets are argon2id-hashed at rest and revealed once at creation.
API keys. Secrets are argon2id-hashed at rest and revealed once at creation.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/mailfixture-com:mailfixture-com-keys-api"
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.
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: 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 Keys API
version: 0.1.0
servers:
- description: Canonical API origin
url: https://api.mailfixture.com
security:
- apiKey: []
tags:
- description: API keys. Secrets are argon2id-hashed at rest and revealed once at creation.
name: Keys
paths:
/v1/keys:
get:
description: Newest first; revoked keys are included (non-null `revoked_at`). Secrets are never returned.
operationId: list_keys
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiKeyList'
description: The account's keys.
'401':
$ref: '#/components/responses/Unauthorized'
'429':
$ref: '#/components/responses/RateLimited'
'500':
$ref: '#/components/responses/ServerError'
summary: List API keys
tags:
- Keys
post:
description: Mints a new key. The full secret is revealed once, in this response only — only its argon2id hash is stored.
operationId: create_key
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateKeyRequest'
required: false
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiKeyCreated'
description: The new key — save `key` now; it cannot be retrieved again.
'401':
$ref: '#/components/responses/Unauthorized'
'429':
$ref: '#/components/responses/RateLimited'
'500':
$ref: '#/components/responses/ServerError'
summary: Create an API key
tags:
- Keys
/v1/keys/{id}:
delete:
description: 'Soft revoke: the key stops authenticating immediately but stays listed with its `revoked_at`. A key may revoke itself.'
operationId: revoke_key
parameters:
- description: Key id.
in: path
name: id
required: true
schema:
format: uuid
type: string
responses:
'204':
description: Key revoked.
'401':
$ref: '#/components/responses/Unauthorized'
'404':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
description: No such active key on this account — already-revoked keys 404 too.
'429':
$ref: '#/components/responses/RateLimited'
'500':
$ref: '#/components/responses/ServerError'
summary: Revoke an API key
tags:
- Keys
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
ApiKeyCreated:
properties:
id:
format: uuid
type: string
key:
description: The full bearer token (`mfx_…`) — shown exactly once.
type: string
prefix:
description: 8-char lookup prefix.
type: string
required:
- id
- prefix
- key
type: object
ApiKeyList:
properties:
keys:
items:
$ref: '#/components/schemas/ApiKey'
type: array
required:
- keys
type: object
CreateKeyRequest:
properties:
label:
description: Display label; blank is treated as no label.
type: string
type: object
ApiKey:
properties:
created_at:
format: date-time
type: string
id:
format: uuid
type: string
label:
type:
- string
- 'null'
prefix:
type: string
revoked_at:
description: Null while the key is active.
format: date-time
type:
- string
- 'null'
required:
- id
- prefix
- label
- created_at
- revoked_at
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