← All API sections

Agent Mailboxes

Provisioned inbound email addresses for AI agents: create, poll, reply, search

21 endpoints
Menu

Endpoints

MethodPathDescription
GET/v1/agent-mailboxesGET /v1/agent-mailboxes
POST/v1/agent-mailboxesPOST /v1/agent-mailboxes
GET/v1/agent-mailboxes/{id}GET /v1/agent-mailboxes/:id
DELETE/v1/agent-mailboxes/{id}DELETE /v1/agent-mailboxes/:id
PATCH/v1/agent-mailboxes/{id}PATCH /v1/agent-mailboxes/:id
GET/v1/agent-mailboxes/{id}/analyticsGET /v1/agent-mailboxes/:id/analytics
PATCH/v1/agent-mailboxes/{id}/auto-responderPATCH /v1/agent-mailboxes/:id/auto-responder
GET/v1/agent-mailboxes/{id}/contactsGET /v1/agent-mailboxes/:id/contacts
GET/v1/agent-mailboxes/{id}/messagesGET /v1/agent-mailboxes/:id/messages
POST/v1/agent-mailboxes/{id}/messagesPOST /v1/agent-mailboxes/:id/messages
GET/v1/agent-mailboxes/{id}/messages/nextGET /v1/agent-mailboxes/:id/messages/next
GET/v1/agent-mailboxes/{id}/messages/searchGET /v1/agent-mailboxes/:id/messages/search?q=invoice
DELETE/v1/agent-mailboxes/{id}/messages/{msg_id}DELETE /v1/agent-mailboxes/:id/messages/:msg_id
POST/v1/agent-mailboxes/{id}/messages/{msg_id}/ackPOST /v1/agent-mailboxes/:id/messages/:msg_id/ack
GET/v1/agent-mailboxes/{id}/messages/{msg_id}/attachmentsGET /v1/agent-mailboxes/:id/messages/:msg_id/attachments
PUT/v1/agent-mailboxes/{id}/messages/{msg_id}/labelsPATCH /v1/agent-mailboxes/:id/messages/:msg_id/labels
POST/v1/agent-mailboxes/{id}/messages/{msg_id}/nackPOST /v1/agent-mailboxes/:id/messages/:msg_id/nack
POST/v1/agent-mailboxes/{id}/messages/{msg_id}/replyPOST /v1/agent-mailboxes/:id/messages/:msg_id/reply
GET/v1/agent-mailboxes/{id}/threadsGET /v1/agent-mailboxes/:id/threads
GET/v1/agent-mailboxes/{id}/threads/{thread_id}GET /v1/agent-mailboxes/:id/threads/:thread_id
POST/v1/agent-mailboxes/{id}/threads/{thread_id}/replyPOST /v1/agent-mailboxes/:id/threads/:thread_id/reply

GET /v1/agent-mailboxes

GET /v1/agent-mailboxes

Parameters

NameInTypeRequiredDescription
limitqueryinteger | nullNo
offsetqueryinteger | nullNo

Responses

StatusDescription
200Agent mailboxes owned by this account
401Unauthorized

Example

curl -X GET https://api.euromail.dev/v1/agent-mailboxes \
  -H "Authorization: Bearer em_live_..."
import { EuroMail } from "@euromail/sdk";

const euromail = new EuroMail({ apiKey: "em_live_..." });

const result = await euromail.listAgentMailboxes();
from euromail import EuroMail

client = EuroMail(api_key="em_live_...")

result = client.list_agent_mailboxes()
use euromail::EuroMail;

let client = EuroMail::new("em_live_...");

let result = client.list_agent_mailboxes().await?;
client := euromail.NewClient("em_live_...")

result, err := client.ListAgentMailboxes(ctx)

POST /v1/agent-mailboxes

POST /v1/agent-mailboxes

Request Body

