{
  "info": {
    "name": "RelayMCP Official API",
    "description": "Generated from RelayMCP OpenAPI 3.1. Configure the selected environment with an API key before running requests. No credentials are included.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "version": "1.0.0"
  },
  "variable": [
    {
      "key": "base_url",
      "value": "https://www.relaymcp.net/api/v1"
    },
    {
      "key": "inbox_id",
      "value": ""
    },
    {
      "key": "message_id",
      "value": ""
    },
    {
      "key": "attachment_id",
      "value": ""
    },
    {
      "key": "webhook_id",
      "value": ""
    }
  ],
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{api_key}}",
        "type": "string"
      }
    ]
  },
  "item": [
    {
      "name": "Domains",
      "item": [
        {
          "name": "List available Free mail domains",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/domains",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "domains"
              ]
            },
            "description": "List available Free mail domains",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{api_key}}",
                  "type": "string"
                }
              ]
            }
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.environment.get('api_key')) pm.execution.skipRequest();"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 401 && !pm.environment.get('api_key')) { pm.test('configure api_key for authenticated requests', () => pm.expect(true).to.eql(true)); } else {",
                  "  (() => { pm.test('status is 200', () => pm.response.to.have.status(200)); })();",
                  "  (() => { const json = pm.response.json(); pm.test('domains is an array', () => pm.expect(json.domains).to.be.an('array')); if (json.domains?.[0]?.name) pm.environment.set('mail_domain', json.domains[0].name); })();",
                  "}"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "Inboxes",
      "item": [
        {
          "name": "List the authenticated account's inboxes",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/inboxes",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "inboxes"
              ],
              "query": [
                {
                  "key": "cursor",
                  "value": "{{inbox_cursor}}",
                  "description": "Cursor returned by the previous page.",
                  "disabled": true
                }
              ]
            },
            "description": "List the authenticated account's inboxes",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{api_key}}",
                  "type": "string"
                }
              ]
            }
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.environment.get('api_key')) pm.execution.skipRequest();"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 401 && !pm.environment.get('api_key')) { pm.test('configure api_key for authenticated requests', () => pm.expect(true).to.eql(true)); } else {",
                  "  (() => { pm.test('status is 200', () => pm.response.to.have.status(200)); })();",
                  "  (() => { const json = pm.response.json(); pm.test('inboxes page is valid', () => { pm.expect(json.inboxes).to.be.an('array'); pm.expect(json).to.have.property('nextCursor'); }); })();",
                  "  (() => { const json = pm.response.json(); if (json.nextCursor) pm.environment.set('inbox_cursor', json.nextCursor); })();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Create an inbox",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/inboxes",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "inboxes"
              ]
            },
            "description": "Create an inbox",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{api_key}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"postman-checks\",\n  \"domain\": \"{{mail_domain}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.environment.get('api_key')) pm.execution.skipRequest();"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 401 && !pm.environment.get('api_key')) { pm.test('configure api_key for authenticated requests', () => pm.expect(true).to.eql(true)); } else {",
                  "  (() => { pm.test('status is 201', () => pm.response.to.have.status(201)); })();",
                  "  (() => { const json = pm.response.json(); pm.test('created inbox is valid', () => { pm.expect(json.inbox).to.be.an('object'); pm.expect(json.inbox.id).to.be.a('string'); pm.expect(json.inbox.address).to.be.a('string'); }); })();",
                  "  (() => { const json = pm.response.json(); pm.environment.set('inbox_id', json.inbox.id); pm.environment.set('email_address', json.inbox.address); })();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Get inbox metadata",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/inboxes/{{inbox_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "inboxes",
                "{{inbox_id}}"
              ]
            },
            "description": "Get inbox metadata",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{api_key}}",
                  "type": "string"
                }
              ]
            }
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.environment.get('api_key')) pm.execution.skipRequest();"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 401 && !pm.environment.get('api_key')) { pm.test('configure api_key for authenticated requests', () => pm.expect(true).to.eql(true)); } else {",
                  "  (() => { pm.test('status is 200', () => pm.response.to.have.status(200)); })();",
                  "  (() => { pm.test('inbox response is valid', () => pm.expect(pm.response.json().inbox.id).to.be.a('string')); })();",
                  "}"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "Messages",
      "item": [
        {
          "name": "List message previews",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/inboxes/{{inbox_id}}/messages",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "inboxes",
                "{{inbox_id}}",
                "messages"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "30",
                  "description": "Number of messages to return.",
                  "disabled": false
                },
                {
                  "key": "cursor",
                  "value": "{{inbox_cursor}}",
                  "description": "Cursor returned by the previous page.",
                  "disabled": true
                }
              ]
            },
            "description": "List message previews",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{api_key}}",
                  "type": "string"
                }
              ]
            }
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.environment.get('api_key')) pm.execution.skipRequest();"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 401 && !pm.environment.get('api_key')) { pm.test('configure api_key for authenticated requests', () => pm.expect(true).to.eql(true)); } else {",
                  "  (() => { pm.test('status is 200', () => pm.response.to.have.status(200)); })();",
                  "  (() => { const json = pm.response.json(); pm.test('message page is valid', () => { pm.expect(json.messages).to.be.an('array'); pm.expect(json).to.have.property('nextCursor'); }); })();",
                  "  (() => { const json = pm.response.json(); if (json.messages?.[0]?.id) pm.environment.set('message_id', json.messages[0].id); if (json.messages?.[0]?.attachment_count > 0) pm.environment.set('attachment_id', ''); })();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Read a full message",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/inboxes/{{inbox_id}}/messages/{{message_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "inboxes",
                "{{inbox_id}}",
                "messages",
                "{{message_id}}"
              ]
            },
            "description": "Read a full message",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{api_key}}",
                  "type": "string"
                }
              ]
            }
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.environment.get('api_key')) pm.execution.skipRequest();"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 401 && !pm.environment.get('api_key')) { pm.test('configure api_key for authenticated requests', () => pm.expect(true).to.eql(true)); } else {",
                  "  (() => { pm.test('status is 200', () => pm.response.to.have.status(200)); })();",
                  "  (() => { pm.test('message response is valid', () => pm.expect(pm.response.json().message.id).to.be.a('string')); })();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Extract a one-time password",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/inboxes/{{inbox_id}}/messages/{{message_id}}/otp",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "inboxes",
                "{{inbox_id}}",
                "messages",
                "{{message_id}}",
                "otp"
              ]
            },
            "description": "Extract a one-time password",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{api_key}}",
                  "type": "string"
                }
              ]
            }
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.environment.get('api_key')) pm.execution.skipRequest();"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 401 && !pm.environment.get('api_key')) { pm.test('configure api_key for authenticated requests', () => pm.expect(true).to.eql(true)); } else {",
                  "  (() => { pm.test('status is 200', () => pm.response.to.have.status(200)); })();",
                  "  (() => { const json = pm.response.json(); pm.test('otp result is valid', () => pm.expect(json.otp).to.be.an('object')); if (json.otp?.code) pm.environment.set('verification_code', json.otp.code); })();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Extract OTP and authentication links",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/inboxes/{{inbox_id}}/messages/{{message_id}}/auth",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "inboxes",
                "{{inbox_id}}",
                "messages",
                "{{message_id}}",
                "auth"
              ]
            },
            "description": "Extract OTP and authentication links",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{api_key}}",
                  "type": "string"
                }
              ]
            }
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.environment.get('api_key')) pm.execution.skipRequest();"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 401 && !pm.environment.get('api_key')) { pm.test('configure api_key for authenticated requests', () => pm.expect(true).to.eql(true)); } else {",
                  "  (() => { pm.test('status is 200', () => pm.response.to.have.status(200)); })();",
                  "  (() => { const json = pm.response.json(); pm.test('auth result is valid', () => { pm.expect(json.auth).to.be.an('object'); pm.expect(json.auth.links).to.be.an('array'); }); if (json.auth?.otp?.code) pm.environment.set('verification_code', json.auth.otp.code); })();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Download an attachment",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/octet-stream"
              }
            ],
            "url": {
              "raw": "{{base_url}}/inboxes/{{inbox_id}}/attachments/{{attachment_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "inboxes",
                "{{inbox_id}}",
                "attachments",
                "{{attachment_id}}"
              ]
            },
            "description": "Download an attachment",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{api_key}}",
                  "type": "string"
                }
              ]
            }
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.environment.get('api_key')) pm.execution.skipRequest();"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 401 && !pm.environment.get('api_key')) { pm.test('configure api_key for authenticated requests', () => pm.expect(true).to.eql(true)); } else {",
                  "  (() => { pm.test('status is 200', () => pm.response.to.have.status(200)); })();",
                  "  (() => { pm.test('attachment is binary', () => pm.expect(pm.response.headers.get('content-type')).to.exist); })();",
                  "}"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "Events",
      "item": [
        {
          "name": "Stream account events over SSE",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "text/event-stream"
              }
            ],
            "url": {
              "raw": "{{base_url}}/events",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "events"
              ],
              "query": [
                {
                  "key": "after",
                  "value": "{{after}}",
                  "description": "Last event ID already received.",
                  "disabled": false
                },
                {
                  "key": "limit",
                  "value": "100",
                  "description": "Upper bound per poll; responses may contain fewer events to respect server byte and batch limits.",
                  "disabled": false
                }
              ]
            },
            "description": "Connections 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": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{api_key}}",
                  "type": "string"
                }
              ]
            }
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.environment.get('api_key')) pm.execution.skipRequest();"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 401 && !pm.environment.get('api_key')) { pm.test('configure api_key for authenticated requests', () => pm.expect(true).to.eql(true)); } else {",
                  "  (() => { pm.test('request succeeded', () => pm.expect(pm.response.code).to.be.below(400)); })();",
                  "}"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "Webhooks",
      "item": [
        {
          "name": "List webhook endpoints",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/webhooks",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "webhooks"
              ]
            },
            "description": "List webhook endpoints",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{api_key}}",
                  "type": "string"
                }
              ]
            }
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.environment.get('api_key')) pm.execution.skipRequest();"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 401 && !pm.environment.get('api_key')) { pm.test('configure api_key for authenticated requests', () => pm.expect(true).to.eql(true)); } else {",
                  "  (() => { pm.test('status is 200', () => pm.response.to.have.status(200)); })();",
                  "  (() => { pm.test('webhooks is an array', () => pm.expect(pm.response.json().webhooks).to.be.an('array')); })();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Create a signed webhook endpoint",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/webhooks",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "webhooks"
              ]
            },
            "description": "Create a signed webhook endpoint",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{api_key}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"url\": \"https://hooks.example.com/relay\",\n  \"events\": [\n    \"inbox.message.received\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.environment.get('api_key')) pm.execution.skipRequest();"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 401 && !pm.environment.get('api_key')) { pm.test('configure api_key for authenticated requests', () => pm.expect(true).to.eql(true)); } else {",
                  "  (() => { pm.test('status is 201', () => pm.response.to.have.status(201)); })();",
                  "  (() => { const json = pm.response.json(); pm.test('webhook is valid', () => { pm.expect(json.id).to.be.a('string'); pm.expect(json.secret).to.be.a('string'); }); pm.environment.set('webhook_id', json.id); pm.environment.set('webhook_secret', json.secret); })();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "List webhook delivery history",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/webhooks/{{webhook_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "webhooks",
                "{{webhook_id}}"
              ]
            },
            "description": "List webhook delivery history",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{api_key}}",
                  "type": "string"
                }
              ]
            }
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.environment.get('api_key')) pm.execution.skipRequest();"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 401 && !pm.environment.get('api_key')) { pm.test('configure api_key for authenticated requests', () => pm.expect(true).to.eql(true)); } else {",
                  "  (() => { pm.test('status is 200', () => pm.response.to.have.status(200)); })();",
                  "  (() => { pm.test('deliveries is an array', () => pm.expect(pm.response.json().deliveries).to.be.an('array')); })();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Delete a webhook endpoint",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/webhooks/{{webhook_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "webhooks",
                "{{webhook_id}}"
              ]
            },
            "description": "Delete a webhook endpoint",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{api_key}}",
                  "type": "string"
                }
              ]
            }
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.environment.get('api_key')) pm.execution.skipRequest();"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 401 && !pm.environment.get('api_key')) { pm.test('configure api_key for authenticated requests', () => pm.expect(true).to.eql(true)); } else {",
                  "  (() => { pm.test('status is 200', () => pm.response.to.have.status(200)); })();",
                  "  (() => { pm.test('webhook was deleted', () => pm.expect(pm.response.json().deleted).to.eql(true)); })();",
                  "}"
                ]
              }
            }
          ]
        }
      ]
    }
  ]
}
