Add a sending domain
Register a domain and start SES DKIM verification. The response carries the identity as created — verified is false, because nothing is verified until the DKIM records are published in the domain's DNS and SES resolves them. Poll /api/v1/domains/{id}/verify after publishing them.
region pins the SES region. The first domain a project adds LOCKS the project to that region and every later domain must match it — a project split across regions would have its SES configuration diverge silently.
stream assigns the identity to transactional or marketing traffic at creation; omit it to leave the identity serving both. stream_default makes it the project's default for that stream and therefore requires stream — sending it alone answers 422 validation_error rather than being ignored.
A host already registered — to this project or to another — answers 409 conflict when the caller can already send from it and 403 project_access_denied when it belongs elsewhere. A subdomain whose registrable root is held by a suspended project is refused the same way.
Requires the domains:write scope — Add and remove sending domains, and trigger verification.
API key authentication. Use a sk_* (FULL) or pk_* (SENDING_ONLY) key as the bearer token. Public keys (pk_*) are restricted to the email-send endpoints and the self-serve list subscribe/unsubscribe pair; every other endpoint — event tracking included — answers 403 for them. In scope terms (used by /api/v1/* operations): FULL keys hold every scope; SENDING_ONLY keys hold only emails:send.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Body for POST /api/v1/domains.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/api/v1/domains" \ -H "Content-Type: application/json" \ -d '{ "domain": "string" }'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"domain": "string",
"verified": true,
"region": "string",
"stream": "string",
"stream_default": true,
"default_from_address": "string",
"default_from_name": "string",
"mail_from_domain": "string",
"mail_from_domain_status": "string",
"dkim_verified": true,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"code": "string",
"request_id": "string",
"errors": [
{
"pointer": "string",
"code": "string",
"message": "string"
}
]
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"code": "string",
"request_id": "string",
"errors": [
{
"pointer": "string",
"code": "string",
"message": "string"
}
]
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"code": "string",
"request_id": "string",
"errors": [
{
"pointer": "string",
"code": "string",
"message": "string"
}
]
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"code": "string",
"request_id": "string",
"errors": [
{
"pointer": "string",
"code": "string",
"message": "string"
}
]
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"code": "string",
"request_id": "string",
"errors": [
{
"pointer": "string",
"code": "string",
"message": "string"
}
]
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"code": "string",
"request_id": "string",
"errors": [
{
"pointer": "string",
"code": "string",
"message": "string"
}
]
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"code": "string",
"request_id": "string",
"errors": [
{
"pointer": "string",
"code": "string",
"message": "string"
}
]
}