Skip to Content
MailroomMailroom home

Dry-run a policy against a hypothetical email

POST
/policies/{id}/simulate

Authorization

bearerAuth
headerAuthorizationBearer <mr_live_ / mr_test_>

API key. Never log the secret.

Path Parameters

id*string

Request Body

application/json
  1. body
from*string
to*array<>
cc?array<>
bcc?array<>
reply_to?string
subject*string
html?string
text?string
template_id?string
variables?
attachments?array<>
headers?
tags?array<>
metadata?
scheduled_at?string
Formatdate-time
dry_run?boolean

Forces the sandbox transport for this message.

stream?Stream
Value in"transactional""broadcast""agent"
agent_id?string
thread_id?string

Response Body

Decision

application/json
  1. response
decision?string
Value in"allow""require_approval""deny""allow_with_delay""pause_agent"
matched_rule?string|null
policy_id?string
version?integer
Example Request
curl -X POST 'https://api.mailroom.gosuevals.com/v1/policies/string/simulate' \  -H 'Content-Type: application/json' \  -d '{  "from": "string",  "to": [    "user@example.com"  ],  "subject": "string"}'
Example Response200
{  "decision": "allow",  "matched_rule": "string",  "policy_id": "string",  "version": 0}