curl -X POST https://win.oneshotagent.com/v1/tools/email/send \
-H "Content-Type: application/json" \
-H "X-Quote-ID: quote_abc123" \
-H "payment-signature: <base64 x402 payment>" \
-d '{
"from_address": "[email protected]",
"from_name": "OneShot Team",
"to_address": "[email protected]",
"subject": "Hello from OneShot",
"body": "This is a test email"
}'
# Quote was created without from_address → server-rotated, locked the pick.
# Send replays the locked address automatically.
curl -X POST https://win.oneshotagent.com/v1/tools/email/send \
-H "Content-Type: application/json" \
-H "X-Quote-ID: quote_abc123" \
-H "payment-signature: <base64 x402 payment>" \
-d '{
"to_address": "[email protected]",
"subject": "Hello",
"body": "..."
}'
const response = await fetch(
"https://win.oneshotagent.com/v1/tools/email/send",
{
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Quote-ID": "quote_abc123",
"payment-signature": paymentProof,
},
body: JSON.stringify({
from_address: "[email protected]",
from_name: "OneShot Team",
to_address: "[email protected]",
subject: "Hello from OneShot",
body: "This is a test email",
}),
},
);
{
"request_id": "req_xyz789",
"status": "processing",
"message": "Email job queued successfully"
}
Email
Send an email from your configured sending domain
POST
/
v1
/
tools
/
email
/
send
curl -X POST https://win.oneshotagent.com/v1/tools/email/send \
-H "Content-Type: application/json" \
-H "X-Quote-ID: quote_abc123" \
-H "payment-signature: <base64 x402 payment>" \
-d '{
"from_address": "[email protected]",
"from_name": "OneShot Team",
"to_address": "[email protected]",
"subject": "Hello from OneShot",
"body": "This is a test email"
}'
# Quote was created without from_address → server-rotated, locked the pick.
# Send replays the locked address automatically.
curl -X POST https://win.oneshotagent.com/v1/tools/email/send \
-H "Content-Type: application/json" \
-H "X-Quote-ID: quote_abc123" \
-H "payment-signature: <base64 x402 payment>" \
-d '{
"to_address": "[email protected]",
"subject": "Hello",
"body": "..."
}'
const response = await fetch(
"https://win.oneshotagent.com/v1/tools/email/send",
{
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Quote-ID": "quote_abc123",
"payment-signature": paymentProof,
},
body: JSON.stringify({
from_address: "[email protected]",
from_name: "OneShot Team",
to_address: "[email protected]",
subject: "Hello from OneShot",
body: "This is a test email",
}),
},
);
{
"request_id": "req_xyz789",
"status": "processing",
"message": "Email job queued successfully"
}
Sends an email you already quoted. Pass the
quote_id from /email/quote in X-Quote-ID, with an x402 payment proof for its total_cost. The send runs as a job: poll with the returned request_id. A send never registers a domain or creates an address; buy them first and wait for verification.
Authentication
Requires x402 payment proof in thepayment-signature header.
Headers
Quote ID from
/email/quote. Must be an unused quote owned by the same
wallet, less than 1 hour old.Request body
Required when you passed
from_address to /email/quote. Optional when
rotation picked the address: the server uses the address locked into the
quote, and a different value returns 400 from_address_mismatch.Sender display name, rendered as
From: From Name <from_address>. Max 100
characters, no newlines or angle brackets.Ignored. The purchase sets a domain’s mode.
Recipient address or addresses. An array sends each recipient a separate
email, not CC or BCC.
Response
Advisory; the send still proceeds.
pinned_domain_warming: the pinned domain
is still warming. pinned_over_limit: it is over today’s daily_send_limit.
Only rotation enforces the limit and warmup score.curl -X POST https://win.oneshotagent.com/v1/tools/email/send \
-H "Content-Type: application/json" \
-H "X-Quote-ID: quote_abc123" \
-H "payment-signature: <base64 x402 payment>" \
-d '{
"from_address": "[email protected]",
"from_name": "OneShot Team",
"to_address": "[email protected]",
"subject": "Hello from OneShot",
"body": "This is a test email"
}'
# Quote was created without from_address → server-rotated, locked the pick.
# Send replays the locked address automatically.
curl -X POST https://win.oneshotagent.com/v1/tools/email/send \
-H "Content-Type: application/json" \
-H "X-Quote-ID: quote_abc123" \
-H "payment-signature: <base64 x402 payment>" \
-d '{
"to_address": "[email protected]",
"subject": "Hello",
"body": "..."
}'
const response = await fetch(
"https://win.oneshotagent.com/v1/tools/email/send",
{
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Quote-ID": "quote_abc123",
"payment-signature": paymentProof,
},
body: JSON.stringify({
from_address: "[email protected]",
from_name: "OneShot Team",
to_address: "[email protected]",
subject: "Hello from OneShot",
body: "This is a test email",
}),
},
);
{
"request_id": "req_xyz789",
"status": "processing",
"message": "Email job queued successfully"
}
Addresses
A domain sends and receives only at the addresses bought with it, listed on/email/domains. Replies to them arrive in the
inbox in both modes; mail to any other address is
dropped.
Errors
| Code | When |
|---|---|
400 from_address_mismatch | from_address doesn’t match the address locked into the quote by rotation. Omit it or pass the locked value. |
400 missing_from_address | The quote was created with an explicit from_address and the send has none. |
400 quote_already_used | A previous send already used the quote. |
503 moderation_unavailable | The content moderation provider could not be reached; nothing was sent and a settled payment is returned as credit. Retry after Retry-After. |
400 no_sending_domain | The domain is not yours or not verified. Nothing is charged; requirements names the setup. |
400 address_not_set_up | from_address is not one of the domain’s addresses. Add it through the purchase. |
403 domain_not_owned | The domain in from_address belongs to a different agent. |