FieldTypeRequiredDescription
display_namestring | nullNoOptional human-readable label for this mailbox.
domain_idstring | nullNoDomain ID for a custom domain owned by this account. The domain must have inbound_enabled=true and mx_verified=true. If omitted, uses the platform domain (inbound.euromail.dev).
local_partstring | nullNoCustom local part (e.g. "toimitus"). If omitted, a random mb-xxxx is generated.

Responses

StatusDescription
201Mailbox created
401Unauthorized
404domain_id does not exist or is not owned by this account
409The requested address is already taken
422Invalid local_part, or the domain is not MX-verified / inbound-enabled

Example

curl -X POST https://api.euromail.dev/v1/agent-mailboxes \
  -H "Authorization: Bearer em_live_..." \
  -H "Content-Type: application/json" \
  -d '{}'
import { EuroMail } from "@euromail/sdk";

const euromail = new EuroMail({ apiKey: "em_live_..." });

const result = await euromail.createAgentMailboxe({});
from euromail import EuroMail

client = EuroMail(api_key="em_live_...")

result = client.create_agent_mailboxe(
)
use euromail::{EuroMail, CreateAgentMailboxeParams};

let client = EuroMail::new("em_live_...");

let result = client.create_agent_mailboxe(&CreateAgentMailboxeParams {
    ..Default::default()
}).await?;
client := euromail.NewClient("em_live_...")

result, err := client.CreateAgentMailboxe(ctx, euromail.CreateAgentMailboxeParams{
})

GET /v1/agent-mailboxes/{id}

GET /v1/agent-mailboxes/:id

Parameters

NameInTypeRequiredDescription
idpathstringYesMailbox id

Responses

StatusDescription
200The mailbox
401Unauthorized
404Mailbox not found

Example

curl -X GET https://api.euromail.dev/v1/agent-mailboxes/{id} \
  -H "Authorization: Bearer em_live_..."
import { EuroMail } from "@euromail/sdk";

const euromail = new EuroMail({ apiKey: "em_live_..." });

const result = await euromail.getAgentMailboxe("id_...");
from euromail import EuroMail

client = EuroMail(api_key="em_live_...")

result = client.get_agent_mailboxe("id_...")
use euromail::EuroMail;

let client = EuroMail::new("em_live_...");

let result = client.get_agent_mailboxe("id_...").await?;
client := euromail.NewClient("em_live_...")

result, err := client.GetAgentMailboxe(ctx, "id_...")

DELETE /v1/agent-mailboxes/{id}

DELETE /v1/agent-mailboxes/:id

Parameters

NameInTypeRequiredDescription
idpathstringYesMailbox id

Responses

StatusDescription
204Mailbox deleted
401Unauthorized
404Mailbox not found

Example

curl -X DELETE https://api.euromail.dev/v1/agent-mailboxes/{id} \
  -H "Authorization: Bearer em_live_..."
import { EuroMail } from "@euromail/sdk";

const euromail = new EuroMail({ apiKey: "em_live_..." });

const result = await euromail.deleteAgentMailboxe("id_...");
from euromail import EuroMail

client = EuroMail(api_key="em_live_...")

result = client.delete_agent_mailboxe("id_...")
use euromail::EuroMail;

let client = EuroMail::new("em_live_...");

let result = client.delete_agent_mailboxe("id_...").await?;
client := euromail.NewClient("em_live_...")

result, err := client.DeleteAgentMailboxe(ctx, "id_...")

PATCH /v1/agent-mailboxes/{id}

PATCH /v1/agent-mailboxes/:id

Parameters

NameInTypeRequiredDescription
idpathstringYesMailbox id

Request Body

FieldTypeRequiredDescription
skip_spam_webhooksboolean | nullNoSkip the mailbox.message.received webhook for messages judged spam. They are still stored and can be read through the API.

Responses

StatusDescription
200The updated mailbox
401Unauthorized
403The key or team role does not allow mailbox:admin
404Mailbox not found
422The body is not valid JSON or a field has the wrong type

Example

curl -X PATCH https://api.euromail.dev/v1/agent-mailboxes/{id} \
  -H "Authorization: Bearer em_live_..." \
  -H "Content-Type: application/json" \
  -d '{}'
