Inbound Routing

5 endpoints

PUT/api/inbound/rules/{id}auth required

Update an inbound routing rule

Updates an existing inbound routing rule. All fields are optional; only provided fields are changed.

Parameters
NameInTypeRequiredDescription
idpathstringrequiredThe ID of the routing rule.
Request Bodyrequired
FieldTypeRequiredDescription
namestringoptional
prioritynumberoptional
isEnabledbooleanoptional
conditionsobject[]optional
actionsobject[]optional
metadataobjectoptional
Responses
200The updated routing rule.
FieldTypeRequiredDescription
idstringrequired
namestringrequired
priorityanyrequired
isEnabledanyrequired
conditionsanyrequired
actionsanyrequired
metadataanyrequired
createdAtstringrequired
updatedAtstringrequired
400Invalid request body
401Unauthorized
404Routing rule not found
500Internal server error
DELETE/api/inbound/rules/{id}auth required

Delete an inbound routing rule

Permanently deletes an inbound routing rule by its ID.

Parameters
NameInTypeRequiredDescription
idpathstringrequiredThe ID of the routing rule.
Responses
200Deletion confirmed.
FieldTypeRequiredDescription
deletedbooleanrequired
401Unauthorized
404Routing rule not found
500Internal server error
GET/api/inbound/rulesauth required

List inbound routing rules

Returns a paginated list of inbound routing rules for the organization.

Parameters
NameInTypeRequiredDescription
pagequeryintegeroptionalPage number (1-based). Defaults to 1.
pageSizequeryintegeroptionalNumber of items per page. Defaults to 25.
projectIdquerystring (uuid)optionalThe project whose routing rules to list. Omit only when the organization has one project; otherwise 400 PROJECT_REQUIRED. A project you cannot open is 404.
Responses
200Paginated list of routing rules.
FieldTypeRequiredDescription
dataobject[]required
totalnumberrequired
pagenumberrequired
pageSizenumberrequired
400PROJECT_REQUIRED — the organization has several projects and no projectId was given
FieldTypeRequiredDescription
errorstringrequired
401Unauthorized
404projectId is not a project the caller can open
FieldTypeRequiredDescription
errorstringrequired
500Internal server error
POST/api/inbound/rulesauth required

Create an inbound routing rule

Creates a new inbound routing rule with conditions and actions for processing incoming emails.

Request Bodyrequired
FieldTypeRequiredDescription
namestringrequired
prioritynumberoptional
isEnabledbooleanoptional
conditionsobject[]required
actionsobject[]required
metadataobjectoptional
projectIdstring (uuid)optional
Responses
200The newly created routing rule.
FieldTypeRequiredDescription
idstringrequired
namestringrequired
priorityanyrequired
isEnabledanyrequired
conditionsanyrequired
actionsanyrequired
metadataanyrequired
createdAtstringrequired
updatedAtstringrequired
400Invalid request body, or PROJECT_REQUIRED — the organization has several projects and no projectId was given
401Unauthorized
404projectId is not a project the caller can open
422NO_PROJECT — the organization has no project yet
500Internal server error
POST/api/inbound/testauth required

Test inbound routing rules

Simulates an incoming email against all active routing rules and returns which rules would match along with their actions.

Request Bodyrequired
FieldTypeRequiredDescription
fromstringrequired
tostringrequired
subjectstringrequired
bodystringoptional
sizenumberoptional
headersobjectoptional
projectIdstring (uuid)optional
Responses
200Test results showing matched rules and evaluated count.
FieldTypeRequiredDescription
matchedRulesobject[]required
totalRulesEvaluatednumberrequired
400Invalid request body, or PROJECT_REQUIRED — the organization has several projects and no projectId was given
FieldTypeRequiredDescription
errorstringrequired
401Unauthorized
404projectId is not a project the caller can open
FieldTypeRequiredDescription
errorstringrequired
500Internal server error