Agent Mailboxes
Provisioned inbound email addresses for AI agents: create, poll, reply, search
20 endpoints
Endpoints
Method Path Description
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
Name In Type Required Description
limitquery `integer null` No
offsetquery `integer null` No
Responses
Status Description
200 Agent mailboxes owned by this account
401 Unauthorized
Example
cURL
TypeScript
Python
Rust
Go
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
Field Type Required Description
display_name`string null` No
domain_id`string null` No
The domain must have inbound_enabled=true and mx_verified=true.
If omitted, uses the platform domain (inbound.euromail.dev).
local_part`string null` No
Responses
Status Description
201 Mailbox created
401 Unauthorized
404 domain_id does not exist or is not owned by this account
409 The requested address is already taken
422 Invalid local_part, or the domain is not MX-verified / inbound-enabled
Example
cURL
TypeScript
Python
Rust
Go
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
Name In Type Required Description
idpath stringYes Mailbox id
Responses
Status Description
200 The mailbox
401 Unauthorized
404 Mailbox not found
Example
cURL
TypeScript
Python
Rust
Go
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
Name In Type Required Description
idpath stringYes Mailbox id
Responses
Status Description
204 Mailbox deleted
401 Unauthorized
404 Mailbox not found
Example
cURL
TypeScript
Python
Rust
Go
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
Name In Type Required Description
idpath stringYes Mailbox id
Responses
Status Description
200 Mailbox analytics summary
401 Unauthorized
404 Mailbox not found
Example
cURL
TypeScript
Python
Rust
Go
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
Name In Type Required Description
idpath stringYes Mailbox id
Request Body
Field Type Required Description
enabled`boolean null` No
rulesanyNo
Responses
Status Description
200 Auto-responder configuration updated
401 Unauthorized
404 Mailbox not found
422 rules is malformed (see the auto-responder rule schema)
Example
cURL
TypeScript
Python
Rust
Go
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 {
})
List unique contacts this mailbox has conversed with, with normalized
email addresses and most recent display names.
Parameters
Name In Type Required Description
idpath stringYes Mailbox id
limitquery `integer null` No
offsetquery `integer null` No
Responses
Status Description
200 Contacts this mailbox has conversed with
401 Unauthorized
404 Mailbox not found
Example
cURL
TypeScript
Python
Rust
Go
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
Name In Type Required Description
idpath stringYes Mailbox id
unreadquery `boolean null` No
statusquery `string null` No
directionquery `string null` No
limitquery `integer null` No
offsetquery `integer null` No
Responses
Status Description
200 Messages in the mailbox
401 Unauthorized
404 Mailbox not found
422 Invalid status or direction filter
Example
cURL
TypeScript
Python
Rust
Go
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
Name In Type Required Description
idpath stringYes Mailbox id
Request Body
Field Type Required Description
ccstring[]No Additional recipients.
html_body`string null` No
subjectstringYes
text_body`string null` No
tostringYes Recipient address, bare or Name <address>.
Responses
Status Description
201 Message enqueued for delivery; a new thread was opened
401 Unauthorized
404 Mailbox not found
422 Missing subject or body, or an invalid recipient
429 Per-mailbox send rate limit exceeded (30/minute)
Example
cURL
TypeScript
Python
Rust
Go
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
Name In Type Required Description
idpath stringYes Mailbox id
timeoutquery `integer null` No
Responses
Status Description
200 A message was leased
401 Unauthorized
404 Mailbox not found
408 No message arrived before the timeout
Example
cURL
TypeScript
Python
Rust
Go
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_..." )
GET /v1/agent-mailboxes/{id}/messages/search
Full-text search across mailbox messages (subject + text_body).
Parameters
Name In Type Required Description
idpath stringYes Mailbox id
qquery `string null` No
directionquery `string null` No
limitquery `integer null` No
offsetquery `integer null` No
Responses
Status Description
200 Matching messages
401 Unauthorized
404 Mailbox not found
422 q is missing, empty, or longer than 500 characters
Example
cURL
TypeScript
Python
Rust
Go
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
Name In Type Required Description
idpath stringYes Mailbox id
msg_idpath stringYes Message id
Responses
Status Description
204 Message deleted
401 Unauthorized
404 Mailbox or message not found
Example
cURL
TypeScript
Python
Rust
Go
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
Name In Type Required Description
idpath stringYes Mailbox id
msg_idpath stringYes Message id
Request Body
Field Type Required Description
lease_tokenstringYes
Responses
Status Description
204 Acknowledged (or already was)
401 Unauthorized
404 Mailbox not found
422 lease_token is invalid or expired
Example
cURL
TypeScript
Python
Rust
Go
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
Name In Type Required Description
idpath stringYes Mailbox id
msg_idpath stringYes Message id
Responses
Status Description
200 Pre-signed download URLs for the message's attachments
401 Unauthorized
404 Mailbox or message not found
Example
cURL
TypeScript
Python
Rust
Go
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
Name In Type Required Description
idpath stringYes Mailbox id
msg_idpath stringYes Message id
Request Body
Field Type Required Description
labelsstring[]Yes
Responses
Status Description
200 Labels replaced
401 Unauthorized
404 Mailbox or message not found
422 Too many labels, or a label is empty/too long/not alphanumeric
Example
cURL
TypeScript
Python
Rust
Go
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
Name In Type Required Description
idpath stringYes Mailbox id
msg_idpath stringYes Message id
Request Body
Field Type Required Description
lease_tokenstringYes
Responses
Status Description
204 Lease released, message returned to the queue
401 Unauthorized
404 Mailbox not found
422 lease_token is invalid/expired, or the message is already acked
Example
cURL
TypeScript
Python
Rust
Go
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
Name In Type Required Description
idpath stringYes Mailbox id
msg_idpath stringYes Message id being replied to
Request Body
Field Type Required Description
html_body`string null` No
text_body`string null` No
Responses
Status Description
201 Reply enqueued for delivery and recorded in the thread
401 Unauthorized
404 Mailbox or message not found
422 Neither text_body nor html_body was provided
429 Per-mailbox send rate limit exceeded (30/minute)
Example
cURL
TypeScript
Python
Rust
Go
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
Name In Type Required Description
idpath stringYes Mailbox id
limitquery `integer null` No
offsetquery `integer null` No
Responses
Status Description
200 Threads for this mailbox
401 Unauthorized
404 Mailbox not found
Example
cURL
TypeScript
Python
Rust
Go
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
Name In Type Required Description
idpath stringYes Mailbox id
thread_idpath stringYes Thread id
limitquery `integer null` No
offsetquery `integer null` No
Responses
Status Description
200 Messages in the thread
401 Unauthorized
404 Mailbox not found
Example
cURL
TypeScript
Python
Rust
Go
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
Name In Type Required Description
idpath stringYes Mailbox id
thread_idpath stringYes Thread id
Request Body
Field Type Required Description
html_body`string null` No
text_body`string null` No
Responses
Status Description
201 Reply enqueued for delivery and recorded in the thread
401 Unauthorized
404 Mailbox not found, or the thread holds no received message to answer
422 Neither text_body nor html_body was provided
429 Per-mailbox send rate limit exceeded (30/minute)
Example
cURL
TypeScript
Python
Rust
Go
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 {
})