import { EuroMail } from "@euromail/sdk";

const euromail = new EuroMail({ apiKey: "em_live_..." });

const result = await euromail.updateAgentMailboxe({});
from euromail import EuroMail

client = EuroMail(api_key="em_live_...")

result = client.update_agent_mailboxe(
)
use euromail::{EuroMail, UpdateAgentMailboxeParams};

let client = EuroMail::new("em_live_...");

let result = client.update_agent_mailboxe(&UpdateAgentMailboxeParams {
    ..Default::default()
}).await?;
client := euromail.NewClient("em_live_...")

result, err := client.UpdateAgentMailboxe(ctx, euromail.UpdateAgentMailboxeParams{
})

GET /v1/agent-mailboxes/{id}/analytics

Summary analytics for a mailbox: total messages, unread, threads, messages today and this week.

Parameters

NameInTypeRequiredDescription
idpathstringYesMailbox id

Responses

StatusDescription
200Mailbox analytics summary
401Unauthorized
404Mailbox not found

Example

curl -X GET https://api.euromail.dev/v1/agent-mailboxes/{id}/analytics \
  -H "Authorization: Bearer em_live_..."
import { EuroMail } from "@euromail/sdk";

const euromail = new EuroMail({ apiKey: "em_live_..." });

const result = await euromail.getAgentMailboxeDetail("id_...");
from euromail import EuroMail

client = EuroMail(api_key="em_live_...")

result = client.get_agent_mailboxe_detail("id_...")
use euromail::EuroMail;

let client = EuroMail::new("em_live_...");

let result = client.get_agent_mailboxe_detail("id_...").await?;
client := euromail.NewClient("em_live_...")

result, err := client.GetAgentMailboxeDetail(ctx, "id_...")

PATCH /v1/agent-mailboxes/{id}/auto-responder

Configure auto-responder rules and enable/disable.

Parameters

NameInTypeRequiredDescription
idpathstringYesMailbox id

Request Body

FieldTypeRequiredDescription
enabledboolean | nullNo
rulesanyNo

Responses

StatusDescription
200Auto-responder configuration updated
401Unauthorized
404Mailbox not found
422rules is malformed (see the auto-responder rule schema)

Example

curl -X PATCH https://api.euromail.dev/v1/agent-mailboxes/{id}/auto-responder \
  -H "Authorization: Bearer em_live_..." \
  -H "Content-Type: application/json" \
  -d '{}'
import { EuroMail } from "@euromail/sdk";

const euromail = new EuroMail({ apiKey: "em_live_..." });

const result = await euromail.getAgentMailboxeDetail({});
from euromail import EuroMail

client = EuroMail(api_key="em_live_...")

result = client.get_agent_mailboxe_detail(
)
use euromail::{EuroMail, GetAgentMailboxeDetailParams};

let client = EuroMail::new("em_live_...");

let result = client.get_agent_mailboxe_detail(&GetAgentMailboxeDetailParams {
    ..Default::default()
}).await?;
client := euromail.NewClient("em_live_...")

result, err := client.GetAgentMailboxeDetail(ctx, euromail.GetAgentMailboxeDetailParams{
})

GET /v1/agent-mailboxes/{id}/contacts

List unique contacts this mailbox has conversed with, with normalized email addresses and most recent display names.

Parameters

NameInTypeRequiredDescription
idpathstringYesMailbox id
limitqueryinteger | nullNo
offsetqueryinteger | nullNo

Responses

StatusDescription
200Contacts this mailbox has conversed with
401Unauthorized
404Mailbox not found

Example

curl -X GET https://api.euromail.dev/v1/agent-mailboxes/{id}/contacts \
  -H "Authorization: Bearer em_live_..."
import { EuroMail } from "@euromail/sdk";

const euromail = new EuroMail({ apiKey: "em_live_..." });

const result = await euromail.getAgentMailboxeDetail("id_...");
from euromail import EuroMail

client = EuroMail(api_key="em_live_...")

