Add a domain
POST /domains
Register a sending domain and get the DNS records to publish.
Body
namestringRequiredThe domain to send from. A subdomain such as
send.acme.exampleis recommended.regionstringus-east-1,eu-west-1,sa-east-1orap-northeast-1. Defaults tous-east-1. Receiving is available inus-east-1andeu-west-1only.
8 more fields (open_tracking, click_tracking, tracking_subdomain, custom_return_path, receiving_host, confirm_replace_mx, tls, capabilities)
open_trackingbooleanRewrite the body to add a tracking pixel. Off by default.
click_trackingbooleanRewrite links so clicks are recorded. Off by default.
tracking_subdomainstringThe label tracking links are served from. Defaults to
links.custom_return_pathstringThe label the sending records are published at. Leave it out and we pick the first label no other email service uses at your domain:
rasket, thenrasketmail,rk,rasket1,rasket2. A label that already holds another service's records answers422 invalid_parameterwithdetails.reasonreturn_path_in_useand a freedetails.suggestion.receiving_hoststringWhere the domain receives mail:
@by default (anything@<name>), or a label such asinboundforanything@inbound.<name>. An MX at@takes the domain's mail from its current mailbox provider.confirm_replace_mxbooleanOnly with receiving enabled. If the receiving name's MX already delivers to another mailbox provider, the request is refused with
409 receiving_mx_in_useunless this istrue. Use areceiving_hostlabel instead to leave that mail where it is.tlsstringopportunistic(the default) orenforced. Enforced refuses to deliver without TLS.capabilitiesobject{ sending, receiving }, eachenabledordisabled. Defaults to sending on, receiving off; at least one must be on. Receiving in a region without it is400 validation_error.
Request
curl -X POST "https://api.rasket.com/domains" \
-H "Authorization: Bearer $RASKET_API_KEY" \
-H "User-Agent: acme-billing/1.0" \
-H "Content-Type: application/json" \
-d '{
"name": "send.acme.example",
"region": "eu-west-1"
}'const response = await fetch("https://api.rasket.com/domains", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.RASKET_API_KEY}`,
"User-Agent": "acme-billing/1.0",
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "send.acme.example",
region: "eu-west-1"
}),
});
const { id } = await response.json();import os
import requests
response = requests.post(
"https://api.rasket.com/domains",
headers={
"Authorization": f"Bearer {os.environ['RASKET_API_KEY']}",
"User-Agent": "acme-billing/1.0",
},
json={
"name": "send.acme.example",
"region": "eu-west-1"
},
)
id = response.json()["id"]Response 201
{
"id": "d91a7b60-1a5f-4a2e-9d1b-0d9f2c7a1e34",
"name": "send.acme.example",
"created_at": "2026-09-09T09:02:44.301Z",
"status": "not_started",
"region": "eu-west-1",
"open_tracking": false,
"click_tracking": false,
"tracking_subdomain": "links",
"receiving_host": "@",
"custom_return_path": "rasket",
"capabilities": {
"sending": "enabled",
"receiving": "disabled"
},
"managed": false,
"records": [
{
"record": "DKIM",
"name": "rasket._domainkey.send",
"type": "TXT",
"ttl": "Auto",
"status": "not_started",
"value": "p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA…"
},
{
"record": "SPF",
"name": "rasket.send",
"type": "CNAME",
"ttl": "Auto",
"status": "not_started",
"value": "eu1.rasket.net"
},
{
"record": "Tracking",
"name": "links.send",
"type": "CNAME",
"ttl": "Auto",
"status": "not_started",
"value": "links1.rasket-dns.com"
}
]
}- Publish the records for each capability you turned on (DKIM and the SPF CNAME for sending), then call verify. Nothing sends until the domain is verified.
recordslists every group whatever the toggles say — Tracking, and inus-east-1andeu-west-1a Receiving MX atreceiving_host— so you can see what turning one on would need. Record names are relative to your DNS zone: forsend.acme.exampleinacme.example, the return-path CNAME sits atrasket.send.regionis where your mail is sent from, not where your data is stored.- A name another team has already verified answers
409 resource_locked. custom_return_pathin the response is the label we chose when you named none.