Inbound Routes
Route inbound mail on a domain to a webhook
5 endpoints
Endpoints
| Method | Path | Description |
| GET | /v1/inbound-routes | GET /v1/inbound-routes |
| POST | /v1/inbound-routes | POST /v1/inbound-routes |
| GET | /v1/inbound-routes/{id} | GET /v1/inbound-routes/:id |
| PUT | /v1/inbound-routes/{id} | PUT /v1/inbound-routes/:id |
| DELETE | /v1/inbound-routes/{id} | DELETE /v1/inbound-routes/:id |
GET /v1/inbound-routes
GET /v1/inbound-routes
Parameters
| Name | In | Type | Required | Description |
page | query | integer | No | Page number (default: 1) |
per_page | query | integer | No | Items per page (default: 25) |
Responses
| Status | Description |
| 200 | Paginated list of inbound routes |
| 401 | Unauthorized |
Example
curl -X GET https://api.euromail.dev/v1/inbound-routes \
-H "X-EuroMail-Api-Key: em_live_..."
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({ apiKey: "em_live_..." });
const result = await euromail.listInboundRoutes();
from euromail import EuroMail
client = EuroMail(api_key="em_live_...")
result = client.list_inbound_routes()
use euromail::EuroMail;
let client = EuroMail::new("em_live_...");
let result = client.list_inbound_routes().await?;
client := euromail.NewClient("em_live_...")
result, err := client.ListInboundRoutes(ctx)
POST /v1/inbound-routes
POST /v1/inbound-routes
Request Body
| Field | Type | Required | Description |
domain_id | string | Yes | |
match_type | string | Yes | |
pattern | string | Yes | |
priority | `integer | null` | No |
webhook_url | `string | null` | No |
Responses
| Status | Description |
| 201 | Inbound route created |
| 401 | Unauthorized |
| 403 | Domain does not belong to account |
| 422 | Validation error |
Example
curl -X POST https://api.euromail.dev/v1/inbound-routes \
-H "X-EuroMail-Api-Key: em_live_..." \
-H "Content-Type: application/json" \
-d '{ "domain_id": "example.com", "match_type": "...", "pattern": "..." }'
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({ apiKey: "em_live_..." });
const result = await euromail.createInboundRoute({
domain_id: "example.com",
match_type: "...",
pattern: "...",
});
from euromail import EuroMail
client = EuroMail(api_key="em_live_...")
result = client.create_inbound_route(
domain_id="example.com",
match_type="...",
pattern="...",
)
use euromail::EuroMail;
let client = EuroMail::new("em_live_...");
let result = client.create_inbound_route(&CreateInboundRouteParams {
domain_id: "example.com".into(),
match_type: "...".into(),
pattern: "...".into(),
..Default::default()
}).await?;
client := euromail.NewClient("em_live_...")
result, err := client.CreateInboundRoute(ctx, euromail.CreateInboundRouteParams{
DomainId: "example.com",
MatchType: "...",
Pattern: "...",
})
GET /v1/inbound-routes/{id}
GET /v1/inbound-routes/:id
Parameters
| Name | In | Type | Required | Description |
id | path | string | Yes | Inbound route ID |
Responses
| Status | Description |
| 200 | Inbound route details |
| 401 | Unauthorized |
| 404 | Inbound route not found |
Example
curl -X GET https://api.euromail.dev/v1/inbound-routes/{id} \
-H "X-EuroMail-Api-Key: em_live_..."
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({ apiKey: "em_live_..." });
const result = await euromail.getInboundRoute("id_...");
from euromail import EuroMail
client = EuroMail(api_key="em_live_...")
result = client.get_inbound_route("id_...")
use euromail::EuroMail;
let client = EuroMail::new("em_live_...");
let result = client.get_inbound_route("id_...").await?;
client := euromail.NewClient("em_live_...")
result, err := client.GetInboundRoute(ctx, "id_...")
PUT /v1/inbound-routes/{id}
PUT /v1/inbound-routes/:id
Parameters
| Name | In | Type | Required | Description |
id | path | string | Yes | Inbound route ID |
Request Body
| Field | Type | Required | Description |
is_active | boolean | Yes | |
match_type | string | Yes | |
pattern | string | Yes | |
priority | integer | Yes | |
webhook_url | `string | null` | No |
Responses
| Status | Description |
| 200 | Inbound route updated |
| 401 | Unauthorized |
| 404 | Inbound route not found |
| 422 | Validation error |
Example
curl -X PUT https://api.euromail.dev/v1/inbound-routes/{id} \
-H "X-EuroMail-Api-Key: em_live_..." \
-H "Content-Type: application/json" \
-d '{ "is_active": true, "match_type": "...", "pattern": "...", "priority": 0 }'
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({ apiKey: "em_live_..." });
const result = await euromail.updateInboundRoute({
is_active: true,
match_type: "...",
pattern: "...",
priority: 0,
});
from euromail import EuroMail
client = EuroMail(api_key="em_live_...")
result = client.update_inbound_route(
is_active=true,
match_type="...",
pattern="...",
priority=0,
)
use euromail::EuroMail;
let client = EuroMail::new("em_live_...");
let result = client.update_inbound_route(&UpdateInboundRouteParams {
is_active: true,
match_type: "...".into(),
pattern: "...".into(),
priority: 0,
..Default::default()
}).await?;
client := euromail.NewClient("em_live_...")
result, err := client.UpdateInboundRoute(ctx, euromail.UpdateInboundRouteParams{
IsActive: true,
MatchType: "...",
Pattern: "...",
Priority: 0,
})
DELETE /v1/inbound-routes/{id}
DELETE /v1/inbound-routes/:id
Parameters
| Name | In | Type | Required | Description |
id | path | string | Yes | Inbound route ID |
Responses
| Status | Description |
| 204 | Inbound route deleted |
| 401 | Unauthorized |
| 404 | Inbound route not found |
Example
curl -X DELETE https://api.euromail.dev/v1/inbound-routes/{id} \
-H "X-EuroMail-Api-Key: em_live_..."
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({ apiKey: "em_live_..." });
const result = await euromail.deleteInboundRoute("id_...");
from euromail import EuroMail
client = EuroMail(api_key="em_live_...")
result = client.delete_inbound_route("id_...")
use euromail::EuroMail;
let client = EuroMail::new("em_live_...");
let result = client.delete_inbound_route("id_...").await?;
client := euromail.NewClient("em_live_...")
result, err := client.DeleteInboundRoute(ctx, "id_...")