result = client.get_agent_mailboxe_detail("id_...")
use euromail::EuroMail;

let client = EuroMail::new("em_live_...");

let result = client.get_agent_mailboxe_detail("id_...").await?;
client := euromail.NewClient("em_live_...")

result, err := client.GetAgentMailboxeDetail(ctx, "id_...")

GET /v1/agent-mailboxes/{id}/messages

GET /v1/agent-mailboxes/:id/messages

Parameters

NameInTypeRequiredDescription
idpathstringYesMailbox id
unreadqueryboolean | nullNoDeprecated: prefer status. unread=true maps to status=unread.
statusquerystring | nullNoall (default), unread, or read.
directionquerystring | nullNoboth (default), inbound (received), or outbound (sent from the mailbox).
limitqueryinteger | nullNo
offsetqueryinteger | nullNo

Responses

StatusDescription
200Messages in the mailbox
401Unauthorized
404Mailbox not found
422Invalid status or direction filter

Example

curl -X GET https://api.euromail.dev/v1/agent-mailboxes/{id}/messages \
  -H "Authorization: Bearer em_live_..."
import { EuroMail } from "@euromail/sdk";

const euromail = new EuroMail({ apiKey: "em_live_..." });

const result = await euromail.getAgentMailboxeDetail("id_...");
from euromail import EuroMail

client = EuroMail(api_key="em_live_...")

result = client.get_agent_mailboxe_detail("id_...")
use euromail::EuroMail;

let client = EuroMail::new("em_live_...");

let result = client.get_agent_mailboxe_detail("id_...").await?;
client := euromail.NewClient("em_live_...")

result, err := client.GetAgentMailboxeDetail(ctx, "id_...")

POST /v1/agent-mailboxes/{id}/messages

Start a new conversation from this mailbox. The message goes through the normal send pipeline with the mailbox as From and Reply-To, and opens a new thread that the recipient's answer will join.

Parameters

NameInTypeRequiredDescription
idpathstringYesMailbox id

Request Body

FieldTypeRequiredDescription
ccstring[]NoAdditional recipients.
html_bodystring | nullNo
subjectstringYes
text_bodystring | nullNo
tostringYesRecipient address, bare or Name <address>.

Responses

StatusDescription
201Message enqueued for delivery; a new thread was opened
401Unauthorized
404Mailbox not found
422Missing subject or body, or an invalid recipient
429Per-mailbox send rate limit exceeded (30/minute)

Example

curl -X POST https://api.euromail.dev/v1/agent-mailboxes/{id}/messages \
  -H "Authorization: Bearer em_live_..." \
  -H "Content-Type: application/json" \
  -d '{
  "to": "[email protected]",
  "subject": "Welcome aboard"
}'
import { EuroMail } from "@euromail/sdk";

const euromail = new EuroMail({ apiKey: "em_live_..." });

const result = await euromail.getAgentMailboxeDetail({
  to: "[email protected]",
  subject: "Welcome aboard"
});
from euromail import EuroMail

client = EuroMail(api_key="em_live_...")

result = client.get_agent_mailboxe_detail(
    to="[email protected]",
    subject="Welcome aboard",
)
use euromail::{EuroMail, GetAgentMailboxeDetailParams};

let client = EuroMail::new("em_live_...");

let result = client.get_agent_mailboxe_detail(&GetAgentMailboxeDetailParams {
    to: "[email protected]".into(),
    subject: "Welcome aboard".into(),
    ..Default::default()
}).await?;
client := euromail.NewClient("em_live_...")

result, err := client.GetAgentMailboxeDetail(ctx, euromail.GetAgentMailboxeDetailParams{
    To: "[email protected]",
    Subject: "Welcome aboard",
})

GET /v1/agent-mailboxes/{id}/messages/next

Blocks until a new message is available or the timeout expires.

On success, acquires a lease on the oldest deliverable message. The lease hides the message from other pollers until the agent calls /ack or /nack, or until lease_expires_at passes (at which point the message returns to the queue). Returns 408 on timeout.

