Email
Send Email
Send an email with automatic domain provisioning
POST
Authentication
Requires x402 payment proof in theX-Payment-Proof header.
Headers
Quote ID from the
/email/quote endpoint. Must match an unused quote
owned by the same wallet.x402 EIP-712 signature authorising the quoted
total_cost.Request Body
Sender email address.Required if the matching quote did NOT come from rotation (you
passed
from_address when calling /email/quote).Optional if rotation picked the address at quote time — the server
replays the locked_from_address from the quote. You can pass the
same value as a sanity check, but a different value returns
400 from_address_mismatch (the agent paid for slot A and can’t send
from slot B).Display name for the sender. Rendered as
From: From Name <from_address> —
e.g. Jane Doe <[email protected]>. Max 100 characters; may not contain
newlines or angle brackets.Recipient email address(es)
Email subject line
Email body content (plain text)
Array of attachment objects with
filename, content_type, and content
(base64)Response
Job ID for tracking the email send status
Job status:
pending, processing, completed, or failedStatus message
Bulk Sending
To send the same email content to multiple recipients, pass an array of email addresses in theto_address field. Each recipient will receive an individual email (not CC/BCC).
Domain Provisioning
If the domain is new, OneShot will automatically:- Register the domain
- Configure DNS records
- Set up email sending infrastructure
- Verify domain ownership
Errors
| Code | When |
|---|---|
400 from_address_mismatch | from_address in the body doesn’t match the address locked into the quote at rotation time. Omit it or pass the locked value. |
400 missing_from_address | The quote has no locked_from_address (you passed an explicit from_address at quote time) and you didn’t pass one on send. |
400 quote_already_used | The quote was already consumed by a prior send. |
403 domain_not_owned | The domain in from_address belongs to a different agent. |
Notes
- Quote must be used within 1 hour
- Domain provisioning is automatic - no additional steps required
- Job status can be polled using the
request_id - When rotation picks for you, the from_address is locked into the quote
— see
/email/quote