POST
/
outbound
/
smarthost
curl --request POST \
  --url https://api.jetemail.com/outbound/smarthost \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "username": "smtp-user1",
  "password": "mySecurePassword123",
  "allowAnyDomain": false,
  "approvedDomains": [
    "example.com",
    "mydomain.com"
  ],
  "quota": 1000,
  "ipRestrictions": [
    "192.168.1.1",
    "10.0.0.1"
  ]
}'
{
  "success": true,
  "message": "SMTP user created successfully"
}

Authorizations

Authorization
string
header
required

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

Body

application/json
username
string
required

SMTP username (will be sanitized to lowercase alphanumeric with hyphens)

Required string length: 1 - 64
Example:

"smtp-user1"

password
string

Optional password (will be generated if not provided)

Required string length: 8 - 72
Example:

"mySecurePassword123"

allowAnyDomain
boolean
default:false

Whether to allow sending from any domain (requires paid subscription)

approvedDomains
string[]

List of approved domains for sending

Example:
["example.com", "mydomain.com"]
quota
number
default:0

Email sending quota

Required range: x >= 0
Example:

1000

ipRestrictions
string[]

List of allowed IP addresses

Example:
["192.168.1.1", "10.0.0.1"]

Response

200
application/json
SMTP user created successfully. If no password was provided in the request, a generated password will be included in the response.
success
boolean
required
Example:

true

message
string
required
Example:

"SMTP user created successfully"

password
string

Only present if no password was provided in the request

Example:

"generated-secure-password"