Response body:

{ "data": <message>, "lease_token": "uuid", "lease_expires_at": "..." }

Parameters

NameInTypeRequiredDescription
idpathstringYesMailbox id
timeoutqueryinteger | nullNo

Responses

StatusDescription
200A message was leased
401Unauthorized
404Mailbox not found
408No message arrived before the timeout (code NO_MESSAGE)

Example

curl -X GET https://api.euromail.dev/v1/agent-mailboxes/{id}/messages/next \
  -H "Authorization: Bearer em_live_..."
import { EuroMail } from "@euromail/sdk";

const euromail = new EuroMail({ apiKey: "em_live_..." });

const result = await euromail.getAgentMailboxeDetail("id_...");
from euromail import EuroMail

client = EuroMail(api_key="em_live_...")

result = client.get_agent_mailboxe_detail("id_...")
use euromail::EuroMail;

let client = EuroMail::new("em_live_...");

let result = client.get_agent_mailboxe_detail("id_...").await?;
client := euromail.NewClient("em_live_...")

result, err := client.GetAgentMailboxeDetail(ctx, "id_...")

Full-text search across mailbox messages (subject + text_body).

Parameters

NameInTypeRequiredDescription
idpathstringYesMailbox id
qquerystring | nullNo
directionquerystring | nullNoboth (default), inbound (received), or outbound (sent from the mailbox).
limitqueryinteger | nullNo
offsetqueryinteger | nullNo

Responses

StatusDescription
200Matching messages
401Unauthorized
404Mailbox not found
422q is missing, empty, or longer than 500 characters

Example

curl -X GET https://api.euromail.dev/v1/agent-mailboxes/{id}/messages/search \
  -H "Authorization: Bearer em_live_..."
import { EuroMail } from "@euromail/sdk";

const euromail = new EuroMail({ apiKey: "em_live_..." });

const result = await euromail.getAgentMailboxeDetail("id_...");
from euromail import EuroMail

client = EuroMail(api_key="em_live_...")

result = client.get_agent_mailboxe_detail("id_...")
use euromail::EuroMail;

let client = EuroMail::new("em_live_...");

let result = client.get_agent_mailboxe_detail("id_...").await?;
client := euromail.NewClient("em_live_...")

result, err := client.GetAgentMailboxeDetail(ctx, "id_...")

DELETE /v1/agent-mailboxes/{id}/messages/{msg_id}

DELETE /v1/agent-mailboxes/:id/messages/:msg_id

Parameters

NameInTypeRequiredDescription
idpathstringYesMailbox id
msg_idpathstringYesMessage id

Responses

StatusDescription
204Message deleted
401Unauthorized
404Mailbox or message not found

Example

curl -X DELETE https://api.euromail.dev/v1/agent-mailboxes/{id}/messages/{msg_id} \
  -H "Authorization: Bearer em_live_..."
import { EuroMail } from "@euromail/sdk";

const euromail = new EuroMail({ apiKey: "em_live_..." });

const result = await euromail.getAgentMailboxeDetail("id_...");
from euromail import EuroMail

client = EuroMail(api_key="em_live_...")

result = client.get_agent_mailboxe_detail("id_...")
use euromail::EuroMail;

let client = EuroMail::new("em_live_...");

let result = client.get_agent_mailboxe_detail("id_...").await?;
client := euromail.NewClient("em_live_...")

result, err := client.GetAgentMailboxeDetail(ctx, "id_...")

POST /v1/agent-mailboxes/{id}/messages/{msg_id}/ack

Marks the message as read and releases its lease. Requires the lease_token returned by /messages/next. Idempotent on re-ack.

Parameters

NameInTypeRequiredDescription
idpathstringYesMailbox id
msg_idpathstringYesMessage id

Request Body

FieldTypeRequiredDescription
lease_tokenstringYes

Responses

StatusDescription
204Acknowledged (or already was)
401Unauthorized
404Mailbox not found
422lease_token is invalid or expired

Example

