Create and manage AhaSend inbound email routes from the CLI: match recipients, POST parsed emails to your webhook, and test locally with routes listen.
AhaSend CLI routes commands let you manage inbound email routes, and forward and trigger their events; this page lists their arguments and flags. For the complete local testing workflow, use the route testing guide. For dashboard setup, see the routes guide.Before running the examples, log in with an API key that has the read, write and delete route scopes for all domains, and messages:read for the domain of the route’s recipient, which routes listen and routes trigger need. Replace example.com in the recipients with a receiving domain: a domain in your account whose MX record points to AhaSend. Replace YOUR_RESOURCE_ID with the ID of one of your routes.
listen - Listen for inbound email events in real-time
trigger - Trigger route events for testing
routes get, routes update, routes delete and routes trigger take the route ID as their positional argument. A route ID that is not a UUID fails with exit code 4 before any request. Find IDs with ahasend routes list.A route receives email only when its domain’s MX record points to AhaSend. The DNS records that ahasend domains create prints include that MX record, marked optional; see domains.
--recipient, on create, update and listen, takes the form local@domain. The domain must be one of your domains. The local part cannot be empty, and may be * or hold * wildcards:
support@example.com - one address
*@example.com - every address of the domain
support-*@example.com - every address that starts with support-
A value of another form, such as support@*, fails with exit code 4 before any request. The API checks that the domain is one of yours. A route’s recipient cannot be cleared.
# List all routesahasend routes list# List up to 10 routesahasend routes list --limit 10# List the routes of one recipient domainahasend routes list --domain example.com# Show only the enabled routes of the pageahasend routes list --enabled# Show only the disabled routes of the pageahasend routes list --enabled=false# JSON outputahasend routes list --output json
--domain filters by recipient domain. An API key scoped to domains requires it.
--enabled filters the page that the API returned, so a page can hold fewer than --limit routes. It cannot be used with --output json, which prints the API’s response unchanged; filter the routes’ enabled field instead.
# Create a route for one addressahasend routes create \ --name "Support route" \ --url https://api.example.com/inbound/support \ --recipient "support@example.com"# Route every address of a domain, with attachmentsahasend routes create \ --name "Help desk" \ --url https://api.example.com/support \ --recipient "*@example.com" \ --include-attachments# Route with processing options, created disabledahasend routes create \ --name "Sales inquiries" \ --url https://api.example.com/sales \ --recipient "sales-*@example.com" \ --include-headers \ --group-by-message-id \ --strip-replies \ --enabled=false
--name, --url and --recipient are required. When one is missing and stdin is a terminal, the command asks for it. With --non-interactive, or when stdin is not a terminal, a missing value fails with exit code 4.
A route is enabled unless you set --enabled=false. The processing options are off unless you set their flags.
--url must be an HTTP or HTTPS URL with a host name and no user name or password. Use HTTPS in production: a plain HTTP URL for a host other than localhost or a loopback address prints a warning on stderr.
The output shows the route’s signing secret once, in every output format. Save it to verify the signatures of the emails the route posts; routes get does not show it.
Show a route’s name, URL, status, recipient, processing options, timestamps and call counters. The output has no secret: the API returns it only when you create the route.
ahasend routes get YOUR_RESOURCE_ID# Save the route's configuration as JSONahasend routes get YOUR_RESOURCE_ID --output json > route-backup.json
routes listen streams inbound email events (message.routing) to your terminal over a WebSocket connection, and can forward each event to a local endpoint. It prints events as text, whatever --output says, and runs until you press Ctrl+C or the connection closes. Give exactly one of --route-id and --recipient.
# Listen through an existing routeahasend routes listen --route-id YOUR_RESOURCE_ID# Listen through a temporary route for a recipient patternahasend routes listen --recipient "*@example.com"# Forward events to a local serverahasend routes listen --recipient "support-*@example.com" \ --forward-to http://localhost:3000/webhook
The API key needs the routes:write:all scope, and messages:read for the domain of the route’s recipient. With --recipient, the API creates a temporary route that stays after the command ends. Forwarded events are signed with a forwarding secret that the command prints when it connects. The route testing guide covers temporary routes, forwarding, signatures and exit codes.
routes trigger asks the API to send a test message.routing event to a route, so you can test your endpoint without sending real email. The API key needs messages:read for the domain of the route’s recipient (messages:read:all, or messages:read:{example.com}); route scopes do not grant it.
ahasend routes trigger YOUR_RESOURCE_ID
The output is the API’s message. A disabled route gets no event: the API answers that it is queued, and then drops it. Enable the route first with ahasend routes update YOUR_RESOURCE_ID --enabled.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"AhaSend","description":"AhaSend is a European transactional email service for developers: send through a REST API, SMTP relay, CLI or the official Node.js and Go SDKs, with data stored in the EU and 1,000 free emails per month.","colors":{"primary":"#066fd1","light":"#F8FAFC","dark":"#0F172A"},"logo":{"light":"https://mintcdn.com/ahasend/F35Ozd-1GsftDpcH/logo.png?fit=max\u0026auto=format\u0026n=F35Ozd-1GsftDpcH\u0026q=85\u0026s=ca1d4c27f7c2811598e65cb25a21323c","dark":"https://mintcdn.com/ahasend/F35Ozd-1GsftDpcH/logo-dark.png?fit=max\u0026auto=format\u0026n=F35Ozd-1GsftDpcH\u0026q=85\u0026s=bb6b9068b30f93fd1ea216e2a7c1d137","href":"https://ahasend.com/"},"favicon":"https://mintcdn.com/ahasend/F35Ozd-1GsftDpcH/favicon.png?fit=max\u0026auto=format\u0026n=F35Ozd-1GsftDpcH\u0026q=85\u0026s=ac855c16b6cb74b8c5965d2e7ef3e324","appearance":{"strict":false},"navbar":{"links":[{"href":"https://dash.ahasend.com","label":"Login"}],"primary":{"type":"button","label":"Get Started","href":"https://dash.ahasend.com/user/register"}},"footer":{"socials":{"x":"https://x.com/aha_send","linkedin":"https://www.linkedin.com/company/ahasend","github":"https://github.com/ahasend"},"links":[{"header":"Resources","items":[{"label":"Pricing","href":"https://ahasend.com/pricing"},{"label":"Support","href":"mailto:support@ahasend.com"},{"label":"Status","href":"https://status.ahasend.com"},{"label":"Security","href":"https://ahasend.com/security"}]},{"header":"Company","items":[{"label":"Blog","href":"https://ahasend.com/blog"},{"label":"Feedback Board","href":"https://ahasend.sleekplan.app/"}]},{"header":"Legal","items":[{"label":"Imprint","href":"https://ahasend.com/imprint"},{"label":"Terms of Service","href":"https://ahasend.com/terms"},{"label":"Privacy Policy","href":"https://ahasend.com/privacy"},{"label":"Data Processing Agreement","href":"https://ahasend.com/dpa"}]}]},"seo":{"metatags":{"canonical":"https://ahasend.com/docs","twitter:site":"@aha_send"},"organization":{"name":"AhaSend","legalName":"AhaSend B.V.","url":"https://ahasend.com","sameAs":["https://x.com/aha_send","https://www.linkedin.com/company/ahasend","https://github.com/ahasend"]}},"integrations":{"telemetry":{"enabled":true},"cookies":{"key":"cookieConsent","value":"true"}},"errors":{"404":{"redirect":true}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"thumbnails":{"appearance":"dark","background":"https://mintcdn.com/ahasend/Gpf8BnLpzpIKQ4dU/images/social-background.svg?fit=max\u0026auto=format\u0026n=Gpf8BnLpzpIKQ4dU\u0026q=85\u0026s=df32e1edef517352b8437c75feecbf6e"},"markdown":{"instructions":["AhaSend stores all message data in the EU. See /facts.","The API base URL is https://api.ahasend.com. Send the API key in the Authorization: Bearer header. See /api-reference/authentication.","Use send.ahasend.com for SMTP. Ports 25, 587 and 2525 use STARTTLS. Port 465 is not supported. See /smtp.","For send-only integrations, create an API Key v2 under Credentials → Add and scope it to messages:send:{your-domain}. See /send-api/credentials and /api-reference/scopes."]},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"ahasend","hasAudioNarration":false,"actualSubdomain":"ahasend","customDomains":["ahasend.com"],"gitSource":{"type":"github","owner":"ahasend","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6adfc073cd3471cd953b0201","collectionId":"4784fba2-4354-479f-8cd1-66684a92aba7","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6adfc073cd3471cd953b0201"},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6adfc319e83fbbb268c93e4e","clientVersion":"0.0.3971","searchFilterCounts":[{"language":"default","tag":"API Reference","count":148},{"language":"default","tag":"API reference","count":114},{"language":"default","tag":"Documentation","count":68},{"language":"default","tag":"Guides","count":52},{"language":"default","tag":"Integrations","count":41},{"language":"default","tag":"Webhooks","count":29},{"language":"default","tag":"CLI","count":25},{"language":"default","tag":"Commands","count":15},{"language":"default","tag":"Domain Authentication","count":13},{"language":"default","tag":"Campaigns","count":12}]},"assistantConfig":{},"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":"editor-v7-file-tree","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":"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":"pause-universal-search-reconcile","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":"per-site-search-delta","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":"editor-private-page-search","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":"editor-nav-generations","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":"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":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"privacy":{"consentBanner":{"enabled":false}},"isAtlas":false,"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"#content-container table{display:table}#content-container table thead th{text-align:left}"},{"filePath":"roadmap.css","content":".rm{display:flex;flex-direction:column;gap:2.5rem;margin-top:1.5rem}.rm-head{display:flex;align-items:center;gap:.65rem;margin-bottom:1rem}.rm-badge{display:inline-flex;align-items:center;margin:0;border:0;font-size:.78rem;font-weight:600;letter-spacing:.02em;padding:.28rem .75rem;border-radius:999px;line-height:1}.rm-badge.is-active{background:#fdebd0;color:#854f0b}.rm-badge.is-planned{background:#e6f1fb;color:#0c447c}.rm-badge.is-shipped{background:#e1f5ee;color:#0f6e56}.rm-list{display:flex;flex-direction:column;gap:.65rem}.rm-card{display:flex;gap:.9rem;padding:.9rem 1.05rem;background:#fff;border:1px solid #e5e7eb;border-radius:.7rem;transition:transform .15s ease,box-shadow .15s ease}.rm-card:hover{transform:translateY(-1px);box-shadow:0 4px 14px rgba(0,0,0,.06)}.rm-accent{flex:0 0 3px;border-radius:2px}.rm-card.is-active .rm-accent{background:#ba7517}.rm-card.is-planned .rm-accent{background:#378add}.rm-card.is-shipped .rm-accent{background:#1d9e75}.rm-card.is-sub{margin-left:2rem;position:relative}.rm-card p,.rm-card.is-sub .rm-title{font-size:.9rem}.rm-card.is-sub::after,.rm-card.is-sub::before{content:\"\";position:absolute;left:-1.15rem;pointer-events:none}.rm-card.is-sub::before{top:-.65rem;height:calc(100% + .65rem);border-left:1.5px solid #d1d5db}.rm-card.is-sub::after{top:50%;width:.85rem;border-top:1.5px solid #d1d5db}.rm-card .rm-title{margin:0 0 .2rem;font-size:.97rem;font-weight:600;line-height:1.35;color:#111827}.rm-card p{margin:0;line-height:1.55;color:#4b5563}.rm-date,.rm-tag{display:inline-block}.rm-date{margin-top:.5rem;font-size:.78rem;font-weight:600;color:#0f6e56}.rm-tag{margin-left:.5rem;font-size:.66rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;padding:.16rem .5rem;border-radius:999px;vertical-align:middle;line-height:1.4;color:#fff;box-shadow:0 1px 2px rgba(0,0,0,.15)}.rm-tag.is-new{background:#6d28d9}.rm-tag.is-product{background:#be123c}.rm-tag.is-improvement{background:#0e7490}.rm-tag.is-early{background:#1d4ed8}.rm-tag.is-bugfix{background:#c2410c}.dark .rm-card{background:rgba(255,255,255,.025);border-color:rgba(255,255,255,.09)}.dark .rm-card p{color:#9ca3af}.dark .rm-badge.is-active{background:rgba(186,117,23,.18);color:#fac074}.dark .rm-badge.is-planned{background:rgba(55,138,221,.18);color:#85b7eb}.dark .rm-badge.is-shipped{background:rgba(29,158,117,.18);color:#5dcaa5}.dark .rm-date{color:#5dcaa5}.dark .rm-card.is-sub::after,.dark .rm-card.is-sub::before{border-color:rgba(255,255,255,.18)}.rm-note{margin-top:2.5rem;font-size:.85rem;color:#6b7280}.dark .rm-note{color:#9ca3af}.dark .rm-card .rm-title{color:#e7e9ee}.rm-jump{margin:-.5rem 0 0;font-size:.88rem}.rm-jump a{color:#2296ff;text-decoration:none;font-weight:500}.rm-jump a:hover{text-decoration:underline}.rm-badge[id]{scroll-margin-top:6rem}"}],"page":{"pagePath":"cli/commands/routes","slug":"/cli/commands/routes","pageMetadata":{"title":"ahasend routes: Manage Inbound Email Routes","description":"Create and manage AhaSend inbound email routes from the CLI: match recipients, POST parsed emails to your webhook, and test locally with routes listen.","icon":"route","sidebarTitle":"routes","href":"/cli/commands/routes"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Create and manage AhaSend inbound email routes from the CLI: match recipients, POST parsed emails to your webhook, and test locally with routes listen.\"\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,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`AhaSend CLI `,_jsx(_components.code,{children:`routes`}),` commands let you manage inbound email routes, and forward and trigger their events; this page lists their arguments and flags. For the complete local testing workflow, use the `,_jsx(_components.a,{href:`/cli/route-testing`,children:`route testing guide`}),`. For dashboard setup, see `,_jsx(_components.a,{href:`/integrations/routing`,children:`the routes guide`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Before running the examples, `,_jsx(_components.a,{href:`/cli/authentication`,children:`log in`}),` with an API key that has the read, write and delete `,_jsx(_components.a,{href:`/api-reference/scopes#email-routing`,children:`route scopes`}),` for all domains, and `,_jsx(_components.code,{children:`messages:read`}),` for the domain of the route’s recipient, which `,_jsx(_components.code,{children:`routes listen`}),` and `,_jsx(_components.code,{children:`routes trigger`}),` need. Replace `,_jsx(_components.code,{children:`example.com`}),` in the recipients with a receiving domain: a domain in your account whose MX record points to AhaSend. Replace `,_jsx(_components.code,{children:`YOUR_RESOURCE_ID`}),` with the ID of one of your routes.`]}),`\n`,_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`ahasend routes [subcommand] [flags]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`Available subcommands:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`list`}),` - List inbound email routes`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`create`}),` - Create an inbound email route`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`get`}),` - Get an inbound email route`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`update`}),` - Update an inbound email route`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`delete`}),` - Delete an inbound email route`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`listen`}),` - Listen for inbound email events in real-time`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`trigger`}),` - Trigger route events for testing`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`routes get`}),`, `,_jsx(_components.code,{children:`routes update`}),`, `,_jsx(_components.code,{children:`routes delete`}),` and `,_jsx(_components.code,{children:`routes trigger`}),` take the route ID as their positional argument. A route ID that is not a UUID fails with exit code 4 before any request. Find IDs with `,_jsx(_components.code,{children:`ahasend routes list`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`A route receives email only when its domain’s MX record points to AhaSend. The DNS records that `,_jsx(_components.code,{children:`ahasend domains create`}),` prints include that MX record, marked optional; see `,_jsx(_components.a,{href:`/cli/commands/domains#create-domain`,children:`domains`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`recipient-patterns`,children:`Recipient Patterns`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`--recipient`}),`, on `,_jsx(_components.code,{children:`create`}),`, `,_jsx(_components.code,{children:`update`}),` and `,_jsx(_components.code,{children:`listen`}),`, takes the form `,_jsx(_components.code,{children:`local@domain`}),`. The domain must be one of your domains. The local part cannot be empty, and may be `,_jsx(_components.code,{children:`*`}),` or hold `,_jsx(_components.code,{children:`*`}),` wildcards:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`support@example.com`}),` - one address`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`*@example.com`}),` - every address of the domain`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`support-*@example.com`}),` - every address that starts with `,_jsx(_components.code,{children:`support-`})]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`A value of another form, such as `,_jsx(_components.code,{children:`support@*`}),`, fails with exit code 4 before any request. The API checks that the domain is one of yours. A route’s recipient cannot be cleared.`]}),`\n`,_jsx(Heading,{level:`2`,id:`list-routes`,children:`List Routes`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`17`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`17`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# List all routes`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ahasend`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` routes`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` list`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# List up to 10 routes`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ahasend`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` routes`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` list`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --limit`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 10`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# List the routes of one recipient domain`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ahasend`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` routes`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` list`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --domain`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` example.com`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Show only the enabled routes of the page`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ahasend`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` routes`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` list`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --enabled`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Show only the disabled routes of the page`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ahasend`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` routes`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` list`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --enabled=false`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# JSON output`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ahasend`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` routes`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` list`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --output`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` json`})]}),`\n`]})})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`--domain`}),` filters by recipient domain. An API key scoped to domains requires it.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`--enabled`}),` filters the page that the API returned, so a page can hold fewer than `,_jsx(_components.code,{children:`--limit`}),` routes. It cannot be used with `,_jsx(_components.code,{children:`--output json`}),`, which prints the API’s response unchanged; filter the routes’ `,_jsx(_components.code,{children:`enabled`}),` field instead.`]}),`\n`,_jsxs(_components.li,{children:[`Pages work as `,_jsx(_components.a,{href:`/cli/configuration#lists-and-pagination`,children:`Lists and Pagination`}),` describes.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`create-route`,children:`Create Route`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`22`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`22`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Create a route for one address`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ahasend`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` routes`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` create`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --name`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Support route\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --url`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.example.com/inbound/support`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --recipient`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"support@example.com\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Route every address of a domain, with attachments`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ahasend`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` routes`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` create`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --name`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Help desk\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --url`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.example.com/support`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --recipient`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"*@example.com\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --include-attachments`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Route with processing options, created disabled`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ahasend`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` routes`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` create`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --name`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Sales inquiries\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --url`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.example.com/sales`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --recipient`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"sales-*@example.com\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --include-headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --group-by-message-id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --strip-replies`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --enabled=false`})}),`\n`]})})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`--name`}),`, `,_jsx(_components.code,{children:`--url`}),` and `,_jsx(_components.code,{children:`--recipient`}),` are required. When one is missing and stdin is a terminal, the command asks for it. With `,_jsx(_components.code,{children:`--non-interactive`}),`, or when stdin is not a terminal, a missing value fails with exit code 4.`]}),`\n`,_jsxs(_components.li,{children:[`A route is enabled unless you set `,_jsx(_components.code,{children:`--enabled=false`}),`. The processing options are off unless you set their flags.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`--url`}),` must be an HTTP or HTTPS URL with a host name and no user name or password. Use HTTPS in production: a plain HTTP URL for a host other than `,_jsx(_components.code,{children:`localhost`}),` or a loopback address prints a warning on stderr.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`The output shows the route’s signing secret once, in every output format. Save it to `,_jsx(_components.a,{href:`/api-reference/webhooks/security`,children:`verify the signatures`}),` of the emails the route posts; `,_jsx(_components.code,{children:`routes get`}),` does not show it.`]}),`\n`,_jsx(Heading,{level:`2`,id:`get-route`,children:`Get Route`}),`\n`,_jsx(_components.p,{children:`Show a route’s name, URL, status, recipient, processing options, timestamps and call counters. The output has no secret: the API returns it only when you create the route.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ahasend`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` routes`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` get`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` YOUR_RESOURCE_ID`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Save the route's configuration as JSON`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ahasend`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` routes`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` get`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` YOUR_RESOURCE_ID`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --output`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` >`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` route-backup.json`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`update-route`,children:`Update Route`}),`\n`,_jsxs(_components.p,{children:[`Only the flags you set are sent; other settings stay as they are. Give at least one flag. Each on/off option turns off with `,_jsx(_components.code,{children:`=false`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`23`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`23`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Change the name`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ahasend`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` routes`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` update`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` YOUR_RESOURCE_ID`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --name`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"New route name\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Change the webhook URL`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ahasend`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` routes`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` update`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` YOUR_RESOURCE_ID`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --url`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.example.com/new-webhook`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Enable or disable the route`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ahasend`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` routes`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` update`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` YOUR_RESOURCE_ID`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --enabled`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ahasend`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` routes`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` update`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` YOUR_RESOURCE_ID`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --enabled=false`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Change the recipient pattern`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ahasend`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` routes`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` update`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` YOUR_RESOURCE_ID`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --recipient`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"support-*@example.com\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Turn processing options on`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ahasend`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` routes`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` update`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` YOUR_RESOURCE_ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --include-attachments`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --include-headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --group-by-message-id`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Turn processing options off`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ahasend`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` routes`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` update`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` YOUR_RESOURCE_ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --include-attachments=false`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --strip-replies=false`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`delete-route`,children:`Delete Route`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Delete with a confirmation prompt`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ahasend`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` routes`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` delete`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` YOUR_RESOURCE_ID`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Skip the confirmation prompt`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ahasend`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` routes`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` delete`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` YOUR_RESOURCE_ID`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --force`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The command asks for confirmation first, as `,_jsx(_components.a,{href:`/cli/configuration#prompts`,children:`Prompts`}),` describes; `,_jsx(_components.code,{children:`--force`}),` (`,_jsx(_components.code,{children:`-f`}),`) skips it.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Deleting a route is irreversible. To keep a route for later, disable it instead: `,_jsx(_components.code,{children:`ahasend routes update YOUR_RESOURCE_ID --enabled=false`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`listen-for-inbound-email`,children:`Listen for Inbound Email`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`routes listen`}),` streams inbound email events (`,_jsx(_components.code,{children:`message.routing`}),`) to your terminal over a WebSocket connection, and can forward each event to a local endpoint. It prints events as text, whatever `,_jsx(_components.code,{children:`--output`}),` says, and runs until you press Ctrl+C or the connection closes. Give exactly one of `,_jsx(_components.code,{children:`--route-id`}),` and `,_jsx(_components.code,{children:`--recipient`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Listen through an existing route`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ahasend`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` routes`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` listen`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --route-id`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` YOUR_RESOURCE_ID`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Listen through a temporary route for a recipient pattern`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ahasend`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` routes`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` listen`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --recipient`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"*@example.com\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Forward events to a local server`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ahasend`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` routes`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` listen`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --recipient`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"support-*@example.com\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --forward-to`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` http://localhost:3000/webhook`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The API key needs the `,_jsx(_components.code,{children:`routes:write:all`}),` scope, and `,_jsx(_components.code,{children:`messages:read`}),` for the domain of the route’s recipient. With `,_jsx(_components.code,{children:`--recipient`}),`, the API creates a temporary route that stays after the command ends. Forwarded events are signed with a forwarding secret that the command prints when it connects. The `,_jsx(_components.a,{href:`/cli/route-testing`,children:`route testing guide`}),` covers temporary routes, forwarding, signatures and exit codes.`]}),`\n`,_jsx(Heading,{level:`2`,id:`trigger-test-events`,children:`Trigger Test Events`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`routes trigger`}),` asks the API to send a test `,_jsx(_components.code,{children:`message.routing`}),` event to a route, so you can test your endpoint without sending real email. The API key needs `,_jsx(_components.code,{children:`messages:read`}),` for the domain of the route’s recipient (`,_jsx(_components.code,{children:`messages:read:all`}),`, or `,_jsx(_components.code,{children:`messages:read:{example.com}`}),`); route scopes do not grant it.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ahasend`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` routes`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` trigger`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` YOUR_RESOURCE_ID`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The output is the API’s message. A disabled route gets no event: the API answers that it is queued, and then drops it. Enable the route first with `,_jsx(_components.code,{children:`ahasend routes update YOUR_RESOURCE_ID --enabled`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`command-flags`,children:`Command Flags`}),`\n`,_jsxs(_components.p,{children:[`These flags come from the CLI’s `,_jsx(_components.code,{children:`--help`}),`. All commands also accept the `,_jsx(_components.a,{href:`/cli/configuration#global-flags`,children:`global flags`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`routes-create`,children:_jsx(_components.code,{children:`routes create`})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Flag`}),_jsx(_components.th,{children:`Description and default`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--enabled`})}),_jsx(_components.td,{children:`Enable the route (the API enables it when omitted) (default true)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--group-by-message-id`})}),_jsx(_components.td,{children:`Group related emails by message ID (conversation threading)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--idempotency-key string`})}),_jsx(_components.td,{children:`Idempotency key for safe retries (generated when omitted)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--include-attachments`})}),_jsx(_components.td,{children:`Include email attachments in webhook payload`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--include-headers`})}),_jsx(_components.td,{children:`Include email headers in webhook payload`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--name string`})}),_jsx(_components.td,{children:`Route name (required)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--non-interactive`})}),_jsx(_components.td,{children:`Never prompt; fail when a required flag is missing`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--recipient string`})}),_jsxs(_components.td,{children:[`Recipient filter, `,_jsx(_components.code,{children:`local@domain`}),`, such as `,_jsx(_components.code,{children:`support@example.com`}),` or `,_jsx(_components.code,{children:`*@example.com`}),` (required)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--strip-replies`})}),_jsx(_components.td,{children:`Strip reply content from emails`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--url string`})}),_jsx(_components.td,{children:`Webhook URL for processing emails (required)`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`routes-delete`,children:_jsx(_components.code,{children:`routes delete`})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Flag`}),_jsx(_components.th,{children:`Description and default`})]})}),_jsx(_components.tbody,{children:_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`-f`}),`, `,_jsx(_components.code,{children:`--force`})]}),_jsx(_components.td,{children:`Skip confirmation prompt`})]})})]}),`\n`,_jsx(Heading,{level:`3`,id:`routes-get`,children:_jsx(_components.code,{children:`routes get`})}),`\n`,_jsxs(_components.p,{children:[`This command has no command-specific flags. See `,_jsx(_components.a,{href:`/cli/configuration#global-flags`,children:`global flags`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`routes-list`,children:_jsx(_components.code,{children:`routes list`})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Flag`}),_jsx(_components.th,{children:`Description and default`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--after string`})}),_jsx(_components.td,{children:`Return the page after this cursor`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--before string`})}),_jsx(_components.td,{children:`Return the page before this cursor`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--domain string`})}),_jsx(_components.td,{children:`Filter by recipient domain (required with a domain-scoped API key)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--enabled`})}),_jsxs(_components.td,{children:[`Show only enabled (`,_jsx(_components.code,{children:`--enabled`}),`) or disabled (`,_jsx(_components.code,{children:`--enabled=false`}),`) routes of the page (not with `,_jsx(_components.code,{children:`--output json`}),`)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--limit int32`})}),_jsx(_components.td,{children:`Maximum number of items to return (0-100; 0 uses the API default)`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`routes-listen`,children:_jsx(_components.code,{children:`routes listen`})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Flag`}),_jsx(_components.th,{children:`Description and default`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--forward-to string`})}),_jsx(_components.td,{children:`Local endpoint to forward events to`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--recipient string`})}),_jsxs(_components.td,{children:[`Recipient pattern for temporary route (e.g., `,_jsx(_components.code,{children:`*@domain.com`}),`)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--route-id string`})}),_jsx(_components.td,{children:`Use existing route instead of creating temporary one`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--skip-verify`})}),_jsxs(_components.td,{children:[`Skip SSL certificate verification for local endpoints when forwarding events (needs `,_jsx(_components.code,{children:`--forward-to`}),`)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--slim-output`})}),_jsx(_components.td,{children:`Slim down the payload for printing to the console`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`routes-trigger`,children:_jsx(_components.code,{children:`routes trigger`})}),`\n`,_jsxs(_components.p,{children:[`This command has no command-specific flags. See `,_jsx(_components.a,{href:`/cli/configuration#global-flags`,children:`global flags`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`routes-update`,children:_jsx(_components.code,{children:`routes update`})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Flag`}),_jsx(_components.th,{children:`Description and default`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--enabled`})}),_jsxs(_components.td,{children:[`Enable (`,_jsx(_components.code,{children:`--enabled`}),`) or disable (`,_jsx(_components.code,{children:`--enabled=false`}),`) the route`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--group-by-message-id`})}),_jsxs(_components.td,{children:[`Group related emails by message ID (`,_jsx(_components.code,{children:`=false`}),` to stop)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--include-attachments`})}),_jsxs(_components.td,{children:[`Include attachments in the webhook payload (`,_jsx(_components.code,{children:`=false`}),` to stop)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--include-headers`})}),_jsxs(_components.td,{children:[`Include headers in the webhook payload (`,_jsx(_components.code,{children:`=false`}),` to stop)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--name string`})}),_jsx(_components.td,{children:`New route name`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--recipient string`})}),_jsxs(_components.td,{children:[`New recipient filter, `,_jsx(_components.code,{children:`local@domain`}),`, such as `,_jsx(_components.code,{children:`*@example.com`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--strip-replies`})}),_jsxs(_components.td,{children:[`Strip reply content from emails (`,_jsx(_components.code,{children:`=false`}),` to stop)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--url string`})}),_jsx(_components.td,{children:`New webhook URL`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`related-guides`,children:`Related Guides`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/cli/installation`,children:`Install the CLI`}),`, `,_jsx(_components.a,{href:`/cli/authentication`,children:`CLI authentication`}),`, `,_jsx(_components.a,{href:`/integrations/routing`,children:`Inbound routing setup`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/api-reference/routes/route-message`,children:`Route payload`}),`, `,_jsx(_components.a,{href:`/cli/route-testing`,children:`Local route testing`}),`, `,_jsx(_components.a,{href:`/api-reference/webhooks/security`,children:`Signature verification`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/api-reference/webhooks/retry-policy`,children:`Retry policy`}),`, `,_jsx(_components.a,{href:`/cli/configuration`,children:`CLI configuration and output`}),`, `,_jsx(_components.a,{href:`/api-reference/authentication`,children:`API authentication`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/api-reference/scopes`,children:`Permission scopes`}),`.`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"ahasend routes: Manage Inbound Email Routes","description":"Create and manage AhaSend inbound email routes from the CLI: match recipients, POST parsed emails to your webhook, and test locally with routes listen.","icon":"route","sidebarTitle":"routes","href":"/cli/commands/routes"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[]},{"title":"Recipient Patterns","slug":"recipient-patterns","depth":2,"children":[]},{"title":"List Routes","slug":"list-routes","depth":2,"children":[]},{"title":"Create Route","slug":"create-route","depth":2,"children":[]},{"title":"Get Route","slug":"get-route","depth":2,"children":[]},{"title":"Update Route","slug":"update-route","depth":2,"children":[]},{"title":"Delete Route","slug":"delete-route","depth":2,"children":[]},{"title":"Listen for Inbound Email","slug":"listen-for-inbound-email","depth":2,"children":[]},{"title":"Trigger Test Events","slug":"trigger-test-events","depth":2,"children":[]},{"title":"Command Flags","slug":"command-flags","depth":2,"children":[{"title":"routes create","slug":"routes-create","depth":3,"children":[]},{"title":"routes delete","slug":"routes-delete","depth":3,"children":[]},{"title":"routes get","slug":"routes-get","depth":3,"children":[]},{"title":"routes list","slug":"routes-list","depth":3,"children":[]},{"title":"routes listen","slug":"routes-listen","depth":3,"children":[]},{"title":"routes trigger","slug":"routes-trigger","depth":3,"children":[]},{"title":"routes update","slug":"routes-update","depth":3,"children":[]}]},{"title":"Related Guides","slug":"related-guides","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/ahasend/1d760da0535d9f7c/ahasend-gtm.js"],"subdomain":"ahasend","siteName":"AhaSend","title":"ahasend routes: Manage Inbound Email Routes - AhaSend","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-16T17:32:36.698Z","originalFileLocation":"cli/commands/routes.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=\"system\"}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 and manage AhaSend inbound email routes from the CLI: match recipients, POST parsed emails to your webhook, and test locally with routes listen.\">\u003cmeta data-mint-head name=\"application-name\" content=\"AhaSend\">\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/ahasend/4BjAcdwrGYDKJCaO/_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/ahasend/4BjAcdwrGYDKJCaO/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/ahasend/4BjAcdwrGYDKJCaO/_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/ahasend/4BjAcdwrGYDKJCaO/_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/ahasend/4BjAcdwrGYDKJCaO/_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/ahasend/4BjAcdwrGYDKJCaO/_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/ahasend/4BjAcdwrGYDKJCaO/_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/ahasend/4BjAcdwrGYDKJCaO/_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/ahasend/4BjAcdwrGYDKJCaO/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"ahasend routes: Manage Inbound Email Routes - AhaSend\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create and manage AhaSend inbound email routes from the CLI: match recipients, POST parsed emails to your webhook, and test locally with routes listen.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"AhaSend\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://ahasend.com/docs/cli/commands/routes\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://ahasend.mintlify.app/_mintlify/api/og/v2?division=Commands\u0026amp;title=ahasend+routes%3A+Manage+Inbound+Email+Routes\u0026amp;description=Create+and+manage+AhaSend+inbound+email+routes+from+the+CLI%3A+match+recipients%2C+POST+parsed+emails+to+your+webhook%2C+and+test+locally+with+routes+listen.\u0026amp;theme=fec911c84bb9f722051c4af3\u0026amp;signature=abbe2812a6d9df77e2d3cb6cead2d67f6c1fca065fbfe641d8ae2fc0b79f5122\">\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=\"ahasend routes: Manage Inbound Email Routes - AhaSend\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create and manage AhaSend inbound email routes from the CLI: match recipients, POST parsed emails to your webhook, and test locally with routes listen.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://ahasend.mintlify.app/_mintlify/api/og/v2?division=Commands\u0026amp;title=ahasend+routes%3A+Manage+Inbound+Email+Routes\u0026amp;description=Create+and+manage+AhaSend+inbound+email+routes+from+the+CLI%3A+match+recipients%2C+POST+parsed+emails+to+your+webhook%2C+and+test+locally+with+routes+listen.\u0026amp;theme=fec911c84bb9f722051c4af3\u0026amp;signature=abbe2812a6d9df77e2d3cb6cead2d67f6c1fca065fbfe641d8ae2fc0b79f5122\">\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/ahasend/4BjAcdwrGYDKJCaO/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"AhaSend\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#066fd1\">\u003clink data-mint-head rel=\"canonical\" href=\"https://ahasend.com/docs/cli/commands/routes\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/cli/commands/routes.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://ahasend.com/#organization\",\"name\":\"AhaSend\",\"legalName\":\"AhaSend B.V.\",\"url\":\"https://ahasend.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/ahasend/F35Ozd-1GsftDpcH/logo.png?fit=max\u0026auto=format\u0026n=F35Ozd-1GsftDpcH\u0026q=85\u0026s=ca1d4c27f7c2811598e65cb25a21323c\"},\"sameAs\":[\"https://x.com/aha_send\",\"https://www.linkedin.com/company/ahasend\",\"https://github.com/ahasend\"]},{\"@type\":\"WebSite\",\"@id\":\"https://ahasend.com/docs#website\",\"name\":\"AhaSend\",\"url\":\"https://ahasend.com/docs\",\"publisher\":{\"@id\":\"https://ahasend.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://ahasend.com/docs/cli/commands/routes#webpage\",\"url\":\"https://ahasend.com/docs/cli/commands/routes\",\"name\":\"ahasend routes: Manage Inbound Email Routes\",\"description\":\"Create and manage AhaSend inbound email routes from the CLI: match recipients, POST parsed emails to your webhook, and test locally with routes listen.\",\"dateModified\":\"2026-10-16T17:32:36.698Z\",\"isPartOf\":{\"@id\":\"https://ahasend.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://ahasend.com/docs/cli/commands/routes#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://ahasend.com/docs/cli/commands/routes#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Commands\",\"item\":\"https://ahasend.com/docs/cli/commands/messages\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ahasend routes: Manage Inbound Email Routes\",\"item\":\"https://ahasend.com/docs/cli/commands/routes\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://ahasend.com/docs/cli/commands/routes#article\",\"headline\":\"ahasend routes: Manage Inbound Email Routes\",\"name\":\"ahasend routes: Manage Inbound Email Routes\",\"description\":\"Create and manage AhaSend inbound email routes from the CLI: match recipients, POST parsed emails to your webhook, and test locally with routes listen.\",\"url\":\"https://ahasend.com/docs/cli/commands/routes\",\"mainEntityOfPage\":{\"@id\":\"https://ahasend.com/docs/cli/commands/routes#webpage\"},\"dateModified\":\"2026-10-16T17:32:36.698Z\",\"publisher\":{\"@id\":\"https://ahasend.com/#organization\"},\"isPartOf\":{\"@id\":\"https://ahasend.com/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"AhaSend\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"AhaSend","nav":{"global":null,"tabs":[{"tab":"Documentation","icon":"book-open","pages":[{"title":"Documentation","href":""}]},{"tab":"API Reference","icon":"code","pages":[{"title":"API Reference","href":"/api-reference"}]},{"tab":"CLI","icon":"square-terminal","groups":[{"group":"Getting Started","pages":[{"title":"AhaSend CLI: Send Email from Your Terminal","icon":"book","sidebarTitle":"Overview","href":"/cli"},{"title":"Install the AhaSend CLI (macOS, Linux, Windows)","icon":"download","sidebarTitle":"Installation","href":"/cli/installation"},{"title":"CLI Quickstart: Send Email from the Terminal","icon":"play","sidebarTitle":"Quickstart","href":"/cli/quickstart"},{"title":"CLI Authentication: API Keys and Profiles","icon":"key","sidebarTitle":"Authentication","href":"/cli/authentication"},{"title":"CLI Configuration: Config File, Flags, Output","icon":"gear","sidebarTitle":"Configuration","href":"/cli/configuration"},{"title":"CLI Examples: Scripts and CI/CD Automation","icon":"lightbulb","sidebarTitle":"Examples","href":"/cli/examples"}]},{"group":"Commands","pages":[{"title":"ahasend messages: Send and Track Email","icon":"envelope","sidebarTitle":"messages","href":"/cli/commands/messages"},{"title":"ahasend domains: Add and Verify Domains","icon":"globe","sidebarTitle":"domains","href":"/cli/commands/domains"},{"title":"ahasend webhooks: Manage and Test Webhooks","description":"Create, update, and delete AhaSend email event webhooks from the CLI, and test them locally with webhooks listen (forward to localhost) and webhooks trigger.","icon":"webhook","sidebarTitle":"webhooks","href":"/cli/commands/webhooks"},{"title":"ahasend routes: Manage Inbound Email Routes","icon":"route","sidebarTitle":"routes","href":"/cli/commands/routes"},{"title":"ahasend suppressions: Manage Suppressions","description":"List, check, add, and remove suppressed email addresses in AhaSend from the command line, including domain-specific suppressions with expiry and bulk wipe.","icon":"ban","sidebarTitle":"suppressions","href":"/cli/commands/suppressions"},{"title":"ahasend smtp: SMTP Credentials and Test Sends","icon":"server","sidebarTitle":"smtp","href":"/cli/commands/smtp"},{"title":"ahasend apikeys: Manage API Keys","icon":"key","sidebarTitle":"apikeys","href":"/cli/commands/apikeys"},{"title":"ahasend stats: Delivery and Bounce Reports","icon":"chart-line","sidebarTitle":"stats","href":"/cli/commands/stats"},{"title":"ahasend auth: Log In and Manage Profiles","icon":"user-shield","sidebarTitle":"auth","href":"/cli/commands/auth"},{"title":"ahasend ping: Test API Connectivity","icon":"wifi","sidebarTitle":"ping","href":"/cli/commands/ping"},{"title":"ahasend contacts: Manage Account Contacts","sidebarTitle":"contacts","icon":"address-book","href":"/cli/commands/contacts"},{"title":"ahasend lists: Manage Contact Lists","sidebarTitle":"lists","icon":"list-ul","href":"/cli/commands/lists"},{"title":"ahasend templates: Transactional Templates","sidebarTitle":"templates","icon":"file-lines","href":"/cli/commands/templates"},{"title":"ahasend campaigns: Manage Campaigns","sidebarTitle":"campaigns","icon":"bullhorn","href":"/cli/commands/campaigns"},{"title":"ahasend subaccounts: Manage Sub-Accounts","sidebarTitle":"subaccounts","icon":"building","href":"/cli/commands/subaccounts"}]},{"group":"Features","pages":[{"title":"Send Batch Emails from CSV with the CLI","icon":"layer-group","sidebarTitle":"Batch Processing","href":"/cli/batch-processing"},{"title":"Message Content and Substitutions in the CLI","icon":"file-code","sidebarTitle":"Message Content","href":"/cli/templates"},{"title":"Test Webhooks Locally with the CLI","icon":"bug","sidebarTitle":"Webhook Testing","href":"/cli/webhook-testing"},{"title":"Test Inbound Email Routes Locally with the CLI","icon":"envelopes-bulk","sidebarTitle":"Route Testing","href":"/cli/route-testing"}]}]},{"tab":"Guides","icon":"plug","pages":[{"title":"Guides","href":"/guides"}]},{"tab":"Changelog","icon":"clock-rotate-left","pages":[{"title":"Changelog","href":"/changelog"}]},{"tab":"Roadmap","icon":"map","pages":[{"title":"Roadmap","href":"/roadmap"}]}]},"title":"ahasend routes: Manage Inbound Email Routes - AhaSend","buildId":"dpl_GvhK4qVXq51DpfYJLCtPpYNN4YHN","deploymentId":"dpl_GvhK4qVXq51DpfYJLCtPpYNN4YHN","dynamics":[],"chunks":[]}