Skip to main content
POST
/
inbound
/
domains
curl --request POST \
  --url https://api.jetemail.com/inbound/domains \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "domain": "example.com",
  "delivery_type": "smtp",
  "smtp_servers": [
    {
      "url": "mail.example.com:25",
      "priority": 1,
      "tls_enabled": true
    }
  ]
}
'
{
  "success": true,
  "result": {
    "domain": "example.com",
    "delivery_type": "smtp",
    "status": "active",
    "uuid": "550e8400-e29b-41d4-a716-446655440000",
    "webhook_secret": "whsec_..."
  }
}

Authorizations

Authorization
string
header
required

Enter your Bearer token in the format "Bearer {token}"

Body

application/json
domain
string
required

Primary domain name to add (e.g., example.com, not mail.example.com)

Example:

"example.com"

delivery_type
enum<string>
required

How emails should be delivered for this domain

Available options:
smtp,
webhook
smtp_servers
(string | object)[]

Required for smtp delivery_type. Array of SMTP servers

Server URL

Example:

"mail.example.com:25"

webhook_url
string<uri>

Required for webhook delivery_type. Webhook URL to receive emails

Example:

"https://example.com/webhook/inbound"

webhook_method
enum<string>
default:POST

HTTP method for webhook

Available options:
POST,
PUT
webhook_headers
object

Custom headers to send with webhook requests

webhook_timeout
integer
default:30000

Webhook timeout in milliseconds

webhook_retry_count
integer
default:3

Number of retry attempts for failed webhook calls

webhook_auth_header
string

Authorization header value for webhook

Response

Domain added successfully

success
boolean
Example:

true

result
object