curl -X POST https://api.euromail.dev/v1/agent-mailboxes/{id}/messages/{msg_id}/ack \
  -H "Authorization: Bearer em_live_..." \
  -H "Content-Type: application/json" \
  -d '{
  "lease_token": "3f8b1c52-7a4e-4d0b-9c61-2e5d8a7f4b10"
}'
import { EuroMail } from "@euromail/sdk";

const euromail = new EuroMail({ apiKey: "em_live_..." });

const result = await euromail.getAgentMailboxeDetail({
  lease_token: "3f8b1c52-7a4e-4d0b-9c61-2e5d8a7f4b10"
});
from euromail import EuroMail

client = EuroMail(api_key="em_live_...")

result = client.get_agent_mailboxe_detail(
    lease_token="3f8b1c52-7a4e-4d0b-9c61-2e5d8a7f4b10",
)
use euromail::{EuroMail, GetAgentMailboxeDetailParams};

let client = EuroMail::new("em_live_...");

let result = client.get_agent_mailboxe_detail(&GetAgentMailboxeDetailParams {
    lease_token: "3f8b1c52-7a4e-4d0b-9c61-2e5d8a7f4b10".into(),
    ..Default::default()
}).await?;
client := euromail.NewClient("em_live_...")

result, err := client.GetAgentMailboxeDetail(ctx, euromail.GetAgentMailboxeDetailParams{
    LeaseToken: "3f8b1c52-7a4e-4d0b-9c61-2e5d8a7f4b10",
})

GET /v1/agent-mailboxes/{id}/messages/{msg_id}/attachments

Returns pre-signed download URLs for all attachments on a message. URLs expire after 1 hour.

Parameters

NameInTypeRequiredDescription
idpathstringYesMailbox id
msg_idpathstringYesMessage id

Responses

StatusDescription
200Pre-signed download URLs for the message's attachments
401Unauthorized
404Mailbox or message not found

Example

curl -X GET https://api.euromail.dev/v1/agent-mailboxes/{id}/messages/{msg_id}/attachments \
  -H "Authorization: Bearer em_live_..."
import { EuroMail } from "@euromail/sdk";

const euromail = new EuroMail({ apiKey: "em_live_..." });

const result = await euromail.getAgentMailboxeDetail("id_...");
from euromail import EuroMail

client = EuroMail(api_key="em_live_...")

result = client.get_agent_mailboxe_detail("id_...")
use euromail::EuroMail;

let client = EuroMail::new("em_live_...");

let result = client.get_agent_mailboxe_detail("id_...").await?;
client := euromail.NewClient("em_live_...")

result, err := client.GetAgentMailboxeDetail(ctx, "id_...")

PUT /v1/agent-mailboxes/{id}/messages/{msg_id}/labels

Replace the labels on a message. Labels must be alphanumeric + dash + underscore.

Parameters

NameInTypeRequiredDescription
idpathstringYesMailbox id
msg_idpathstringYesMessage id

Request Body

FieldTypeRequiredDescription
labelsstring[]Yes

Responses

StatusDescription
200Labels replaced
401Unauthorized
404Mailbox or message not found
422Too many labels, or a label is empty/too long/not alphanumeric

Example

curl -X PUT https://api.euromail.dev/v1/agent-mailboxes/{id}/messages/{msg_id}/labels \
  -H "Authorization: Bearer em_live_..." \
  -H "Content-Type: application/json" \
  -d '{
  "labels": [
    "..."
  ]
}'
import { EuroMail } from "@euromail/sdk";

const euromail = new EuroMail({ apiKey: "em_live_..." });

const result = await euromail.getAgentMailboxeDetail({
  labels: [
    "..."
  ]
});
from euromail import EuroMail

client = EuroMail(api_key="em_live_...")

result = client.get_agent_mailboxe_detail(
    labels=[
    "..."
  ],
)
use euromail::{EuroMail, GetAgentMailboxeDetailParams};

let client = EuroMail::new("em_live_...");

