Search the docs
Find a page, a section, or an endpoint.
routing-rules
Every routing-rules endpoint, generated from the API's own schemas.
List routing rules
get/api/v1/routing-rules
Every rule in the workspace, newest domain-first. `domain_id` narrows it to one domain.
Parameters
- domain_iduuid
Responses
- 200A page of rules.
- 401No API key, or one that is not valid.
- 404No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
- 429Rate limited. `X-RateLimit-Reset` says when to retry.
curl https://pidgeon.ai/api/v1/routing-rules \
-H "Authorization: Bearer $PIDGEON_API_KEY"Route an address somewhere
post/api/v1/routing-rules
An address always beats a rule, so a rule for an address that already exists is refused rather than silently ignored. Name exactly one destination: an address you could already send from, or a webhook — a webhook destination has no inbox, so the message is handed to the endpoint and then gone.
Responses
- 201The rule.
- 401No API key, or one that is not valid.
- 404No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
- 429Rate limited. `X-RateLimit-Reset` says when to retry.
curl https://pidgeon.ai/api/v1/routing-rules \
-X POST \
-H "Authorization: Bearer $PIDGEON_API_KEY" \
-H "Content-Type: application/json" \
-d '{ … }'Enable or disable a rule
patch/api/v1/routing-rules/{id}
A disabled rule still says where that address was going, which is what you want during an incident. What it matches and where it points are the rule itself and cannot be edited — create the replacement and delete this one.
Parameters
- idstring
Body
- statusenum
active · disabled
Responses
- 200The rule.
- 401No API key, or one that is not valid.
- 404No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
- 429Rate limited. `X-RateLimit-Reset` says when to retry.
curl https://pidgeon.ai/api/v1/routing-rules/{id} \
-X PATCH \
-H "Authorization: Bearer $PIDGEON_API_KEY" \
-H "Content-Type: application/json" \
-d '{ … }'Delete a routing rule
delete/api/v1/routing-rules/{id}
Parameters
- idstring
Responses
- 200Deleted.
- 401No API key, or one that is not valid.
- 404No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
- 429Rate limited. `X-RateLimit-Reset` says when to retry.
curl https://pidgeon.ai/api/v1/routing-rules/{id} \
-X DELETE \
-H "Authorization: Bearer $PIDGEON_API_KEY"