Create an active email filtering rule for the authenticated account.
For an explicit rule, configure one or more of subject, from, to, hasAttachment, and hasWords. Different configured criteria are combined with AND. Within a criterion, OR matches any value and AND requires every value.
Address criteria support exact, case-insensitive addresses and whole-domain patterns such as *@example.com. The to criterion matches the actual delivered recipient, which makes it suitable for limiting a rule to one inbox. Subject and body criteria use case-insensitive substring matching.
Rules are evaluated from highest priority to lowest, and the first matching rule wins. A matching rule can allow, block, mark as junk, or route the email to an active endpoint owned by the account. If action is omitted, it defaults to allow. junk marks the email as junk without blocking it: it is still delivered to endpoints (with spam.isJunk: true in the webhook) and appears in mailbox Junk folders. allow also marks the email as not junk, overriding the spam filter.
For an ai_prompt rule, provide a non-empty natural-language prompt describing when the rule should match.
POST
/
api
/
e2
/
guard
TypeScript
import Inbound from "inboundemail";
const inbound = new Inbound();
const result = await inbound.guard.create({
name: "Block suspicious support invoices",
type: "explicit",
config: {
to: {
operator: "OR",
values: [
"support@example.com"
]
},
subject: {
operator: "OR",
values: [
"invoice",
"payment overdue"
]
},
hasAttachment: true
},
description: "Block invoice emails with attachments sent to support.",
priority: 100,
action: {
action: "block"
}
});
Action to take when the rule matches: allow (also marks the email as not junk), block, junk, or route to an owned endpoint. Defaults to allow when omitted.
{"docsConfig":{"theme":"almond","$schema":"https://mintlify.com/docs.json","name":"inbound","colors":{"primary":"#8161FF","light":"#8161FF","dark":"#8161FF"},"logo":{"light":"https://mintcdn.com/inbound/9X4YbAqu-aoC72gx/logo/light.svg?fit=max\u0026auto=format\u0026n=9X4YbAqu-aoC72gx\u0026q=85\u0026s=e69d7ac2088d0df4183778cec514579b","dark":"https://mintcdn.com/inbound/9X4YbAqu-aoC72gx/logo/dark.svg?fit=max\u0026auto=format\u0026n=9X4YbAqu-aoC72gx\u0026q=85\u0026s=4ea108060d4b108db09c4372600b9a0a"},"favicon":"https://mintcdn.com/inbound/9X4YbAqu-aoC72gx/favicon.svg?fit=max\u0026auto=format\u0026n=9X4YbAqu-aoC72gx\u0026q=85\u0026s=14120b3a3cda1e2520075cbbf4671ead","appearance":{"default":"dark"},"background":{"color":{"light":"#FAFAF9"}},"navbar":{"links":[{"href":"https://inbound.new/logs","label":"Mail Flow"}],"primary":{"type":"button","label":"Get Started","href":"https://inbound.new"}},"footer":{"socials":{"github":"https://github.com/r44vc0rp/inbound"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"inbound","hasAudioNarration":false,"actualSubdomain":"inbound","customDomains":["inbound.new"],"gitSource":{"type":"github","owner":"inboundemail","repo":"inbound","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae67adac064cc679ece80b6","collectionId":"054936fd-a0aa-47d2-90ec-55fccec5c3ed","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae67adac064cc679ece80b6"},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6ae67adac064cc679ece80b6","clientVersion":"0.0.4076","searchFilterCounts":[{"language":"default","tag":"API Reference","count":89},{"language":"default","tag":"Mailboxes","count":42},{"language":"default","tag":"Documentation","count":15},{"language":"default","tag":"Mailboxes \u0026 SMTP","count":11},{"language":"default","tag":"Emails","count":9},{"language":"default","tag":"Guard","count":7},{"language":"default","tag":"Domains","count":6},{"language":"default","tag":"Endpoints","count":6},{"language":"default","tag":"Overview","count":5},{"language":"default","tag":"Email Addresses","count":5}]},"assistantConfig":{"deflection":{"enabled":true,"email":"support@inbound.new","showHelpButton":true}},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[],"page":{"pagePath":"api-reference/guard/create-guard-rule","slug":"/api-reference/guard/create-guard-rule","pageMetadata":{"title":"Create guard rule","description":"Create an active email filtering rule for the authenticated account.\n\nFor an `explicit` rule, configure one or more of `subject`, `from`, `to`, `hasAttachment`, and `hasWords`. Different configured criteria are combined with AND. Within a criterion, `OR` matches any value and `AND` requires every value.\n\nAddress criteria support exact, case-insensitive addresses and whole-domain patterns such as `*@example.com`. The `to` criterion matches the actual delivered recipient, which makes it suitable for limiting a rule to one inbox. Subject and body criteria use case-insensitive substring matching.\n\nRules are evaluated from highest priority to lowest, and the first matching rule wins. A matching rule can `allow`, `block`, mark as `junk`, or `route` the email to an active endpoint owned by the account. If action is omitted, it defaults to `allow`. `junk` marks the email as junk without blocking it: it is still delivered to endpoints (with `spam.isJunk: true` in the webhook) and appears in mailbox Junk folders. `allow` also marks the email as not junk, overriding the spam filter.\n\nFor an `ai_prompt` rule, provide a non-empty natural-language `prompt` describing when the rule should match.","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json post /api/e2/guard","href":"/api-reference/guard/create-guard-rule","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Create an active email filtering rule for the authenticated account.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"For an \", _jsx(_components.code, {\n children: \"explicit\"\n }), \" rule, configure one or more of \", _jsx(_components.code, {\n children: \"subject\"\n }), \", \", _jsx(_components.code, {\n children: \"from\"\n }), \", \", _jsx(_components.code, {\n children: \"to\"\n }), \", \", _jsx(_components.code, {\n children: \"hasAttachment\"\n }), \", and \", _jsx(_components.code, {\n children: \"hasWords\"\n }), \". Different configured criteria are combined with AND. Within a criterion, \", _jsx(_components.code, {\n children: \"OR\"\n }), \" matches any value and \", _jsx(_components.code, {\n children: \"AND\"\n }), \" requires every value.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Address criteria support exact, case-insensitive addresses and whole-domain patterns such as \", _jsx(_components.code, {\n children: \"*@example.com\"\n }), \". The \", _jsx(_components.code, {\n children: \"to\"\n }), \" criterion matches the actual delivered recipient, which makes it suitable for limiting a rule to one inbox. Subject and body criteria use case-insensitive substring matching.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Rules are evaluated from highest priority to lowest, and the first matching rule wins. A matching rule can \", _jsx(_components.code, {\n children: \"allow\"\n }), \", \", _jsx(_components.code, {\n children: \"block\"\n }), \", mark as \", _jsx(_components.code, {\n children: \"junk\"\n }), \", or \", _jsx(_components.code, {\n children: \"route\"\n }), \" the email to an active endpoint owned by the account. If action is omitted, it defaults to \", _jsx(_components.code, {\n children: \"allow\"\n }), \". \", _jsx(_components.code, {\n children: \"junk\"\n }), \" marks the email as junk without blocking it: it is still delivered to endpoints (with \", _jsx(_components.code, {\n children: \"spam.isJunk: true\"\n }), \" in the webhook) and appears in mailbox Junk folders. \", _jsx(_components.code, {\n children: \"allow\"\n }), \" also marks the email as not junk, overriding the spam filter.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"For an \", _jsx(_components.code, {\n children: \"ai_prompt\"\n }), \" rule, provide a non-empty natural-language \", _jsx(_components.code, {\n children: \"prompt\"\n }), \" describing when the rule should match.\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create guard rule","description":"Create an active email filtering rule for the authenticated account.\n\nFor an `explicit` rule, configure one or more of `subject`, `from`, `to`, `hasAttachment`, and `hasWords`. Different configured criteria are combined with AND. Within a criterion, `OR` matches any value and `AND` requires every value.\n\nAddress criteria support exact, case-insensitive addresses and whole-domain patterns such as `*@example.com`. The `to` criterion matches the actual delivered recipient, which makes it suitable for limiting a rule to one inbox. Subject and body criteria use case-insensitive substring matching.\n\nRules are evaluated from highest priority to lowest, and the first matching rule wins. A matching rule can `allow`, `block`, mark as `junk`, or `route` the email to an active endpoint owned by the account. If action is omitted, it defaults to `allow`. `junk` marks the email as junk without blocking it: it is still delivered to endpoints (with `spam.isJunk: true` in the webhook) and appears in mailbox Junk folders. `allow` also marks the email as not junk, overriding the spam filter.\n\nFor an `ai_prompt` rule, provide a non-empty natural-language `prompt` describing when the rule should match.","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json post /api/e2/guard","href":"/api-reference/guard/create-guard-rule","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Guard"],"summary":"Create guard rule","description":"Create an active email filtering rule for the authenticated account.\n\nFor an `explicit` rule, configure one or more of `subject`, `from`, `to`, `hasAttachment`, and `hasWords`. Different configured criteria are combined with AND. Within a criterion, `OR` matches any value and `AND` requires every value.\n\nAddress criteria support exact, case-insensitive addresses and whole-domain patterns such as `*@example.com`. The `to` criterion matches the actual delivered recipient, which makes it suitable for limiting a rule to one inbox. Subject and body criteria use case-insensitive substring matching.\n\nRules are evaluated from highest priority to lowest, and the first matching rule wins. A matching rule can `allow`, `block`, mark as `junk`, or `route` the email to an active endpoint owned by the account. If action is omitted, it defaults to `allow`. `junk` marks the email as junk without blocking it: it is still delivered to endpoints (with `spam.isJunk: true` in the webhook) and appears in mailbox Junk folders. `allow` also marks the email as not junk, overriding the spam filter.\n\nFor an `ai_prompt` rule, provide a non-empty natural-language `prompt` describing when the rule should match.","requestBody":"3db77be6-cca1-4fd1-b18f-3c18486a22e2","responses":{"201":"36b71ae5-d9ae-4ddb-8382-0151ca29ea64","400":"61f1781e-46a9-4d0f-a729-ddef5e0313ef","401":"2578058d-15fa-4790-9e92-dc549623f4a2","500":"d27cbf5e-08f6-43ab-95dd-957c00d681cd"},"operationId":"postApiE2Guard","x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import Inbound from \"inboundemail\";\n\nconst inbound = new Inbound();\nconst result = await inbound.guard.create({\n name: \"Block suspicious support invoices\",\n type: \"explicit\",\n config: {\n to: {\n operator: \"OR\",\n values: [\n \"support@example.com\"\n ]\n },\n subject: {\n operator: \"OR\",\n values: [\n \"invoice\",\n \"payment overdue\"\n ]\n },\n hasAttachment: true\n },\n description: \"Block invoice emails with attachments sent to support.\",\n priority: 100,\n action: {\n action: \"block\"\n }\n});"},{"lang":"curl","label":"cURL","source":"curl -X POST 'https://inbound.new/api/e2/guard' \\\n -H \"Authorization: Bearer $INBOUND_API_KEY\" \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"name\": \"Block suspicious support invoices\",\n \"type\": \"explicit\",\n \"config\": {\n \"to\": {\n \"operator\": \"OR\",\n \"values\": [\n \"support@example.com\"\n ]\n },\n \"subject\": {\n \"operator\": \"OR\",\n \"values\": [\n \"invoice\",\n \"payment overdue\"\n ]\n },\n \"hasAttachment\": true\n },\n \"description\": \"Block invoice emails with attachments sent to support.\",\n \"priority\": 100,\n \"action\": {\n \"action\": \"block\"\n }\n}'"}],"method":"post","type":"path","servers":["a6ff19d1-12ee-4cff-bb3c-f5e23b952134"],"security":["a21929c0-7ca0-4eed-85c4-490e145403c5"],"path":"/api/e2/guard","baseUrlOptions":["https://inbound.new"],"title":"Create guard rule","codeSamples":[{"label":"TypeScript","lang":"typescript","source":"import Inbound from \"inboundemail\";\n\nconst inbound = new Inbound();\nconst result = await inbound.guard.create({\n name: \"Block suspicious support invoices\",\n type: \"explicit\",\n config: {\n to: {\n operator: \"OR\",\n values: [\n \"support@example.com\"\n ]\n },\n subject: {\n operator: \"OR\",\n values: [\n \"invoice\",\n \"payment overdue\"\n ]\n },\n hasAttachment: true\n },\n description: \"Block invoice emails with attachments sent to support.\",\n priority: 100,\n action: {\n action: \"block\"\n }\n});"},{"label":"cURL","lang":"curl","source":"curl -X POST 'https://inbound.new/api/e2/guard' \\\n -H \"Authorization: Bearer $INBOUND_API_KEY\" \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"name\": \"Block suspicious support invoices\",\n \"type\": \"explicit\",\n \"config\": {\n \"to\": {\n \"operator\": \"OR\",\n \"values\": [\n \"support@example.com\"\n ]\n },\n \"subject\": {\n \"operator\": \"OR\",\n \"values\": [\n \"invoice\",\n \"payment overdue\"\n ]\n },\n \"hasAttachment\": true\n },\n \"description\": \"Block invoice emails with attachments sent to support.\",\n \"priority\": 100,\n \"action\": {\n \"action\": \"block\"\n }\n}'"}],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"examples":[{"name":"Block suspicious support invoices","description":"Block invoice emails with attachments sent to support.","type":"explicit","priority":100,"config":{"to":{"operator":"OR","values":["support@example.com"]},"subject":{"operator":"OR","values":["invoice","payment overdue"]},"hasAttachment":true},"action":{"action":"block"}},{"name":"Route partner purchase orders","type":"explicit","priority":50,"config":{"from":{"operator":"OR","values":["*@partner.example"]},"hasWords":{"operator":"AND","values":["purchase order","account number"]}},"action":{"action":"route","endpointId":"endpoint_123"}},{"name":"Block credential phishing","type":"ai_prompt","config":{"mode":"simple","prompt":"Match messages attempting to steal passwords, MFA codes, or login credentials."},"action":{"action":"block"}}],"type":"object","properties":{"name":{"minLength":1,"description":"A descriptive name for the rule.","type":"string","isRequired":true,"uniqueKey":"name","typeLabel":"string"},"type":{"type":"string","enum":["explicit","ai_prompt"],"isRequired":true,"uniqueKey":"type","typeLabel":"enum\u003cstring>"},"config":{"oneOf":[{"type":"object","title":"Explicit rule configuration","description":"Configuration matching the selected rule type. See the request examples for complete explicit and AI configurations.","properties":{"mode":{"type":"string","enum":["simple","advanced"],"uniqueKey":"config.oneOf.0.mode","typeLabel":"enum\u003cstring>"},"subject":{"type":"object","required":["operator","values"],"properties":{"operator":{"type":"string","enum":["OR","AND"],"description":"OR matches any value; AND requires every value to match.","isRequired":true,"uniqueKey":"config.oneOf.0.subject.operator","typeLabel":"enum\u003cstring>"},"values":{"type":"array","minItems":1,"items":{"type":"string","uniqueKey":"config.oneOf.0.subject.values.items.[INDEX]","typeLabel":"string"},"description":"Case-insensitive substrings to match.","isRequired":true,"uniqueKey":"config.oneOf.0.subject.values","typeLabel":"string[]"}},"uniqueKey":"config.oneOf.0.subject","typeLabel":"object"},"from":{"type":"object","required":["operator","values"],"properties":{"operator":{"type":"string","enum":["OR","AND"],"description":"OR matches any address; AND requires every pattern to match.","isRequired":true,"uniqueKey":"config.oneOf.0.from.operator","typeLabel":"enum\u003cstring>"},"values":{"type":"array","minItems":1,"items":{"type":"string","uniqueKey":"config.oneOf.0.from.values.items.[INDEX]","typeLabel":"string"},"description":"Exact email addresses or whole-domain patterns such as *@example.com.","isRequired":true,"uniqueKey":"config.oneOf.0.from.values","typeLabel":"string[]"}},"uniqueKey":"config.oneOf.0.from","typeLabel":"object"},"to":{"type":"object","required":["operator","values"],"properties":{"operator":{"type":"string","enum":["OR","AND"],"description":"OR matches any address; AND requires every pattern to match.","isRequired":true,"uniqueKey":"config.oneOf.0.to.operator","typeLabel":"enum\u003cstring>"},"values":{"type":"array","minItems":1,"items":{"type":"string","uniqueKey":"config.oneOf.0.to.values.items.[INDEX]","typeLabel":"string"},"description":"Exact email addresses or whole-domain patterns such as *@example.com.","isRequired":true,"uniqueKey":"config.oneOf.0.to.values","typeLabel":"string[]"}},"uniqueKey":"config.oneOf.0.to","typeLabel":"object"},"hasAttachment":{"type":"boolean","description":"Match emails based on whether they contain attachments.","uniqueKey":"config.oneOf.0.hasAttachment","typeLabel":"boolean"},"hasWords":{"type":"object","required":["operator","values"],"properties":{"operator":{"type":"string","enum":["OR","AND"],"description":"OR matches any value; AND requires every value to match.","isRequired":true,"uniqueKey":"config.oneOf.0.hasWords.operator","typeLabel":"enum\u003cstring>"},"values":{"type":"array","minItems":1,"items":{"type":"string","uniqueKey":"config.oneOf.0.hasWords.values.items.[INDEX]","typeLabel":"string"},"description":"Case-insensitive substrings to match.","isRequired":true,"uniqueKey":"config.oneOf.0.hasWords.values","typeLabel":"string[]"}},"uniqueKey":"config.oneOf.0.hasWords","typeLabel":"object"}},"isRequired":true,"uniqueKey":"config.oneOf.0","typeLabel":"Explicit rule configuration · object"},{"type":"object","title":"AI prompt rule configuration","description":"Configuration matching the selected rule type. See the request examples for complete explicit and AI configurations.","required":["prompt"],"properties":{"prompt":{"type":"string","minLength":1,"description":"Natural-language description of when the rule should match.","isRequired":true,"uniqueKey":"config.oneOf.1.prompt","typeLabel":"string"},"mode":{"type":"string","enum":["simple","advanced"],"uniqueKey":"config.oneOf.1.mode","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"config.oneOf.1","typeLabel":"AI prompt rule configuration · object"}],"isRequired":true,"uniqueKey":"config","typeLabel":"Explicit rule configuration · object | AI prompt rule configuration · object"},"description":{"description":"Optional explanation of what the rule handles.","type":"string","uniqueKey":"description","typeLabel":"string"},"priority":{"description":"Evaluation priority. Higher values run first; the first matching rule wins. Defaults to 0.","default":0,"type":"number","uniqueKey":"priority","typeLabel":"number"},"action":{"oneOf":[{"type":"object","title":"Allow","description":"Action to take when the rule matches: allow (also marks the email as not junk), block, junk, or route to an owned endpoint. Defaults to allow when omitted.","required":["action"],"properties":{"action":{"const":"allow","isRequired":true,"uniqueKey":"action.oneOf.0.action","typeLabel":"any"}},"uniqueKey":"action.oneOf.0","typeLabel":"Allow · object"},{"type":"object","title":"Block","description":"Action to take when the rule matches: allow (also marks the email as not junk), block, junk, or route to an owned endpoint. Defaults to allow when omitted.","required":["action"],"properties":{"action":{"const":"block","isRequired":true,"uniqueKey":"action.oneOf.1.action","typeLabel":"any"}},"uniqueKey":"action.oneOf.1","typeLabel":"Block · object"},{"type":"object","title":"Junk","description":"Action to take when the rule matches: allow (also marks the email as not junk), block, junk, or route to an owned endpoint. Defaults to allow when omitted.","required":["action"],"properties":{"action":{"const":"junk","isRequired":true,"uniqueKey":"action.oneOf.2.action","typeLabel":"any"}},"uniqueKey":"action.oneOf.2","typeLabel":"Junk · object"},{"type":"object","title":"Route","description":"Action to take when the rule matches: allow (also marks the email as not junk), block, junk, or route to an owned endpoint. Defaults to allow when omitted.","required":["action","endpointId"],"properties":{"action":{"const":"route","isRequired":true,"uniqueKey":"action.oneOf.3.action","typeLabel":"any"},"endpointId":{"type":"string","description":"ID of an active endpoint owned by the account.","isRequired":true,"uniqueKey":"action.oneOf.3.endpointId","typeLabel":"string"}},"uniqueKey":"action.oneOf.3","typeLabel":"Route · object"}],"uniqueKey":"action","typeLabel":"Allow · object | Block · object | Junk · object | Route · object"}},"required":["name","type","config"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"name":"Block suspicious support invoices","description":"Block invoice emails with attachments sent to support.","type":"explicit","priority":100,"config":{"to":{"operator":"OR","values":["support@example.com"]},"subject":{"operator":"OR","values":["invoice","payment overdue"]},"hasAttachment":true},"action":{"action":"block"}}}},"exampleType":"generated"},"application/x-www-form-urlencoded":{"schema":{"examples":[{"name":"Block suspicious support invoices","description":"Block invoice emails with attachments sent to support.","type":"explicit","priority":100,"config":{"to":{"operator":"OR","values":["support@example.com"]},"subject":{"operator":"OR","values":["invoice","payment overdue"]},"hasAttachment":true},"action":{"action":"block"}},{"name":"Route partner purchase orders","type":"explicit","priority":50,"config":{"from":{"operator":"OR","values":["*@partner.example"]},"hasWords":{"operator":"AND","values":["purchase order","account number"]}},"action":{"action":"route","endpointId":"endpoint_123"}},{"name":"Block credential phishing","type":"ai_prompt","config":{"mode":"simple","prompt":"Match messages attempting to steal passwords, MFA codes, or login credentials."},"action":{"action":"block"}}],"type":"object","properties":{"name":{"minLength":1,"description":"A descriptive name for the rule.","type":"string","isRequired":true,"uniqueKey":"name","typeLabel":"string"},"type":{"type":"string","enum":["explicit","ai_prompt"],"isRequired":true,"uniqueKey":"type","typeLabel":"enum\u003cstring>"},"config":{"oneOf":[{"type":"object","title":"Explicit rule configuration","description":"Configuration matching the selected rule type. See the request examples for complete explicit and AI configurations.","properties":{"mode":{"type":"string","enum":["simple","advanced"],"uniqueKey":"config.oneOf.0.mode","typeLabel":"enum\u003cstring>"},"subject":{"type":"object","required":["operator","values"],"properties":{"operator":{"type":"string","enum":["OR","AND"],"description":"OR matches any value; AND requires every value to match.","isRequired":true,"uniqueKey":"config.oneOf.0.subject.operator","typeLabel":"enum\u003cstring>"},"values":{"type":"array","minItems":1,"items":{"type":"string","uniqueKey":"config.oneOf.0.subject.values.items.[INDEX]","typeLabel":"string"},"description":"Case-insensitive substrings to match.","isRequired":true,"uniqueKey":"config.oneOf.0.subject.values","typeLabel":"string[]"}},"uniqueKey":"config.oneOf.0.subject","typeLabel":"object"},"from":{"type":"object","required":["operator","values"],"properties":{"operator":{"type":"string","enum":["OR","AND"],"description":"OR matches any address; AND requires every pattern to match.","isRequired":true,"uniqueKey":"config.oneOf.0.from.operator","typeLabel":"enum\u003cstring>"},"values":{"type":"array","minItems":1,"items":{"type":"string","uniqueKey":"config.oneOf.0.from.values.items.[INDEX]","typeLabel":"string"},"description":"Exact email addresses or whole-domain patterns such as *@example.com.","isRequired":true,"uniqueKey":"config.oneOf.0.from.values","typeLabel":"string[]"}},"uniqueKey":"config.oneOf.0.from","typeLabel":"object"},"to":{"type":"object","required":["operator","values"],"properties":{"operator":{"type":"string","enum":["OR","AND"],"description":"OR matches any address; AND requires every pattern to match.","isRequired":true,"uniqueKey":"config.oneOf.0.to.operator","typeLabel":"enum\u003cstring>"},"values":{"type":"array","minItems":1,"items":{"type":"string","uniqueKey":"config.oneOf.0.to.values.items.[INDEX]","typeLabel":"string"},"description":"Exact email addresses or whole-domain patterns such as *@example.com.","isRequired":true,"uniqueKey":"config.oneOf.0.to.values","typeLabel":"string[]"}},"uniqueKey":"config.oneOf.0.to","typeLabel":"object"},"hasAttachment":{"type":"boolean","description":"Match emails based on whether they contain attachments.","uniqueKey":"config.oneOf.0.hasAttachment","typeLabel":"boolean"},"hasWords":{"type":"object","required":["operator","values"],"properties":{"operator":{"type":"string","enum":["OR","AND"],"description":"OR matches any value; AND requires every value to match.","isRequired":true,"uniqueKey":"config.oneOf.0.hasWords.operator","typeLabel":"enum\u003cstring>"},"values":{"type":"array","minItems":1,"items":{"type":"string","uniqueKey":"config.oneOf.0.hasWords.values.items.[INDEX]","typeLabel":"string"},"description":"Case-insensitive substrings to match.","isRequired":true,"uniqueKey":"config.oneOf.0.hasWords.values","typeLabel":"string[]"}},"uniqueKey":"config.oneOf.0.hasWords","typeLabel":"object"}},"isRequired":true,"uniqueKey":"config.oneOf.0","typeLabel":"Explicit rule configuration · object"},{"type":"object","title":"AI prompt rule configuration","description":"Configuration matching the selected rule type. See the request examples for complete explicit and AI configurations.","required":["prompt"],"properties":{"prompt":{"type":"string","minLength":1,"description":"Natural-language description of when the rule should match.","isRequired":true,"uniqueKey":"config.oneOf.1.prompt","typeLabel":"string"},"mode":{"type":"string","enum":["simple","advanced"],"uniqueKey":"config.oneOf.1.mode","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"config.oneOf.1","typeLabel":"AI prompt rule configuration · object"}],"isRequired":true,"uniqueKey":"config","typeLabel":"Explicit rule configuration · object | AI prompt rule configuration · object"},"description":{"description":"Optional explanation of what the rule handles.","type":"string","uniqueKey":"description","typeLabel":"string"},"priority":{"description":"Evaluation priority. Higher values run first; the first matching rule wins. Defaults to 0.","default":0,"type":"number","uniqueKey":"priority","typeLabel":"number"},"action":{"oneOf":[{"type":"object","title":"Allow","description":"Action to take when the rule matches: allow (also marks the email as not junk), block, junk, or route to an owned endpoint. Defaults to allow when omitted.","required":["action"],"properties":{"action":{"const":"allow","isRequired":true,"uniqueKey":"action.oneOf.0.action","typeLabel":"any"}},"uniqueKey":"action.oneOf.0","typeLabel":"Allow · object"},{"type":"object","title":"Block","description":"Action to take when the rule matches: allow (also marks the email as not junk), block, junk, or route to an owned endpoint. Defaults to allow when omitted.","required":["action"],"properties":{"action":{"const":"block","isRequired":true,"uniqueKey":"action.oneOf.1.action","typeLabel":"any"}},"uniqueKey":"action.oneOf.1","typeLabel":"Block · object"},{"type":"object","title":"Junk","description":"Action to take when the rule matches: allow (also marks the email as not junk), block, junk, or route to an owned endpoint. Defaults to allow when omitted.","required":["action"],"properties":{"action":{"const":"junk","isRequired":true,"uniqueKey":"action.oneOf.2.action","typeLabel":"any"}},"uniqueKey":"action.oneOf.2","typeLabel":"Junk · object"},{"type":"object","title":"Route","description":"Action to take when the rule matches: allow (also marks the email as not junk), block, junk, or route to an owned endpoint. Defaults to allow when omitted.","required":["action","endpointId"],"properties":{"action":{"const":"route","isRequired":true,"uniqueKey":"action.oneOf.3.action","typeLabel":"any"},"endpointId":{"type":"string","description":"ID of an active endpoint owned by the account.","isRequired":true,"uniqueKey":"action.oneOf.3.endpointId","typeLabel":"string"}},"uniqueKey":"action.oneOf.3","typeLabel":"Route · object"}],"uniqueKey":"action","typeLabel":"Allow · object | Block · object | Junk · object | Route · object"}},"required":["name","type","config"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"name":"Block suspicious support invoices","description":"Block invoice emails with attachments sent to support.","type":"explicit","priority":100,"config":{"to":{"operator":"OR","values":["support@example.com"]},"subject":{"operator":"OR","values":["invoice","payment overdue"]},"hasAttachment":true},"action":{"action":"block"}}}},"exampleType":"generated"},"multipart/form-data":{"schema":{"examples":[{"name":"Block suspicious support invoices","description":"Block invoice emails with attachments sent to support.","type":"explicit","priority":100,"config":{"to":{"operator":"OR","values":["support@example.com"]},"subject":{"operator":"OR","values":["invoice","payment overdue"]},"hasAttachment":true},"action":{"action":"block"}},{"name":"Route partner purchase orders","type":"explicit","priority":50,"config":{"from":{"operator":"OR","values":["*@partner.example"]},"hasWords":{"operator":"AND","values":["purchase order","account number"]}},"action":{"action":"route","endpointId":"endpoint_123"}},{"name":"Block credential phishing","type":"ai_prompt","config":{"mode":"simple","prompt":"Match messages attempting to steal passwords, MFA codes, or login credentials."},"action":{"action":"block"}}],"type":"object","properties":{"name":{"minLength":1,"description":"A descriptive name for the rule.","type":"string","isRequired":true,"uniqueKey":"name","typeLabel":"string"},"type":{"type":"string","enum":["explicit","ai_prompt"],"isRequired":true,"uniqueKey":"type","typeLabel":"enum\u003cstring>"},"config":{"oneOf":[{"type":"object","title":"Explicit rule configuration","description":"Configuration matching the selected rule type. See the request examples for complete explicit and AI configurations.","properties":{"mode":{"type":"string","enum":["simple","advanced"],"uniqueKey":"config.oneOf.0.mode","typeLabel":"enum\u003cstring>"},"subject":{"type":"object","required":["operator","values"],"properties":{"operator":{"type":"string","enum":["OR","AND"],"description":"OR matches any value; AND requires every value to match.","isRequired":true,"uniqueKey":"config.oneOf.0.subject.operator","typeLabel":"enum\u003cstring>"},"values":{"type":"array","minItems":1,"items":{"type":"string","uniqueKey":"config.oneOf.0.subject.values.items.[INDEX]","typeLabel":"string"},"description":"Case-insensitive substrings to match.","isRequired":true,"uniqueKey":"config.oneOf.0.subject.values","typeLabel":"string[]"}},"uniqueKey":"config.oneOf.0.subject","typeLabel":"object"},"from":{"type":"object","required":["operator","values"],"properties":{"operator":{"type":"string","enum":["OR","AND"],"description":"OR matches any address; AND requires every pattern to match.","isRequired":true,"uniqueKey":"config.oneOf.0.from.operator","typeLabel":"enum\u003cstring>"},"values":{"type":"array","minItems":1,"items":{"type":"string","uniqueKey":"config.oneOf.0.from.values.items.[INDEX]","typeLabel":"string"},"description":"Exact email addresses or whole-domain patterns such as *@example.com.","isRequired":true,"uniqueKey":"config.oneOf.0.from.values","typeLabel":"string[]"}},"uniqueKey":"config.oneOf.0.from","typeLabel":"object"},"to":{"type":"object","required":["operator","values"],"properties":{"operator":{"type":"string","enum":["OR","AND"],"description":"OR matches any address; AND requires every pattern to match.","isRequired":true,"uniqueKey":"config.oneOf.0.to.operator","typeLabel":"enum\u003cstring>"},"values":{"type":"array","minItems":1,"items":{"type":"string","uniqueKey":"config.oneOf.0.to.values.items.[INDEX]","typeLabel":"string"},"description":"Exact email addresses or whole-domain patterns such as *@example.com.","isRequired":true,"uniqueKey":"config.oneOf.0.to.values","typeLabel":"string[]"}},"uniqueKey":"config.oneOf.0.to","typeLabel":"object"},"hasAttachment":{"type":"boolean","description":"Match emails based on whether they contain attachments.","uniqueKey":"config.oneOf.0.hasAttachment","typeLabel":"boolean"},"hasWords":{"type":"object","required":["operator","values"],"properties":{"operator":{"type":"string","enum":["OR","AND"],"description":"OR matches any value; AND requires every value to match.","isRequired":true,"uniqueKey":"config.oneOf.0.hasWords.operator","typeLabel":"enum\u003cstring>"},"values":{"type":"array","minItems":1,"items":{"type":"string","uniqueKey":"config.oneOf.0.hasWords.values.items.[INDEX]","typeLabel":"string"},"description":"Case-insensitive substrings to match.","isRequired":true,"uniqueKey":"config.oneOf.0.hasWords.values","typeLabel":"string[]"}},"uniqueKey":"config.oneOf.0.hasWords","typeLabel":"object"}},"isRequired":true,"uniqueKey":"config.oneOf.0","typeLabel":"Explicit rule configuration · object"},{"type":"object","title":"AI prompt rule configuration","description":"Configuration matching the selected rule type. See the request examples for complete explicit and AI configurations.","required":["prompt"],"properties":{"prompt":{"type":"string","minLength":1,"description":"Natural-language description of when the rule should match.","isRequired":true,"uniqueKey":"config.oneOf.1.prompt","typeLabel":"string"},"mode":{"type":"string","enum":["simple","advanced"],"uniqueKey":"config.oneOf.1.mode","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"config.oneOf.1","typeLabel":"AI prompt rule configuration · object"}],"isRequired":true,"uniqueKey":"config","typeLabel":"Explicit rule configuration · object | AI prompt rule configuration · object"},"description":{"description":"Optional explanation of what the rule handles.","type":"string","uniqueKey":"description","typeLabel":"string"},"priority":{"description":"Evaluation priority. Higher values run first; the first matching rule wins. Defaults to 0.","default":0,"type":"number","uniqueKey":"priority","typeLabel":"number"},"action":{"oneOf":[{"type":"object","title":"Allow","description":"Action to take when the rule matches: allow (also marks the email as not junk), block, junk, or route to an owned endpoint. Defaults to allow when omitted.","required":["action"],"properties":{"action":{"const":"allow","isRequired":true,"uniqueKey":"action.oneOf.0.action","typeLabel":"any"}},"uniqueKey":"action.oneOf.0","typeLabel":"Allow · object"},{"type":"object","title":"Block","description":"Action to take when the rule matches: allow (also marks the email as not junk), block, junk, or route to an owned endpoint. Defaults to allow when omitted.","required":["action"],"properties":{"action":{"const":"block","isRequired":true,"uniqueKey":"action.oneOf.1.action","typeLabel":"any"}},"uniqueKey":"action.oneOf.1","typeLabel":"Block · object"},{"type":"object","title":"Junk","description":"Action to take when the rule matches: allow (also marks the email as not junk), block, junk, or route to an owned endpoint. Defaults to allow when omitted.","required":["action"],"properties":{"action":{"const":"junk","isRequired":true,"uniqueKey":"action.oneOf.2.action","typeLabel":"any"}},"uniqueKey":"action.oneOf.2","typeLabel":"Junk · object"},{"type":"object","title":"Route","description":"Action to take when the rule matches: allow (also marks the email as not junk), block, junk, or route to an owned endpoint. Defaults to allow when omitted.","required":["action","endpointId"],"properties":{"action":{"const":"route","isRequired":true,"uniqueKey":"action.oneOf.3.action","typeLabel":"any"},"endpointId":{"type":"string","description":"ID of an active endpoint owned by the account.","isRequired":true,"uniqueKey":"action.oneOf.3.endpointId","typeLabel":"string"}},"uniqueKey":"action.oneOf.3","typeLabel":"Route · object"}],"uniqueKey":"action","typeLabel":"Allow · object | Block · object | Junk · object | Route · object"}},"required":["name","type","config"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"name":"Block suspicious support invoices","description":"Block invoice emails with attachments sent to support.","type":"explicit","priority":100,"config":{"to":{"operator":"OR","values":["support@example.com"]},"subject":{"operator":"OR","values":["invoice","payment overdue"]},"hasAttachment":true},"action":{"action":"block"}}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"36b71ae5-d9ae-4ddb-8382-0151ca29ea64":{"description":"The newly created active guard rule.","content":{"application/json":{"schema":{"description":"The newly created active guard rule.","examples":[{"success":true,"data":{"id":"V1StGXR8_Z5jdHi6B-myT","userId":"user_123","name":"Block suspicious support invoices","description":"Block invoice emails with attachments sent to support.","type":"explicit","config":"{\"to\":{\"operator\":\"OR\",\"values\":[\"support@example.com\"]},\"subject\":{\"operator\":\"OR\",\"values\":[\"invoice\",\"payment overdue\"]},\"hasAttachment\":true}","isActive":true,"priority":100,"lastTriggeredAt":null,"triggerCount":0,"actions":"{\"action\":\"block\"}","createdAt":"2026-06-12T17:00:00.000Z","updatedAt":"2026-06-12T17:00:00.000Z"}}],"type":"object","properties":{"success":{"const":true,"type":"boolean","isRequired":true,"uniqueKey":"success","typeLabel":"boolean"},"data":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"data.id","typeLabel":"string"},"userId":{"type":"string","isRequired":true,"uniqueKey":"data.userId","typeLabel":"string"},"name":{"type":"string","isRequired":true,"uniqueKey":"data.name","typeLabel":"string"},"description":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"data.description.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"data.description.oneOf.1","typeLabel":"null"},{"type":"null","isRequired":true,"uniqueKey":"data.description.oneOf.2","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.description","typeLabel":"string · null · null"},"type":{"type":"string","isRequired":true,"uniqueKey":"data.type","typeLabel":"string"},"config":{"type":"string","isRequired":true,"uniqueKey":"data.config","typeLabel":"string"},"isActive":{"oneOf":[{"type":"boolean","isRequired":true,"uniqueKey":"data.isActive.oneOf.0","typeLabel":"boolean"},{"type":"null","isRequired":true,"uniqueKey":"data.isActive.oneOf.1","typeLabel":"null"},{"type":"null","isRequired":true,"uniqueKey":"data.isActive.oneOf.2","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.isActive","typeLabel":"boolean · null · null"},"priority":{"oneOf":[{"type":"number","isRequired":true,"uniqueKey":"data.priority.oneOf.0","typeLabel":"number"},{"type":"null","isRequired":true,"uniqueKey":"data.priority.oneOf.1","typeLabel":"null"},{"type":"null","isRequired":true,"uniqueKey":"data.priority.oneOf.2","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.priority","typeLabel":"number · null · null"},"lastTriggeredAt":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"data.lastTriggeredAt.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"data.lastTriggeredAt.oneOf.1","typeLabel":"null"},{"type":"null","isRequired":true,"uniqueKey":"data.lastTriggeredAt.oneOf.2","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.lastTriggeredAt","typeLabel":"string · null · null"},"triggerCount":{"oneOf":[{"type":"number","isRequired":true,"uniqueKey":"data.triggerCount.oneOf.0","typeLabel":"number"},{"type":"null","isRequired":true,"uniqueKey":"data.triggerCount.oneOf.1","typeLabel":"null"},{"type":"null","isRequired":true,"uniqueKey":"data.triggerCount.oneOf.2","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.triggerCount","typeLabel":"number · null · null"},"actions":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"data.actions.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"data.actions.oneOf.1","typeLabel":"null"},{"type":"null","isRequired":true,"uniqueKey":"data.actions.oneOf.2","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.actions","typeLabel":"string · null · null"},"createdAt":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"data.createdAt.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"data.createdAt.oneOf.1","typeLabel":"null"},{"type":"null","isRequired":true,"uniqueKey":"data.createdAt.oneOf.2","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.createdAt","typeLabel":"string · null · null"},"updatedAt":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"data.updatedAt.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"data.updatedAt.oneOf.1","typeLabel":"null"},{"type":"null","isRequired":true,"uniqueKey":"data.updatedAt.oneOf.2","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.updatedAt","typeLabel":"string · null · null"}},"required":["id","userId","name","description","type","config","isActive","priority","lastTriggeredAt","triggerCount","actions","createdAt","updatedAt"],"isRequired":true,"uniqueKey":"data","typeLabel":"object"}},"required":["success","data"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":true,"data":{"id":"V1StGXR8_Z5jdHi6B-myT","userId":"user_123","name":"Block suspicious support invoices","description":"Block invoice emails with attachments sent to support.","type":"explicit","config":"{\"to\":{\"operator\":\"OR\",\"values\":[\"support@example.com\"]},\"subject\":{\"operator\":\"OR\",\"values\":[\"invoice\",\"payment overdue\"]},\"hasAttachment\":true}","isActive":true,"priority":100,"lastTriggeredAt":null,"triggerCount":0,"actions":"{\"action\":\"block\"}","createdAt":"2026-06-12T17:00:00.000Z","updatedAt":"2026-06-12T17:00:00.000Z"}}}},"exampleType":"generated"}},"exampleType":"generated"},"61f1781e-46a9-4d0f-a729-ddef5e0313ef":{"description":"Response for status 400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","isRequired":true,"uniqueKey":"error","typeLabel":"string"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"2578058d-15fa-4790-9e92-dc549623f4a2":{"description":"Response for status 401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","isRequired":true,"uniqueKey":"error","typeLabel":"string"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"d27cbf5e-08f6-43ab-95dd-957c00d681cd":{"description":"Response for status 500","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","isRequired":true,"uniqueKey":"error","typeLabel":"string"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"a21929c0-7ca0-4eed-85c4-490e145403c5":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"Your Inbound API key. Include it in the Authorization header as: Bearer \u003cyour-api-key>","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"a6ff19d1-12ee-4cff-bb3c-f5e23b952134":{"url":"https://inbound.new","description":"Production API server"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"Your Inbound API key. Include it in the Authorization header as: Bearer \u003cyour-api-key>","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Your Inbound API key. Include it in the Authorization header as: Bearer \u003cyour-api-key>","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"https://inbound.new/openapi.json"},"subdomain":"inbound","siteName":"inbound","title":"Create guard rule - inbound","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-31T23:33:51.664Z","originalFileLocation":"api-reference/guard/create-guard-rule.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Create an active email filtering rule for the authenticated account. For an explicit rule, configure one or more of subject, from, to, hasAttachment, and hasWords. Different configured criteria are combined with AND. Within a criterion, OR matches any value and AND requires every value. Address criteria support exact, case-insensitive addresses and whole-domain patterns such as *@example.com. The to criterion matches the actual delivered recipient, which makes it suitable for limiting a rule to one inbox. Subject and body criteria use case-insensitive substring matching. Rules are evaluated from highest priority to lowest, and the first matching rule wins. A matching rule can allow, block, mark as junk, or route the email to an active endpoint owned by the account. If action is omitted, it defaults to allow. junk marks the email as junk without blocking it: it is still delivered to endpoints (with spam.isJunk: true in the webhook) and appears in mailbox Junk folders. allow also marks the email as not junk, overriding the spam filter. For an ai_prompt rule, provide a non-empty natural-language prompt describing when the rule should match.\">\u003cmeta data-mint-head name=\"application-name\" content=\"inbound\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/inbound/jpl8ag4HwpFFGPF8/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/inbound/jpl8ag4HwpFFGPF8/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/inbound/jpl8ag4HwpFFGPF8/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/inbound/jpl8ag4HwpFFGPF8/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/inbound/jpl8ag4HwpFFGPF8/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/inbound/jpl8ag4HwpFFGPF8/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/inbound/jpl8ag4HwpFFGPF8/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/inbound/jpl8ag4HwpFFGPF8/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/inbound/jpl8ag4HwpFFGPF8/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create guard rule - inbound\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create an active email filtering rule for the authenticated account. For an explicit rule, configure one or more of subject, from, to, hasAttachment, and hasWords. Different configured criteria are combined with AND. Within a criterion, OR matches any value and AND requires every value. Address criteria support exact, case-insensitive addresses and whole-domain patterns such as *@example.com. The to criterion matches the actual delivered recipient, which makes it suitable for limiting a rule to one inbox. Subject and body criteria use case-insensitive substring matching. Rules are evaluated from highest priority to lowest, and the first matching rule wins. A matching rule can allow, block, mark as junk, or route the email to an active endpoint owned by the account. If action is omitted, it defaults to allow. junk marks the email as junk without blocking it: it is still delivered to endpoints (with spam.isJunk: true in the webhook) and appears in mailbox Junk folders. allow also marks the email as not junk, overriding the spam filter. For an ai_prompt rule, provide a non-empty natural-language prompt describing when the rule should match.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"inbound\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://inbound.new/docs/api-reference/guard/create-guard-rule\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://inbound.mintlify.site/docs/_mintlify/api/og/v2?division=Guard\u0026amp;title=Create+guard+rule\u0026amp;description=Create+an+active+email+filtering+rule+for+the+authenticated+account.%0A%0AFor+an+%60explicit%60+rule%2C+configure+one+or+more+of+%60subject%60%2C+%60from%60%2C+%60to%60%2C+%60hasAttachment%60%2C\u0026amp;theme=15f7b51bd66015d661d671dc\u0026amp;signature=700d4f425643a50c74d7cf607b14a3a223799c0dc131c2b6ed4ff53200a5312f\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create guard rule - inbound\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create an active email filtering rule for the authenticated account. For an explicit rule, configure one or more of subject, from, to, hasAttachment, and hasWords. Different configured criteria are combined with AND. Within a criterion, OR matches any value and AND requires every value. Address criteria support exact, case-insensitive addresses and whole-domain patterns such as *@example.com. The to criterion matches the actual delivered recipient, which makes it suitable for limiting a rule to one inbox. Subject and body criteria use case-insensitive substring matching. Rules are evaluated from highest priority to lowest, and the first matching rule wins. A matching rule can allow, block, mark as junk, or route the email to an active endpoint owned by the account. If action is omitted, it defaults to allow. junk marks the email as junk without blocking it: it is still delivered to endpoints (with spam.isJunk: true in the webhook) and appears in mailbox Junk folders. allow also marks the email as not junk, overriding the spam filter. For an ai_prompt rule, provide a non-empty natural-language prompt describing when the rule should match.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://inbound.mintlify.site/docs/_mintlify/api/og/v2?division=Guard\u0026amp;title=Create+guard+rule\u0026amp;description=Create+an+active+email+filtering+rule+for+the+authenticated+account.%0A%0AFor+an+%60explicit%60+rule%2C+configure+one+or+more+of+%60subject%60%2C+%60from%60%2C+%60to%60%2C+%60hasAttachment%60%2C\u0026amp;theme=15f7b51bd66015d661d671dc\u0026amp;signature=700d4f425643a50c74d7cf607b14a3a223799c0dc131c2b6ed4ff53200a5312f\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/inbound/jpl8ag4HwpFFGPF8/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"inbound\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#8161FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://inbound.new/docs/api-reference/guard/create-guard-rule\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/api-reference/guard/create-guard-rule.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://inbound.new/#organization\",\"name\":\"inbound\",\"url\":\"https://inbound.new\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/inbound/9X4YbAqu-aoC72gx/logo/light.svg?fit=max\u0026auto=format\u0026n=9X4YbAqu-aoC72gx\u0026q=85\u0026s=e69d7ac2088d0df4183778cec514579b\"}},{\"@type\":\"WebSite\",\"@id\":\"https://inbound.new/docs#website\",\"name\":\"inbound\",\"url\":\"https://inbound.new/docs\",\"publisher\":{\"@id\":\"https://inbound.new/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://inbound.new/docs/api-reference/guard/create-guard-rule#webpage\",\"url\":\"https://inbound.new/docs/api-reference/guard/create-guard-rule\",\"name\":\"Create guard rule\",\"description\":\"Create an active email filtering rule for the authenticated account. For an explicit rule, configure one or more of subject, from, to, hasAttachment, and hasWords. Different configured criteria are combined with AND. Within a criterion, OR matches any value and AND requires every value. Address criteria support exact, case-insensitive addresses and whole-domain patterns such as *@example.com. The to criterion matches the actual delivered recipient, which makes it suitable for limiting a rule to one inbox. Subject and body criteria use case-insensitive substring matching. Rules are evaluated from highest priority to lowest, and the first matching rule wins. A matching rule can allow, block, mark as junk, or route the email to an active endpoint owned by the account. If action is omitted, it defaults to allow. junk marks the email as junk without blocking it: it is still delivered to endpoints (with spam.isJunk: true in the webhook) and appears in mailbox Junk folders. allow also marks the email as not junk, overriding the spam filter. For an ai_prompt rule, provide a non-empty natural-language prompt describing when the rule should match.\",\"dateModified\":\"2026-10-31T23:33:51.664Z\",\"isPartOf\":{\"@id\":\"https://inbound.new/docs#website\"},\"breadcrumb\":{\"@id\":\"https://inbound.new/docs/api-reference/guard/create-guard-rule#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://inbound.new/docs/api-reference/guard/create-guard-rule#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Guard\",\"item\":\"https://inbound.new/docs/api-reference/guard/list-guard-rules\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create guard rule\",\"item\":\"https://inbound.new/docs/api-reference/guard/create-guard-rule\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://inbound.new/docs/api-reference/guard/create-guard-rule#apireference\",\"headline\":\"Create guard rule\",\"name\":\"Create guard rule\",\"description\":\"Create an active email filtering rule for the authenticated account. For an explicit rule, configure one or more of subject, from, to, hasAttachment, and hasWords. Different configured criteria are combined with AND. Within a criterion, OR matches any value and AND requires every value. Address criteria support exact, case-insensitive addresses and whole-domain patterns such as *@example.com. The to criterion matches the actual delivered recipient, which makes it suitable for limiting a rule to one inbox. Subject and body criteria use case-insensitive substring matching. Rules are evaluated from highest priority to lowest, and the first matching rule wins. A matching rule can allow, block, mark as junk, or route the email to an active endpoint owned by the account. If action is omitted, it defaults to allow. junk marks the email as junk without blocking it: it is still delivered to endpoints (with spam.isJunk: true in the webhook) and appears in mailbox Junk folders. allow also marks the email as not junk, overriding the spam filter. For an ai_prompt rule, provide a non-empty natural-language prompt describing when the rule should match.\",\"url\":\"https://inbound.new/docs/api-reference/guard/create-guard-rule\",\"mainEntityOfPage\":{\"@id\":\"https://inbound.new/docs/api-reference/guard/create-guard-rule#webpage\"},\"dateModified\":\"2026-10-31T23:33:51.664Z\",\"publisher\":{\"@id\":\"https://inbound.new/#organization\"},\"isPartOf\":{\"@id\":\"https://inbound.new/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"inbound\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"inbound","nav":{"global":null,"anchors":[{"anchor":"Documentation","icon":"book-open","pages":[{"title":"Documentation","href":"/quickstart/introduction"}]},{"anchor":"API Reference","icon":"square-terminal","groups":[{"group":"Overview","pages":[{"title":"Introduction","href":"/api-reference/introduction"},{"title":"Rate Limits","href":"/api-reference/rate-limits"},{"title":"Webhook Structure","href":"/api-reference/webhook"},{"title":"Security","href":"/api-reference/security"},{"title":"Error Codes","href":"/api-reference/errors"}]},{"group":"Domains","pages":[{"title":"List all domains","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json get /api/e2/domains","href":"/api-reference/domains/list-all-domains"},{"title":"Create new domain","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json post /api/e2/domains","href":"/api-reference/domains/create-new-domain"},{"title":"Get domain by ID","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json get /api/e2/domains/{id}","href":"/api-reference/domains/get-domain-by-id"},{"title":"Delete domain","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json delete /api/e2/domains/{id}","href":"/api-reference/domains/delete-domain"},{"title":"Update domain catch-all and subdomain settings","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json patch /api/e2/domains/{id}","href":"/api-reference/domains/update-domain-catch-all-and-subdomain-settings"},{"title":"Enable DKIM","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json post /api/e2/domains/{id}/dkim","href":"/api-reference/domains/enable-dkim"}]},{"group":"Endpoints","pages":[{"title":"List all endpoints","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json get /api/e2/endpoints","href":"/api-reference/endpoints/list-all-endpoints"},{"title":"Create new endpoint","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json post /api/e2/endpoints","href":"/api-reference/endpoints/create-new-endpoint"},{"title":"Get endpoint details","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json get /api/e2/endpoints/{id}","href":"/api-reference/endpoints/get-endpoint-details"},{"title":"Update endpoint","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json put /api/e2/endpoints/{id}","href":"/api-reference/endpoints/update-endpoint"},{"title":"Delete endpoint","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json delete /api/e2/endpoints/{id}","href":"/api-reference/endpoints/delete-endpoint"},{"title":"Test endpoint","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json post /api/e2/endpoints/{id}/test","href":"/api-reference/endpoints/test-endpoint"}]},{"group":"Email Addresses","pages":[{"title":"List all email addresses","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json get /api/e2/email-addresses","href":"/api-reference/email-addresses/list-all-email-addresses"},{"title":"Create email address","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json post /api/e2/email-addresses","href":"/api-reference/email-addresses/create-email-address"},{"title":"Get email address","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json get /api/e2/email-addresses/{id}","href":"/api-reference/email-addresses/get-email-address"},{"title":"Update email address","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json put /api/e2/email-addresses/{id}","href":"/api-reference/email-addresses/update-email-address"},{"title":"Delete email address","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json delete /api/e2/email-addresses/{id}","href":"/api-reference/email-addresses/delete-email-address"}]},{"group":"Attachments","pages":[{"title":"List email attachments","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json get /api/e2/attachments/{id}","href":"/api-reference/attachments/list-email-attachments"},{"title":"Download attachment by position","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json get /api/e2/attachments/{id}/parts/{index}","href":"/api-reference/attachments/download-attachment-by-position"},{"title":"Download email attachment","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json get /api/e2/attachments/{id}/{filename}","href":"/api-reference/attachments/download-email-attachment"}]},{"group":"Authentication","pages":[{"title":"Revoke the current API key","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json post /api/e2/auth/revoke-key","href":"/api-reference/authentication/revoke-the-current-api-key"}]},{"group":"Emails","pages":[{"title":"List all emails","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json get /api/e2/emails","href":"/api-reference/emails/list-all-emails"},{"title":"Send an email","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json post /api/e2/emails","href":"/api-reference/emails/send-an-email"},{"title":"Get email by ID","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json get /api/e2/emails/{id}","href":"/api-reference/emails/get-email-by-id"},{"title":"Cancel scheduled email","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json delete /api/e2/emails/{id}","href":"/api-reference/emails/cancel-scheduled-email"},{"title":"Update email","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json patch /api/e2/emails/{id}","href":"/api-reference/emails/update-email"},{"title":"Pause scheduled email","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json post /api/e2/emails/{id}/pause","href":"/api-reference/emails/pause-scheduled-email"},{"title":"Resume paused scheduled email","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json post /api/e2/emails/{id}/resume","href":"/api-reference/emails/resume-paused-scheduled-email"},{"title":"Reply to an email","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json post /api/e2/emails/{id}/reply","href":"/api-reference/emails/reply-to-an-email"},{"title":"Retry email delivery","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json post /api/e2/emails/{id}/retry","href":"/api-reference/emails/retry-email-delivery"}]},{"group":"Inbox","pages":[{"title":"List inbox threads","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json get /api/e2/mail/threads","href":"/api-reference/inbox/list-inbox-threads"},{"title":"Get thread by ID","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json get /api/e2/mail/threads/{id}","href":"/api-reference/inbox/get-thread-by-id"}]},{"group":"Mailboxes","pages":[{"title":"List managed mailboxes","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json get /api/e2/mailboxes","href":"/api-reference/mailboxes/list-managed-mailboxes"},{"title":"Create a managed mailbox","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json post /api/e2/mailboxes","href":"/api-reference/mailboxes/create-a-managed-mailbox"},{"title":"List activity for all mailboxes","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json get /api/e2/mailboxes/activity","href":"/api-reference/mailboxes/list-activity-for-all-mailboxes"},{"title":"List mailbox activity","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json get /api/e2/mailboxes/{id}/activity","href":"/api-reference/mailboxes/list-mailbox-activity"},{"title":"Get a mailbox","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json get /api/e2/mailboxes/{id}","href":"/api-reference/mailboxes/get-a-mailbox"},{"title":"Update a managed mailbox","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json put /api/e2/mailboxes/{id}","href":"/api-reference/mailboxes/update-a-managed-mailbox"},{"title":"Delete a managed mailbox","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json delete /api/e2/mailboxes/{id}","href":"/api-reference/mailboxes/delete-a-managed-mailbox"},{"title":"Rotate a mailbox password","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json post /api/e2/mailboxes/{id}/rotate-password","href":"/api-reference/mailboxes/rotate-a-mailbox-password"},{"title":"List mailbox messages","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json get /api/e2/mailboxes/{id}/messages","href":"/api-reference/mailboxes/list-mailbox-messages"},{"title":"Get a mailbox message","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json get /api/e2/mailboxes/{id}/messages/{messageId}","href":"/api-reference/mailboxes/get-a-mailbox-message"},{"title":"Mark a mailbox message read, archived or junk","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json patch /api/e2/mailboxes/{id}/messages/{messageId}","href":"/api-reference/mailboxes/mark-a-mailbox-message-read-archived-or-junk"},{"title":"Get a mailbox thread","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json get /api/e2/mailboxes/{id}/threads/{threadId}","href":"/api-reference/mailboxes/get-a-mailbox-thread"},{"title":"Download a mailbox attachment","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json get /api/e2/mailboxes/{id}/messages/{messageId}/attachments/{index}","href":"/api-reference/mailboxes/download-a-mailbox-attachment"},{"title":"List mailbox folders","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json get /api/e2/mailboxes/{id}/folders","href":"/api-reference/mailboxes/list-mailbox-folders"},{"title":"Create a mailbox folder","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json post /api/e2/mailboxes/{id}/folders","href":"/api-reference/mailboxes/create-a-mailbox-folder"},{"title":"Delete a mailbox folder","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json delete /api/e2/mailboxes/{id}/folders/{folder}","href":"/api-reference/mailboxes/delete-a-mailbox-folder"},{"title":"Rename or subscribe a mailbox folder","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json patch /api/e2/mailboxes/{id}/folders/{folder}","href":"/api-reference/mailboxes/rename-or-subscribe-a-mailbox-folder"},{"title":"Expunge a mailbox folder","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json post /api/e2/mailboxes/{id}/folders/{folder}/expunge","href":"/api-reference/mailboxes/expunge-a-mailbox-folder"},{"title":"List folder messages","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json get /api/e2/mailboxes/{id}/folders/{folder}/messages","href":"/api-reference/mailboxes/list-folder-messages"},{"title":"Add a message to a folder","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json post /api/e2/mailboxes/{id}/folders/{folder}/messages","href":"/api-reference/mailboxes/add-a-message-to-a-folder"},{"title":"Get a folder message","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json get /api/e2/mailboxes/{id}/folders/{folder}/messages/{uid}","href":"/api-reference/mailboxes/get-a-folder-message"},{"title":"Delete a folder message","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json delete /api/e2/mailboxes/{id}/folders/{folder}/messages/{uid}","href":"/api-reference/mailboxes/delete-a-folder-message"},{"title":"Update a folder message's flags","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json patch /api/e2/mailboxes/{id}/folders/{folder}/messages/{uid}","href":"/api-reference/mailboxes/update-a-folder-messages-flags"},{"title":"Download a folder message's raw source","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json get /api/e2/mailboxes/{id}/folders/{folder}/messages/{uid}/raw","href":"/api-reference/mailboxes/download-a-folder-messages-raw-source"},{"title":"Move a folder message","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json post /api/e2/mailboxes/{id}/folders/{folder}/messages/{uid}/move","href":"/api-reference/mailboxes/move-a-folder-message"},{"title":"Copy a folder message","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json post /api/e2/mailboxes/{id}/folders/{folder}/messages/{uid}/copy","href":"/api-reference/mailboxes/copy-a-folder-message"},{"title":"List a folder message's attachments","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json get /api/e2/mailboxes/{id}/folders/{folder}/messages/{uid}/attachments","href":"/api-reference/mailboxes/list-a-folder-messages-attachments"},{"title":"Download a folder message's attachment","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json get /api/e2/mailboxes/{id}/folders/{folder}/messages/{uid}/attachments/{index}","href":"/api-reference/mailboxes/download-a-folder-messages-attachment"},{"title":"List mailbox filters","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json get /api/e2/mailboxes/{id}/filters","href":"/api-reference/mailboxes/list-mailbox-filters"},{"title":"Create a mailbox filter","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json post /api/e2/mailboxes/{id}/filters","href":"/api-reference/mailboxes/create-a-mailbox-filter"},{"title":"Reorder mailbox filters","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json post /api/e2/mailboxes/{id}/filters/reorder","href":"/api-reference/mailboxes/reorder-mailbox-filters"},{"title":"Run mailbox filters on a folder","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json post /api/e2/mailboxes/{id}/filters/apply","href":"/api-reference/mailboxes/run-mailbox-filters-on-a-folder"},{"title":"Get a mailbox filter","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json get /api/e2/mailboxes/{id}/filters/{filterId}","href":"/api-reference/mailboxes/get-a-mailbox-filter"},{"title":"Delete a mailbox filter","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json delete /api/e2/mailboxes/{id}/filters/{filterId}","href":"/api-reference/mailboxes/delete-a-mailbox-filter"},{"title":"Update a mailbox filter","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json patch /api/e2/mailboxes/{id}/filters/{filterId}","href":"/api-reference/mailboxes/update-a-mailbox-filter"},{"title":"Run one mailbox filter on a folder","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json post /api/e2/mailboxes/{id}/filters/{filterId}/apply","href":"/api-reference/mailboxes/run-one-mailbox-filter-on-a-folder"},{"title":"Get mailbox spam settings","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json get /api/e2/mailboxes/{id}/spam","href":"/api-reference/mailboxes/get-mailbox-spam-settings"},{"title":"Replace mailbox spam settings","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json put /api/e2/mailboxes/{id}/spam","href":"/api-reference/mailboxes/replace-mailbox-spam-settings"},{"title":"Add a sender to the mailbox spam allow list","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json post /api/e2/mailboxes/{id}/spam/allow","href":"/api-reference/mailboxes/add-a-sender-to-the-mailbox-spam-allow-list"},{"title":"Remove a sender from the mailbox spam allow list","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json delete /api/e2/mailboxes/{id}/spam/allow","href":"/api-reference/mailboxes/remove-a-sender-from-the-mailbox-spam-allow-list"},{"title":"Add a sender to the mailbox spam block list","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json post /api/e2/mailboxes/{id}/spam/block","href":"/api-reference/mailboxes/add-a-sender-to-the-mailbox-spam-block-list"},{"title":"Remove a sender from the mailbox spam block list","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json delete /api/e2/mailboxes/{id}/spam/block","href":"/api-reference/mailboxes/remove-a-sender-from-the-mailbox-spam-block-list"}]},{"group":"Spam Filter","pages":[{"title":"Get spam filter settings","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json get /api/e2/spam-filter","href":"/api-reference/spam-filter/get-spam-filter-settings"},{"title":"Update spam filter settings","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json put /api/e2/spam-filter","href":"/api-reference/spam-filter/update-spam-filter-settings"}]},{"group":"Guard","pages":[{"title":"List guard rules","description":"Get all guard rules for the authenticated user with optional filtering and pagination.","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json get /api/e2/guard","href":"/api-reference/guard/list-guard-rules"},{"title":"Create guard rule","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json post /api/e2/guard","href":"/api-reference/guard/create-guard-rule"},{"title":"Get guard rule","description":"Get a specific guard rule by ID.","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json get /api/e2/guard/{id}","href":"/api-reference/guard/get-guard-rule"},{"title":"Update guard rule","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json put /api/e2/guard/{id}","href":"/api-reference/guard/update-guard-rule"},{"title":"Delete guard rule","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json delete /api/e2/guard/{id}","href":"/api-reference/guard/delete-guard-rule"},{"title":"Check if rule matches email","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json post /api/e2/guard/{id}/check","href":"/api-reference/guard/check-if-rule-matches-email"},{"title":"Generate rule from natural language","deprecated":null,"version":null,"openapi":"https://inbound.new/openapi.json post /api/e2/guard/generate","href":"/api-reference/guard/generate-rule-from-natural-language"}]},{"group":"Webhooks","pages":[{"title":"Email received","version":null,"deprecated":null,"openapi":"https://inbound.new/openapi.json webhook emailReceived","href":"/api-reference/webhooks/email-received"}]}]}]},"basePath":"","title":"Create guard rule - inbound","buildId":"dpl_ATnXPMW25DMPUr9VBw6kL6MfBt6T","deploymentId":"dpl_ATnXPMW25DMPUr9VBw6kL6MfBt6T","dynamics":["c2aa737661","b0f84f53ff","a9bb46feb3","2b790eda92"],"chunks":["OpenApiReferenceProvider-CNqlzjVB.js","utils-BqFiXZ79.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-CnR4QBe6.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-BY2ZM1OO.js","snippetPresets-x-8ACO8V.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","Page-CTxrMSpo.js","ApiExamples-Ch-SJE05.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CqqG_0NE.js","shallow-BXrZ2b0C.js","getApiPlaygroundDisplay-n7J_wkjq.js","CodeSnippet-CQsp4vyQ.js","CodeSnippets-BfuHqvZx.js","getPastedJson-BjrGIK1i.js","icon-7iLZnVOC.js","MethodPill-TBS1m84e.js","DuplicateIcon-BNMrV4Vs.js","createIcon-C5kCqeU2.js","DynamicMarkdown-Bq09mRwR.js","SectionHeading-G4Bflf5Q.js","axios-vUo_bRtp.js","Markdown-BTUds0aX.js","clsx-6wHzaN2_.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-BPypQKlo.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-o6bee4ro.js"]}