curl -X POST "https://api.wirebox.sh/api/v1/mailboxes/eva/messages" \
-H "Authorization: Bearer $WIREBOX_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 3f9c1d0e-8a2b-4f6e-9c1d-0e8a2b4f6e9c" \
-d '{
"to": ["user@example.com"],
"subject": "Your ticket has been updated",
"text": "Hello! Your ticket has been updated."
}'
from wirebox import Wirebox
with Wirebox() as wirebox:
eva = wirebox.get_identity("eva")
res = eva.send_email(
to=["user@example.com"],
subject="Your ticket has been updated",
text="Hello! Your ticket has been updated.",
)
print("Sent message ID:", res.id)
import { Wirebox } from "@wirebox-sh/sdk";
const wirebox = new Wirebox();
const eva = await wirebox.getIdentity("eva");
const res = await eva.sendEmail({
to: ["user@example.com"],
subject: "Your ticket has been updated",
text: "Hello! Your ticket has been updated.",
});
console.log("Sent message ID:", res.id);
wirebox mail send \
--identity eva \
--to user@example.com \
--subject "Your ticket has been updated" \
--text "Hello! Your ticket has been updated."
{
"id": "msg_01J8OUTBOUND789",
"thread_id": "thrd_01J8XYZ987ABC"
}
{
"error": "domain_not_verified",
"message": "Custom domain \"acme.com\" is not verified (status: unverified). Outbound emails are blocked until DNS records are active to protect sender reputation.",
"domain": "acme.com",
"status": "unverified"
}
Mail
Send Email
Send an outbound email from an agent mailbox and open a new conversation thread.
POST
/
api
/
v1
/
mailboxes
/
{email_address}
/
messages
curl -X POST "https://api.wirebox.sh/api/v1/mailboxes/eva/messages" \
-H "Authorization: Bearer $WIREBOX_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 3f9c1d0e-8a2b-4f6e-9c1d-0e8a2b4f6e9c" \
-d '{
"to": ["user@example.com"],
"subject": "Your ticket has been updated",
"text": "Hello! Your ticket has been updated."
}'
from wirebox import Wirebox
with Wirebox() as wirebox:
eva = wirebox.get_identity("eva")
res = eva.send_email(
to=["user@example.com"],
subject="Your ticket has been updated",
text="Hello! Your ticket has been updated.",
)
print("Sent message ID:", res.id)
import { Wirebox } from "@wirebox-sh/sdk";
const wirebox = new Wirebox();
const eva = await wirebox.getIdentity("eva");
const res = await eva.sendEmail({
to: ["user@example.com"],
subject: "Your ticket has been updated",
text: "Hello! Your ticket has been updated.",
});
console.log("Sent message ID:", res.id);
wirebox mail send \
--identity eva \
--to user@example.com \
--subject "Your ticket has been updated" \
--text "Hello! Your ticket has been updated."
{
"id": "msg_01J8OUTBOUND789",
"thread_id": "thrd_01J8XYZ987ABC"
}
{
"error": "domain_not_verified",
"message": "Custom domain \"acme.com\" is not verified (status: unverified). Outbound emails are blocked until DNS records are active to protect sender reputation.",
"domain": "acme.com",
"status": "unverified"
}
Path Parameters
string
required
Full mailbox address (
eva@wireboxmail.com) or local agent handle (eva).Headers
string
Optional client-generated token (UUID v4 or random ASCII string) that makes retries safe: replaying a request with the same key returns the original
201 response with an Idempotent-Replayed: true header instead of sending a second email.Body Parameters
string | string[]
required
Recipient email address or array of addresses.
string
required
Email subject line (max 998 characters).
string
Plain-text body. At least one of
text or html is required.string
HTML formatted body.
string | string[]
Optional CC recipients.
string | string[]
Optional BCC recipients.
string | string[]
Optional Reply-To address(es).
object[]
Optional attachments. Each object requires
filename and content_type, plus either content (base64 string) or url (publicly fetchable URL). content_id is optional.object
Optional custom RFC headers as a key/value map.
To reply within an existing thread, use
POST /mailboxes/{email_address}/messages/{message_id}/reply, which sets the RFC In-Reply-To and References headers automatically.Custom Domain DNS Verification Required: Outbound sends from mailboxes using custom domains are strictly guarded. If the custom domain’s DNS status is not
verified (e.g. pending setup or broken SPF/DKIM), the API returns 412 Precondition Failed (domain_not_verified) instead of silently sending unauthenticated emails that would ruin sender reputation.Response
string
Unique identifier of the sent message (
msg_ prefix).string
Conversation thread created (or reused) for this message.
curl -X POST "https://api.wirebox.sh/api/v1/mailboxes/eva/messages" \
-H "Authorization: Bearer $WIREBOX_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 3f9c1d0e-8a2b-4f6e-9c1d-0e8a2b4f6e9c" \
-d '{
"to": ["user@example.com"],
"subject": "Your ticket has been updated",
"text": "Hello! Your ticket has been updated."
}'
from wirebox import Wirebox
with Wirebox() as wirebox:
eva = wirebox.get_identity("eva")
res = eva.send_email(
to=["user@example.com"],
subject="Your ticket has been updated",
text="Hello! Your ticket has been updated.",
)
print("Sent message ID:", res.id)
import { Wirebox } from "@wirebox-sh/sdk";
const wirebox = new Wirebox();
const eva = await wirebox.getIdentity("eva");
const res = await eva.sendEmail({
to: ["user@example.com"],
subject: "Your ticket has been updated",
text: "Hello! Your ticket has been updated.",
});
console.log("Sent message ID:", res.id);
wirebox mail send \
--identity eva \
--to user@example.com \
--subject "Your ticket has been updated" \
--text "Hello! Your ticket has been updated."
{
"id": "msg_01J8OUTBOUND789",
"thread_id": "thrd_01J8XYZ987ABC"
}
{
"error": "domain_not_verified",
"message": "Custom domain \"acme.com\" is not verified (status: unverified). Outbound emails are blocked until DNS records are active to protect sender reputation.",
"domain": "acme.com",
"status": "unverified"
}