Error
{ "error": "string", "code": "string"}Scoped REST API for programmable inbound email inboxes. Create inboxes, read messages, extract authentication artifacts, receive SSE events, and manage signed webhooks.
Create a key in Relay Account settings. Keys are shown once and never stored in plaintext.
Send Authorization: Bearer rl_live_... on every request. Keys are created on /account and shown once.
/domainsAuth: Bearer API key with inboxes:read.
200 Available domains. · application/json
400 Invalid request. · application/json
401 Missing, invalid, revoked, or expired API key. · application/json
403 The API key does not have the required scope or access. · application/json
404 Resource not found. · application/json
409 The requested resource conflicts with an existing resource. · application/json
429 Rate limit exceeded. · application/json
curl "https://www.relaymcp.net/api/v1/domains" \ -H "Authorization: Bearer $RELAY_API_KEY"/inboxesAuth: Bearer API key with inboxes:read.
| Parameter | In | Required | Description |
|---|---|---|---|
cursor | query | No | Cursor returned by the previous page. |
200 Cursor-paginated inboxes. · application/json
400 Invalid request. · application/json
401 Missing, invalid, revoked, or expired API key. · application/json
403 The API key does not have the required scope or access. · application/json
404 Resource not found. · application/json
409 The requested resource conflicts with an existing resource. · application/json
429 Rate limit exceeded. · application/json
curl "https://www.relaymcp.net/api/v1/inboxes?cursor=CURSOR" \ -H "Authorization: Bearer $RELAY_API_KEY"/inboxesAuth: Bearer API key with inboxes:write.
Optional
{
"name": "build-checks",
"domain": "mail.example.net"
}201 Created inbox. · application/json
400 Invalid request. · application/json
401 Missing, invalid, revoked, or expired API key. · application/json
403 The API key does not have the required scope or access. · application/json
404 Resource not found. · application/json
409 The requested resource conflicts with an existing resource. · application/json
429 Rate limit exceeded. · application/json
503 No active mail domain is available. · application/json
curl -X POST "https://www.relaymcp.net/api/v1/inboxes" \ -H "Authorization: Bearer $RELAY_API_KEY" \ -H "Content-Type: application/json" \ -d '{"name":"build-checks","domain":"mail.example.net"}'/inboxes/{inboxId}Auth: Bearer API key with inboxes:read.
| Parameter | In | Required | Description |
|---|---|---|---|
inboxId | path | Yes | Inbox ID. |
200 Inbox metadata. · application/json
400 Invalid request. · application/json
401 Missing, invalid, revoked, or expired API key. · application/json
403 The API key does not have the required scope or access. · application/json
404 Resource not found. · application/json
409 The requested resource conflicts with an existing resource. · application/json
429 Rate limit exceeded. · application/json
curl "https://www.relaymcp.net/api/v1/inboxes/INBOX_ID" \ -H "Authorization: Bearer $RELAY_API_KEY"/inboxes/{inboxId}/attachments/{attachmentId}Auth: Bearer API key with messages:read.
| Parameter | In | Required | Description |
|---|---|---|---|
inboxId | path | Yes | Inbox ID. |
attachmentId | path | Yes | Attachment ID. |
200 Binary attachment. · application/octet-stream
400 Invalid request. · application/json
401 Missing, invalid, revoked, or expired API key. · application/json
403 The API key does not have the required scope or access. · application/json
404 Resource not found. · application/json
409 The requested resource conflicts with an existing resource. · application/json
429 Rate limit exceeded. · application/json
curl "https://www.relaymcp.net/api/v1/inboxes/INBOX_ID/attachments/ATTACHMENT_ID" \ -H "Authorization: Bearer $RELAY_API_KEY" \ -o "attachment.bin"Use the sample request for streaming or binary responses in your terminal or HTTP client.
/inboxes/{inboxId}/messagesAuth: Bearer API key with messages:read.
| Parameter | In | Required | Description |
|---|---|---|---|
inboxId | path | Yes | Inbox ID. |
limit | query | No | Number of messages to return. |
cursor | query | No | Cursor returned by the previous page. |
200 Message preview page. · application/json
400 Invalid request. · application/json
401 Missing, invalid, revoked, or expired API key. · application/json
403 The API key does not have the required scope or access. · application/json
404 Resource not found. · application/json
409 The requested resource conflicts with an existing resource. · application/json
429 Rate limit exceeded. · application/json
curl "https://www.relaymcp.net/api/v1/inboxes/INBOX_ID/messages?limit=30&cursor=CURSOR" \ -H "Authorization: Bearer $RELAY_API_KEY"/inboxes/{inboxId}/messages/{messageId}Auth: Bearer API key with messages:read.
| Parameter | In | Required | Description |
|---|---|---|---|
inboxId | path | Yes | Inbox ID. |
messageId | path | Yes | Message ID. |
200 Full message with sanitized HTML and attachment metadata. · application/json
400 Invalid request. · application/json
401 Missing, invalid, revoked, or expired API key. · application/json
403 The API key does not have the required scope or access. · application/json
404 Resource not found. · application/json
409 The requested resource conflicts with an existing resource. · application/json
429 Rate limit exceeded. · application/json
curl "https://www.relaymcp.net/api/v1/inboxes/INBOX_ID/messages/MESSAGE_ID" \ -H "Authorization: Bearer $RELAY_API_KEY"/inboxes/{inboxId}/messages/{messageId}/authAuth: Bearer API key with messages:read.
| Parameter | In | Required | Description |
|---|---|---|---|
inboxId | path | Yes | Inbox ID. |
messageId | path | Yes | Message ID. |
200 Authentication artifact extraction result. · application/json
400 Invalid request. · application/json
401 Missing, invalid, revoked, or expired API key. · application/json
403 The API key does not have the required scope or access. · application/json
404 Resource not found. · application/json
409 The requested resource conflicts with an existing resource. · application/json
429 Rate limit exceeded. · application/json
curl "https://www.relaymcp.net/api/v1/inboxes/INBOX_ID/messages/MESSAGE_ID/auth" \ -H "Authorization: Bearer $RELAY_API_KEY"/inboxes/{inboxId}/messages/{messageId}/otpAuth: Bearer API key with messages:read.
| Parameter | In | Required | Description |
|---|---|---|---|
inboxId | path | Yes | Inbox ID. |
messageId | path | Yes | Message ID. |
200 OTP extraction result. · application/json
400 Invalid request. · application/json
401 Missing, invalid, revoked, or expired API key. · application/json
403 The API key does not have the required scope or access. · application/json
404 Resource not found. · application/json
409 The requested resource conflicts with an existing resource. · application/json
429 Rate limit exceeded. · application/json
curl "https://www.relaymcp.net/api/v1/inboxes/INBOX_ID/messages/MESSAGE_ID/otp" \ -H "Authorization: Bearer $RELAY_API_KEY"/eventsConnections last up to ten minutes and poll at five-second intervals while the client consumes events. Keys and scopes are revalidated per poll. At most three streams per account are allowed in each server process. Resume after disconnection using the last numeric event ID.
Auth: Bearer API key with events:read.
| Parameter | In | Required | Description |
|---|---|---|---|
after | query | No | Last event ID already received. |
limit | query | No | Upper bound per poll; responses may contain fewer events to respect server byte and batch limits. |
200 text/event-stream containing typed events and heartbeat events. · text/event-stream
400 Invalid request. · application/json
401 Missing, invalid, revoked, or expired API key. · application/json
403 The API key does not have the required scope or access. · application/json
404 Resource not found. · application/json
409 The requested resource conflicts with an existing resource. · application/json
429 Rate limit exceeded. · application/json
curl "https://www.relaymcp.net/api/v1/events?after=0&limit=100" \ -H "Authorization: Bearer $RELAY_API_KEY"Use the sample request for streaming or binary responses in your terminal or HTTP client.
/webhooksAuth: Bearer API key with webhooks:read.
200 Webhook endpoints. The signing secret is never returned after creation. · application/json
400 Invalid request. · application/json
401 Missing, invalid, revoked, or expired API key. · application/json
403 The API key does not have the required scope or access. · application/json
404 Resource not found. · application/json
409 The requested resource conflicts with an existing resource. · application/json
429 Rate limit exceeded. · application/json
curl "https://www.relaymcp.net/api/v1/webhooks" \ -H "Authorization: Bearer $RELAY_API_KEY"/webhooksAuth: Bearer API key with webhooks:write.
Required
{
"url": "https://hooks.example.com/relay",
"events": [
"inbox.message.received"
]
}201 Created webhook. Save the one-time secret. · application/json
400 Invalid request. · application/json
401 Missing, invalid, revoked, or expired API key. · application/json
403 The API key does not have the required scope or access. · application/json
404 Resource not found. · application/json
409 The requested resource conflicts with an existing resource. · application/json
429 Rate limit exceeded. · application/json
curl -X POST "https://www.relaymcp.net/api/v1/webhooks" \ -H "Authorization: Bearer $RELAY_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url":"https://hooks.example.com/relay","events":["inbox.message.received"]}'/webhooks/{webhookId}Auth: Bearer API key with webhooks:write.
| Parameter | In | Required | Description |
|---|---|---|---|
webhookId | path | Yes | Webhook ID. |
200 Webhook deleted. · application/json
400 Invalid request. · application/json
401 Missing, invalid, revoked, or expired API key. · application/json
403 The API key does not have the required scope or access. · application/json
404 Resource not found. · application/json
409 The requested resource conflicts with an existing resource. · application/json
429 Rate limit exceeded. · application/json
curl -X DELETE "https://www.relaymcp.net/api/v1/webhooks/WEBHOOK_ID" \ -H "Authorization: Bearer $RELAY_API_KEY"/webhooks/{webhookId}Auth: Bearer API key with webhooks:read.
| Parameter | In | Required | Description |
|---|---|---|---|
webhookId | path | Yes | Webhook ID. |
200 Recent deliveries. · application/json
400 Invalid request. · application/json
401 Missing, invalid, revoked, or expired API key. · application/json
403 The API key does not have the required scope or access. · application/json
404 Resource not found. · application/json
409 The requested resource conflicts with an existing resource. · application/json
429 Rate limit exceeded. · application/json
curl "https://www.relaymcp.net/api/v1/webhooks/WEBHOOK_ID" \ -H "Authorization: Bearer $RELAY_API_KEY"Component schemas from the OpenAPI document.
Error{ "error": "string", "code": "string"}Domain{ "id": "string", "name": "string", "tier": "free"}Inbox{ "id": "string", "address": "string", "owned": true}CreateInboxRequest{ "name": "string", "domain": "string"}InboxPage{ "inboxes": [ { "id": "string", "address": "string", "owned": true } ], "nextCursor": null}MessagePreview{ "id": "string", "sender": null, "sender_address": null, "subject": null, "preview": null, "created": 0, "time": "2026-01-01T00:00:00.000Z", "size_bytes": 0, "source": null, "attachment_count": 0}Message{ "id": "string", "sender": null, "sender_address": null, "subject": null, "preview": null, "created": 0, "time": "2026-01-01T00:00:00.000Z", "size_bytes": 0, "source": null, "attachment_count": 0, "recipient": null, "body": null, "html": null, "message_id": null, "attachments": [ { "id": null, "filename": null, "content_type": null, "size_bytes": null, "sha256": null } ]}MessagePage{ "messages": [ { "id": "string", "sender": null, "sender_address": null, "subject": null, "preview": null, "created": 0, "time": "2026-01-01T00:00:00.000Z", "size_bytes": 0, "source": null, "attachment_count": 0 } ], "nextCursor": null}Attachment{ "id": "string", "filename": "string", "content_type": "string", "size_bytes": 0, "sha256": "string"}OtpResult{ "found": true, "ambiguous": true, "code": null, "confidence": "none"}AuthArtifacts{ "otp": { "found": true, "ambiguous": true, "code": null, "confidence": "none" }, "links": [ "string" ], "magicLink": null}CreateWebhookRequest{ "url": "string", "events": [ "string" ]}Webhook{ "id": "string", "url": "string", "events": [ "string" ], "active": true, "created": 0, "updated": 0}CreatedWebhook{ "id": "string", "url": "string", "events": [ "string" ], "active": true, "created": 0, "updated": 0, "secret": "string"}WebhookDelivery{ "id": "string", "endpoint_id": "string", "event_id": 0, "attempt": 0, "state": "string", "next_attempt": null, "response_status": null, "last_error": null, "created": 0, "delivered": null}Machine-readable contract: /openapi.json
Longer technical guides that expand on the API reference, MCP tools, security model, and testing patterns.