mailfixture Webhooks API
Signed HTTPS event delivery (paid plans). Endpoints receive every event type; payloads never contain message bodies.
Signed HTTPS event delivery (paid plans). Endpoints receive every event type; payloads never contain message bodies.
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-webhooks-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 Webhooks API
version: 0.1.0
servers:
- description: Canonical API origin
url: https://api.mailfixture.com
security:
- apiKey: []
tags:
- description: Signed HTTPS event delivery (paid plans). Endpoints receive every event type; payloads never contain message bodies.
name: Webhooks
paths:
/v1/webhooks:
get:
operationId: list_webhooks
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/WebhookList'
description: The account's endpoints, secrets masked to a hint.
'401':
$ref: '#/components/responses/Unauthorized'
'429':
$ref: '#/components/responses/RateLimited'
'500':
$ref: '#/components/responses/ServerError'
summary: List webhook endpoints
tags:
- Webhooks
post:
description: 'Registers an HTTPS endpoint. Endpoints receive every event type (`message.received`, `sms.received`, `domain.verified`, `endpoint.test`) — there is no per-endpoint event filter — and payloads never contain message bodies. Deliveries are signed `X-MailFixture-Signature: t=,v1=` with the endpoint''s secret; 8 attempts with backoff, and 5 consecutively exhausted deliveries auto-disable the endpoint.'
operationId: create_webhook
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateWebhookRequest'
required: true
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/WebhookCreated'
description: Endpoint created — save `secret` now; lists only ever show a hint.
'400':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
description: 'URL refused: not https, credentials or whitespace in the URL, unresolvable host, or the host is not a public IP.'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
description: Webhooks require a paid plan, or the plan's endpoint cap is reached (solo 3, team 10, scale 25).
'409':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
description: An endpoint with this URL already exists.
'429':
$ref: '#/components/responses/RateLimited'
'500':
$ref: '#/components/responses/ServerError'
summary: Create a webhook endpoint
tags:
- Webhooks
/v1/webhooks/{id}:
delete:
operationId: delete_webhook
parameters:
- description: Endpoint id.
in: path
name: id
required: true
schema:
format: uuid
type: string
responses:
'204':
description: Endpoint deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'404':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
description: No such webhook endpoint on this account.
'429':
$ref: '#/components/responses/RateLimited'
'500':
$ref: '#/components/responses/ServerError'
summary: Delete a webhook endpoint
tags:
- Webhooks
/v1/webhooks/{id}/deliveries:
get:
description: Newest first. Finished deliveries are kept 7 days; pending ones are never purged.
operationId: list_webhook_deliveries
parameters:
- description: Endpoint id.
in: path
name: id
required: true
schema:
format: uuid
type: string
- description: Rows to return, clamped to 1–200.
in: query
name: limit
required: false
schema:
default: 50
maximum: 200
minimum: 1
type: integer
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/WebhookDeliveryList'
description: Recent deliveries.
'401':
$ref: '#/components/responses/Unauthorized'
'404':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
description: No such webhook endpoint on this account.
'429':
$ref: '#/components/responses/RateLimited'
'500':
$ref: '#/components/responses/ServerError'
summary: List delivery history
tags:
- Webhooks
/v1/webhooks/{id}/enable:
post:
description: Clears the disabled state and resets the consecutive-failure counter.
operationId: enable_webhook
parameters:
- description: Endpoint id.
in: path
name: id
required: true
schema:
format: uuid
type: string
responses:
'204':
description: Endpoint re-enabled.
'401':
$ref: '#/components/responses/Unauthorized'
'404':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
description: No such webhook endpoint on this account.
'429':
$ref: '#/components/responses/RateLimited'
'500':
$ref: '#/components/responses/ServerError'
summary: Re-enable a disabled endpoint
tags:
- Webhooks
/v1/webhooks/{id}/test:
post:
description: Enqueues an `endpoint.test` delivery through the normal signed pipeline.
operationId: test_webhook
parameters:
- description: Endpoint id.
in: path
name: id
required: true
schema:
format: uuid
type: string
responses:
'202':
content:
application/json:
schema:
$ref: '#/components/schemas/WebhookTestAccepted'
description: Test delivery enqueued.
'401':
$ref: '#/components/responses/Unauthorized'
'404':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
description: No such webhook endpoint on this account.
'409':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
description: The endpoint is disabled — enable it first.
'429':
$ref: '#/components/responses/RateLimited'
'500':
$ref: '#/components/responses/ServerError'
summary: Send a test event
tags:
- Webhooks
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
CreateWebhookRequest:
properties:
description:
description: Optional; blank is treated as none.
type: string
url:
description: Must be https and resolve to a public IP.
format: uri
type: string
required:
- url
type: object
WebhookDelivery:
properties:
attempts:
type: integer
created_at:
format: date-time
type: string
delivered_at:
format: date-time
type:
- string
- 'null'
event_type:
description: message.received, sms.received, domain.verified, or endpoint.test.
type: string
id:
description: Delivery id — also the envelope's idempotency key and the X-MailFixture-Delivery header.
format: uuid
type: string
last_error:
type:
- string
- 'null'
last_status_code:
type:
- integer
- 'null'
next_attempt_at:
format: date-time
type: string
status:
enum:
- pending
- succeeded
- failed
type: string
required:
- id
- event_type
- status
- attempts
- next_attempt_at
- last_status_code
- last_error
- created_at
- delivered_at
type: object
WebhookList:
properties:
webhooks:
items:
$ref: '#/components/schemas/Webhook'
type: array
required:
- webhooks
type: object
Webhook:
properties:
consecutive_failures:
type: integer
created_at:
format: date-time
type: string
description:
type:
- string
- 'null'
disabled_at:
format: date-time
type:
- string
- 'null'
disabled_reason:
type:
- string
- 'null'
id:
format: uuid
type: string
secret_hint:
description: '`whsec_…` plus the secret''s last 4 chars.'
type: string
url:
type: string
required:
- id
- url
- description
- secret_hint
- consecutive_failures
- disabled_at
- disabled_reason
- created_at
type: object
WebhookDeliveryList:
properties:
deliveries:
items:
$ref: '#/components/schemas/WebhookDelivery'
type: array
required:
- deliveries
type: object
WebhookCreated:
properties:
created_at:
format: date-time
type: string
description:
type:
- string
- 'null'
id:
format: uuid
type: string
secret:
description: Signing secret (`whsec_…`) — shown exactly once; lists only carry a hint.
type: string
url:
type: string
required:
- id
- url
- description
- secret
- created_at
type: object
WebhookTestAccepted:
properties:
delivery_id:
format: uuid
type: string
required:
- delivery_id
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