let result = client.get_agent_mailboxe_detail(&GetAgentMailboxeDetailParams {
    labels: vec!["...".into()],
    ..Default::default()
}).await?;
client := euromail.NewClient("em_live_...")

result, err := client.GetAgentMailboxeDetail(ctx, euromail.GetAgentMailboxeDetailParams{
    Labels: []string{"..."},
})

POST /v1/agent-mailboxes/{id}/messages/{msg_id}/nack

Releases the lease without marking the message read, returning it to the queue so the next poller can receive it. Requires a matching lease_token.

Parameters

NameInTypeRequiredDescription
idpathstringYesMailbox id
msg_idpathstringYesMessage id

Request Body

FieldTypeRequiredDescription
lease_tokenstringYes

Responses

StatusDescription
204Lease released, message returned to the queue
401Unauthorized
404Mailbox not found
422lease_token is invalid/expired, or the message is already acked

Example

curl -X POST https://api.euromail.dev/v1/agent-mailboxes/{id}/messages/{msg_id}/nack \
  -H "Authorization: Bearer em_live_..." \
  -H "Content-Type: application/json" \
  -d '{
  "lease_token": "3f8b1c52-7a4e-4d0b-9c61-2e5d8a7f4b10"
}'
import { EuroMail } from "@euromail/sdk";

const euromail = new EuroMail({ apiKey: "em_live_..." });

const result = await euromail.getAgentMailboxeDetail({
  lease_token: "3f8b1c52-7a4e-4d0b-9c61-2e5d8a7f4b10"
});
from euromail import EuroMail

client = EuroMail(api_key="em_live_...")

result = client.get_agent_mailboxe_detail(
    lease_token="3f8b1c52-7a4e-4d0b-9c61-2e5d8a7f4b10",
)
use euromail::{EuroMail, GetAgentMailboxeDetailParams};

let client = EuroMail::new("em_live_...");

let result = client.get_agent_mailboxe_detail(&GetAgentMailboxeDetailParams {
    lease_token: "3f8b1c52-7a4e-4d0b-9c61-2e5d8a7f4b10".into(),
    ..Default::default()
}).await?;
client := euromail.NewClient("em_live_...")

result, err := client.GetAgentMailboxeDetail(ctx, euromail.GetAgentMailboxeDetailParams{
    LeaseToken: "3f8b1c52-7a4e-4d0b-9c61-2e5d8a7f4b10",
})

POST /v1/agent-mailboxes/{id}/messages/{msg_id}/reply

Reply to a message received in this mailbox. The reply carries In-Reply-To and References for the recipient's client, is enqueued to the normal send pipeline, and is recorded in the message's thread so the thread shows both sides and the counterpart's next answer threads onto it.

Parameters

NameInTypeRequiredDescription
idpathstringYesMailbox id
msg_idpathstringYesMessage id being replied to

Request Body

FieldTypeRequiredDescription
html_bodystring | nullNo
text_bodystring | nullNo

Responses

StatusDescription
201Reply enqueued for delivery and recorded in the thread
401Unauthorized
404Mailbox or message not found
422Neither text_body nor html_body was provided
429Per-mailbox send rate limit exceeded (30/minute)

Example

curl -X POST https://api.euromail.dev/v1/agent-mailboxes/{id}/messages/{msg_id}/reply \
  -H "Authorization: Bearer em_live_..." \
  -H "Content-Type: application/json" \
  -d '{}'
import { EuroMail } from "@euromail/sdk";

const euromail = new EuroMail({ apiKey: "em_live_..." });

const result = await euromail.getAgentMailboxeDetail({});
from euromail import EuroMail

client = EuroMail(api_key="em_live_...")

result = client.get_agent_mailboxe_detail(
)
use euromail::{EuroMail, GetAgentMailboxeDetailParams};

let client = EuroMail::new("em_live_...");

let result = client.get_agent_mailboxe_detail(&GetAgentMailboxeDetailParams {
    ..Default::default()
}).await?;
client := euromail.NewClient("em_live_...")

