api reference

Create Email Domain

POST
/v1/email-domains

Header Parameters

authorization?string|null

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request body for POST /email-domains.

For kind='hail_mail' domain is omitted; the server composes the full address as <local_prefix_workspace>+<local_prefix_name>@<base>. Both prefixes are optional in the body. The workspace prefix falls back to HAIL_MAIL_FROM or HAIL_MAIL_DEFAULT_USER_PREFIX; the server returns 503 if none is set. For kind='custom' domain is required and the prefix fields must be omitted. local_prefix_user and local_prefix_org are the deprecated names of the two prefix fields.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/email-domains" \  -H "Content-Type: application/json" \  -d '{    "kind": "hail_mail"  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",  "kind": "hail_mail",  "domain": "string",  "local_prefix_workspace": "string",  "local_prefix_name": "string",  "verification_status": "pending",  "dns_records": [    {      "name": "string",      "value": "string",      "type": "CNAME",      "priority": 0    }  ],  "mail_from_domain": "string",  "mail_from_status": "string",  "provider": "string",  "verified_at": "2019-08-24T14:15:22Z",  "inbound_enabled": false,  "sends_enabled": true,  "forward_to": [    "string"  ],  "forward_rate_per_hour": 0,  "email_agent_id": "da3a1fb1-9a30-48cb-9836-c04a0bfed3f3",  "email_agent_scope": "members",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "receive_ready": true,  "local_prefix_user": "string",  "local_prefix_org": "string"}