Create a sending domain
Performs POST on /v1/sending-domains.
Request
Bearer token required
domains.sending_domains.permissions.can_create_sending_domains
Responses
All responses are JSON. Errors follow a consistent shape.
200
OK
401
Unauthenticated — missing or invalid API token
404
Not found
422
Validation error
curl -X POST "https://getmailpurse.com/api/v1/sending-domains" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"name": "Example"
}'
<?php
$response = \Http::withToken('YOUR_API_TOKEN')
->acceptJson()
->post('https://getmailpurse.com/api/v1/sending-domains',
{
"name": "Example"
});
$data = $response->json();
const res = await fetch('https://getmailpurse.com/api/v1/sending-domains', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Accept': 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "Example"
}),
});
const data = await res.json();
import requests
res = requests.request(
'POST',
'https://getmailpurse.com/api/v1/sending-domains',
headers={
'Authorization': 'Bearer YOUR_API_TOKEN',
'Accept': 'application/json',
},
json={
"name": "Example"
},
)
data = res.json()
Try it out
Runs in your browser — nothing is proxied or logged.
This is a POST request — it may create, modify or delete real data on your account.
The request goes straight from your browser to this MailPurse instance. Your token is never sent anywhere else or stored.