← All API sections

Agent Mailboxes

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

20 endpoints

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
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
limitquery`integernull`No
offsetquery`integernull`No

Responses

StatusDescription
200Agent mailboxes owned by this account
401Unauthorized

Example

curl -X GET https://api.euromail.dev/v1/agent-mailboxes \
  -H "X-EuroMail-Api-Key: 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_name`stringnull`No
domain_id`stringnull`No
The domain must have inbound_enabled=true and mx_verified=true.
If omitted, uses the platform domain (inbound.euromail.dev).
local_part`stringnull`No

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 "X-EuroMail-Api-Key: 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;

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 "X-EuroMail-Api-Key: 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 "X-EuroMail-Api-Key: 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_...")

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 "X-EuroMail-Api-Key: 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
enabled`booleannull`No
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 "X-EuroMail-Api-Key: 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;

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
limitquery`integernull`No
offsetquery`integernull`No

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 "X-EuroMail-Api-Key: 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
unreadquery`booleannull`No
statusquery`stringnull`No
directionquery`stringnull`No
limitquery`integernull`No
offsetquery`integernull`No

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 "X-EuroMail-Api-Key: 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_body`stringnull`No
subjectstringYes
text_body`stringnull`No
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 "X-EuroMail-Api-Key: em_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "subject": "Hello World", "to": "[email protected]" }'
import { EuroMail } from "@euromail/sdk";

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

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

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

result = client.get_agent_mailboxe_detail(
    subject="Hello World",
    to="[email protected]",
)
use euromail::EuroMail;

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

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

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

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
timeoutquery`integernull`No

Responses

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

Example

curl -X GET https://api.euromail.dev/v1/agent-mailboxes/{id}/messages/next \
  -H "X-EuroMail-Api-Key: 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
qquery`stringnull`No
directionquery`stringnull`No
limitquery`integernull`No
offsetquery`integernull`No

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 "X-EuroMail-Api-Key: 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 "X-EuroMail-Api-Key: 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 "X-EuroMail-Api-Key: em_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "lease_token": "..." }'
import { EuroMail } from "@euromail/sdk";

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

const result = await euromail.getAgentMailboxeDetail({
    lease_token: "...",
  });
from euromail import EuroMail

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

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

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

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

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

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 "X-EuroMail-Api-Key: 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 "X-EuroMail-Api-Key: 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;

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

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

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

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 "X-EuroMail-Api-Key: em_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "lease_token": "..." }'
import { EuroMail } from "@euromail/sdk";

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

const result = await euromail.getAgentMailboxeDetail({
    lease_token: "...",
  });
from euromail import EuroMail

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

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

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

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

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

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_body`stringnull`No
text_body`stringnull`No

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 "X-EuroMail-Api-Key: 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;

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
limitquery`integernull`No
offsetquery`integernull`No

Responses

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

Example

curl -X GET https://api.euromail.dev/v1/agent-mailboxes/{id}/threads \
  -H "X-EuroMail-Api-Key: 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
limitquery`integernull`No
offsetquery`integernull`No

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 "X-EuroMail-Api-Key: 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_body`stringnull`No
text_body`stringnull`No

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 "X-EuroMail-Api-Key: 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;

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{
})