<Intro>

<EndpointHeader />

<Description>

Returns a paginated list of the workspace's inbound routes in evaluation order — priority ascending, lowest number first. Filter by domain or by enabled state.

</Description>

</Intro>

<Parameters in="query">

<Parameter name="domain" type="string">

<Description>

Filter to routes on this domain.

</Description>

</Parameter>

<Parameter name="enabled" type="boolean">

<Description>

Filter by enabled state.

</Description>

</Parameter>

<Parameter name="limit" type="integer">

<Description>

Maximum number of items to return per page.

</Description>

</Parameter>

<Parameter name="starting_after" type="string">

<Description>

Cursor from the `next_cursor` field of a previous list response. Returns items immediately after the cursor position in the current sort order.

</Description>

</Parameter>

<Parameter name="ending_before" type="string">

<Description>

Cursor from the `prev_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order.

</Description>

</Parameter>

</Parameters>

<Payload kind="response">

<Field name="data" type="array of object" required>

<Description>

Page of inbound routes in evaluation order: lowest priority number first.

</Description>

<FieldChildren kind="response">

<Field name="id" type="string" prefix="data." required>

<Description>

Inbound route ID.

</Description>

</Field>

<Field name="domain" type="string" prefix="data." required>

<Description>

The domain the route applies to.

</Description>

</Field>

<Field name="match_type" type="string" prefix="data." required>

<Description>

How the route matches recipients. `address` matches one local part; `catch_all` matches every recipient on the domain that nothing else matched.

</Description>

<Description>

Possible values: `address`, `catch_all`

</Description>

</Field>

<Field name="match_value" type="nullable string" prefix="data." required>

<Description>

The local part an `address` route matches. Null for `catch_all` routes.

</Description>

</Field>

<Field name="action" type="string" prefix="data." required>

<Description>

What happens to matching mail. `deliver_to_mailbox` delivers it to `target_mailbox_id`; `drop` discards it silently, with nothing stored and no webhook fired.

</Description>

<Description>

Possible values: `deliver_to_mailbox`, `drop`

</Description>

</Field>

<Field name="target_mailbox_id" type="nullable string" prefix="data." required>

<Description>

The mailbox that receives matching mail. Null for `drop` routes.

</Description>

</Field>

<Field name="priority" type="integer" prefix="data." required>

<Description>

Evaluation order — lowest number wins. Explicit routes accept 11–1000 (default 100); the mailbox's own address always matches at priority 10.

</Description>

</Field>

<Field name="enabled" type="boolean" prefix="data." required>

<Description>

Whether the route is evaluated. Disabled routes are kept but skipped.

</Description>

</Field>

<Field name="created_at" type="string" prefix="data." required>

<Description>

When the route was created.

</Description>

</Field>

<Field name="updated_at" type="string" prefix="data." required>

<Description>

When the route was last updated.

</Description>

</Field>

</FieldChildren>

</Field>

<Field name="next_cursor" type="nullable string" required>

<Description>

Cursor for the next page. Pass back as `starting_after` to advance forward. Null when no next page exists.

</Description>

</Field>

<Field name="prev_cursor" type="nullable string" required>

<Description>

Cursor for the previous page. Pass back as `ending_before` to step backward. Null when no previous page exists.

</Description>

</Field>

<Field name="refresh_cursor" type="nullable string" required>

<Description>

Refresh anchor. Pass back as `ending_before` later to fetch items that have appeared since this response. Non-null whenever `data` is non-empty; null only on an empty page. Distinct from `prev_cursor`.

</Description>

</Field>

</Payload>