Add a send domain
Registers a sending domain with the account. A new domain starts unvalidated. Adding a domain that is already registered changes nothing and returns its stored state. Publish an MX record for s2reply.<domain> that points to sndstrk.com, then call the verification endpoint.
POST
/v2/ accounts/ {accountId}/ send-domainsPath parameters
accountIdstringrequired
The account the request is scoped to.
Request body
domainstringrequired
The domain you send from, e.g. mail.example.com.
Response
The registered send domain.
Errors
400
The request body or parameters failed validation.
401
Missing or invalid token, or the token is not authorized for this account/user.
See Errors and rate limits for what error responses look like.
curl --location --request POST 'https://api.sendstreak.com/v2/accounts/YOUR_ACCOUNT_ID/send-domains' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"domain": "mail.example.com"
}'
const res = await fetch('https://api.sendstreak.com/v2/accounts/YOUR_ACCOUNT_ID/send-domains', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SENDSTREAK_TOKEN}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"domain": "mail.example.com"
})
});
import os, requests
res = requests.post(
'https://api.sendstreak.com/v2/accounts/YOUR_ACCOUNT_ID/send-domains',
headers={'Authorization': f"Bearer {os.environ['SENDSTREAK_TOKEN']}"},
json={
"domain": "mail.example.com"
},
)
{
"domain": "mail.example.com",
"validated": false
}