← All API sections

Inbound Routes

Route inbound mail on a domain to a webhook

5 endpoints

Endpoints

MethodPathDescription
GET/v1/inbound-routesGET /v1/inbound-routes
POST/v1/inbound-routesPOST /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

NameInTypeRequiredDescription
pagequeryintegerNoPage number (default: 1)
per_pagequeryintegerNoItems per page (default: 25)

Responses

StatusDescription
200Paginated list of inbound routes
401Unauthorized

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

FieldTypeRequiredDescription
domain_idstringYes
match_typestringYes
patternstringYes
priority`integernull`No
webhook_url`stringnull`No

Responses

StatusDescription
201Inbound route created
401Unauthorized
403Domain does not belong to account
422Validation 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

NameInTypeRequiredDescription
idpathstringYesInbound route ID

Responses

StatusDescription
200Inbound route details
401Unauthorized
404Inbound 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

NameInTypeRequiredDescription
idpathstringYesInbound route ID

Request Body

FieldTypeRequiredDescription
is_activebooleanYes
match_typestringYes
patternstringYes
priorityintegerYes
webhook_url`stringnull`No

Responses

StatusDescription
200Inbound route updated
401Unauthorized
404Inbound route not found
422Validation 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

NameInTypeRequiredDescription
idpathstringYesInbound route ID

Responses

StatusDescription
204Inbound route deleted
401Unauthorized
404Inbound 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_...")