result, err := client.GetAgentMailboxeDetail(ctx, euromail.GetAgentMailboxeDetailParams{
})

GET /v1/agent-mailboxes/{id}/threads

List conversation threads for a mailbox. Returns the latest message in each thread, ordered by most recent activity.

Parameters

NameInTypeRequiredDescription
idpathstringYesMailbox id
limitqueryinteger | nullNo
offsetqueryinteger | nullNo

Responses

StatusDescription
200Threads for this mailbox
401Unauthorized
404Mailbox not found

Example

curl -X GET https://api.euromail.dev/v1/agent-mailboxes/{id}/threads \
  -H "Authorization: Bearer em_live_..."
import { EuroMail } from "@euromail/sdk";

const euromail = new EuroMail({ apiKey: "em_live_..." });

const result = await euromail.getAgentMailboxeDetail("id_...");
from euromail import EuroMail

client = EuroMail(api_key="em_live_...")

result = client.get_agent_mailboxe_detail("id_...")
use euromail::EuroMail;

let client = EuroMail::new("em_live_...");

let result = client.get_agent_mailboxe_detail("id_...").await?;
client := euromail.NewClient("em_live_...")

result, err := client.GetAgentMailboxeDetail(ctx, "id_...")

GET /v1/agent-mailboxes/{id}/threads/{thread_id}

List all messages in a specific thread, ordered chronologically.

Parameters

NameInTypeRequiredDescription
idpathstringYesMailbox id
thread_idpathstringYesThread id
limitqueryinteger | nullNo
offsetqueryinteger | nullNo

Responses

StatusDescription
200Messages in the thread
401Unauthorized
404Mailbox not found

Example

curl -X GET https://api.euromail.dev/v1/agent-mailboxes/{id}/threads/{thread_id} \
  -H "Authorization: Bearer em_live_..."
import { EuroMail } from "@euromail/sdk";

const euromail = new EuroMail({ apiKey: "em_live_..." });

const result = await euromail.getAgentMailboxeDetail("id_...");
from euromail import EuroMail

client = EuroMail(api_key="em_live_...")

result = client.get_agent_mailboxe_detail("id_...")
use euromail::EuroMail;

let client = EuroMail::new("em_live_...");

let result = client.get_agent_mailboxe_detail("id_...").await?;
client := euromail.NewClient("em_live_...")

result, err := client.GetAgentMailboxeDetail(ctx, "id_...")

POST /v1/agent-mailboxes/{id}/threads/{thread_id}/reply

Reply to a conversation: answers the newest message the mailbox received in the thread, so a client working thread-by-thread does not have to pick a message id itself.

Parameters

NameInTypeRequiredDescription
idpathstringYesMailbox id
thread_idpathstringYesThread id

Request Body

FieldTypeRequiredDescription
html_bodystring | nullNo
text_bodystring | nullNo

Responses

StatusDescription
201Reply enqueued for delivery and recorded in the thread
401Unauthorized
404Mailbox not found, or the thread holds no received message to answer
422Neither text_body nor html_body was provided
429Per-mailbox send rate limit exceeded (30/minute)

Example

curl -X POST https://api.euromail.dev/v1/agent-mailboxes/{id}/threads/{thread_id}/reply \
  -H "Authorization: Bearer em_live_..." \
  -H "Content-Type: application/json" \
  -d '{}'
import { EuroMail } from "@euromail/sdk";

const euromail = new EuroMail({ apiKey: "em_live_..." });

const result = await euromail.getAgentMailboxeDetail({});
from euromail import EuroMail

client = EuroMail(api_key="em_live_...")

result = client.get_agent_mailboxe_detail(
)
use euromail::{EuroMail, GetAgentMailboxeDetailParams};

let client = EuroMail::new("em_live_...");

let result = client.get_agent_mailboxe_detail(&GetAgentMailboxeDetailParams {
    ..Default::default()
}).await?;
client := euromail.NewClient("em_live_...")

result, err := client.GetAgentMailboxeDetail(ctx, euromail.GetAgentMailboxeDetailParams{
})