Buy a sending domain
curl --request POST \
--url https://win.oneshotagent.com/v1/domains/buyimport requests
url = "https://win.oneshotagent.com/v1/domains/buy"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://win.oneshotagent.com/v1/domains/buy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://win.oneshotagent.com/v1/domains/buy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://win.oneshotagent.com/v1/domains/buy"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://win.oneshotagent.com/v1/domains/buy")
.asString();require 'uri'
require 'net/http'
url = URI("https://win.oneshotagent.com/v1/domains/buy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyEmail
Buy a sending domain
Price and buy a sending domain and its addresses before sending email.
POST
/
v1
/
domains
/
buy
Buy a sending domain
curl --request POST \
--url https://win.oneshotagent.com/v1/domains/buyimport requests
url = "https://win.oneshotagent.com/v1/domains/buy"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://win.oneshotagent.com/v1/domains/buy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://win.oneshotagent.com/v1/domains/buy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://win.oneshotagent.com/v1/domains/buy"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://win.oneshotagent.com/v1/domains/buy")
.asString();require 'uri'
require 'net/http'
url = URI("https://win.oneshotagent.com/v1/domains/buy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodySending needs a domain owned by the paying agent. The purchase is the only way
to set up a domain or add an address; an email never does. An owner or API
caller buys it; a goal or model cannot. To connect a name you own, use
domain setup.
Price a name
POST /v1/domains/quote with { "domain": "example.com", "mailbox_mode": "relay", "addresses": ["sales"] }.
Nothing is bought.
mailbox_mode:relay(default) addresses send and receive with no hosted inbox, free.mailboxaddresses are hosted inboxes, warmed before they send, with a fee per address. Fixed once bought.addresses: 1 to 10 local parts, default["agent"]. The first is the main address rotation and goals send from. The domain has only these: mail to another is dropped, and a send from one is refused.
purchasable: false with no quote_id. A
purchasable one returns quote_id, total_cost, registration_fee,
mailbox_provisioning_fee (per-address fee times the count, 0 on relay),
expires_at and billing. One payment, no renewal charge; an unused domain may
be released after a warning. See Pricing.
To add addresses to a verified domain you have, quote it with the new
addresses. The answer has setup: "domain_addresses" and prices only the new
ones, in the domain’s own mode. Refusals: 409 domain_not_verified,
409 mailbox_mode_conflict, 409 addresses_already_set_up.
Buy the exact quote
POST /v1/domains/buy with X-Quote-ID. The mode and addresses are the
quote’s. Expired, used and non-setup quotes are refused. The purchase returns
request_id and receipt_id and sends no email. A failed registration, or an
address that cannot be created, is refunded as credit.
const quote = await agent.quoteDomain("example.com", { mailbox_mode: "mailbox", addresses: ["sales", "support"] });
if (quote.purchasable && quote.quote_id && ownerApproved) {
await agent.buyDomain(quote.domain, quote.quote_id, { maxCost: quote.total_cost, wait: false });
}
await agent.quoteDomain("example.com", { addresses: ["billing"] }); // add an address later
quote = client.quote_domain("example.com", mailbox_mode="relay", addresses=["sales"])
if quote["purchasable"] and owner_approved:
client.buy_domain(quote["domain"], quote["quote_id"], max_cost=quote["total_cost"], wait=False)
email with a domain or address that is not set up returns
confirmation_required with the setup quote under setup. confirmNewDomain
(Python confirm_new_domain) buys that exact quote and returns setup_pending.
MCP shows the quote; it cannot buy.
Requirements and holds
Goal quotecontext.requirements reports account needs as ready, setup or
owner; the sending-domain need lists choices (domain_name,
mailbox_mode, addresses). Setup is never deducted from a goal budget. See
requirements.
Unmet setup holds a goal in awaiting_setup until the domain is ready. After
seven days it cancels with setup_timeout and refunds unused goal funds. See
holds.