The Email Servers API allows you to configure a custom external email provider to send email notifications. By default, notifications such as the welcome email or an account recovery email are sent through an Okta-managed SMTP server. Adding a custom email provider gives you more control over your email delivery.
When you configure a custom email provider with an OAuth 2.0 authentication method, review Custom email providers with OAuth 2.0.
Lists all the enrolled custom SMTP server configurations
OK
Forbidden
Too Many Requests
{- "email-servers": [
- {
- "id": "ces7n3u7sSohfoaou0g1",
- "alias": "CustomServer1",
- "enabled": true,
- "authType": "BASIC_SMTP_AUTH",
- "host": "smtp.example.com",
- "port": 587,
- "username": "user@example.com"
}
]
}Creates a custom email SMTP server configuration for your org.
For more information about configuring the OAuth 2.0 authentication methods, see Custom email providers with OAuth 2.0.
Successfully enrolled server credentials
Bad Request
Forbidden
Too Many Requests
{- "alias": "CustomServer1",
- "enabled": true,
- "host": "smtp.example.com",
- "port": 587,
- "username": "user@example.com",
- "password": "securepassword"
}{- "id": "ces7n3u7sSohfoaou0g1",
- "alias": "CustomServer1",
- "enabled": true,
- "authType": "BASIC_SMTP_AUTH",
- "host": "smtp.example.com",
- "port": 587,
- "username": "user@example.com"
}Retrieves the specified custom SMTP server configuration
OK
Forbidden
Not Found
Too Many Requests
{- "id": "ces7n3u7sSohfoaou0g1",
- "alias": "CustomServer1",
- "enabled": true,
- "authType": "BASIC_SMTP_AUTH",
- "host": "smtp.example.com",
- "port": 587,
- "username": "user@example.com"
}Updates the specified custom SMTP server configuration
OK
Bad Request
Forbidden
Not Found
Too Many Requests
{- "alias": "CustomServer1 New Alias",
- "password": "New password"
}{- "id": "ces7n3u7sSohfoaou0g1",
- "alias": "CustomServer1 New Alias",
- "enabled": true,
- "authType": "BASIC_SMTP_AUTH",
- "host": "smtp.example.com",
- "port": 587,
- "username": "user@example.com"
}Deletes the specified custom SMTP server configuration
No content
Forbidden
Not Found
Too Many Requests
{- "errorCode": "E0000006",
- "errorSummary": "You do not have permission to perform the requested action",
- "errorLink": "E0000006",
- "errorId": "sampleNUSD_8fdkFd8fs8SDBK",
- "errorCauses": [ ]
}Tests the specified custom SMTP server configuration
No content
Bad Request
Forbidden
Not Found
Too Many Requests
{- "fromAddress": "sender@host.com",
- "toAddress": "receiver@host.com"
}{- "errorCode": "E0000001",
- "errorSummary": "Api validation failed: {0}",
- "errorLink": "E0000001",
- "errorId": "sampleiCF-8D5rLW6myqiPItW",
- "errorCauses": [ ]
}