Save SMTP Settings
Define SMTP server settings for your partner account. These settings let emails sent from your partner account go out through your own mail server; sending the request again updates the existing settings.
Endpoint
| Property | Value |
|---|---|
| URL | POST /white-label-partner/smtp-setting |
| Method | POST |
| Auth | R-Auth: <partner-jwt> |
| Content-Type | application/json |
| Base URL | Stage Environment https://api-stage.docnova.ai/ Production Environment https://api.docnova.ai/ |
Example Request
curl --location '{{baseUrl}}/white-label-partner/smtp-setting' \
--header 'Content-Type: application/json' \
--header 'R-Auth: {{partnerJwt}}' \
--data-raw '{
"fromEmail": "noreply@example.com",
"host": "smtp.example.com",
"password": "{{password}}",
"port": 587,
"securityProtocol": "TLS",
"username": "{{username}}"
}'
Request body
{
"fromEmail": "noreply@example.com",
"host": "smtp.example.com",
"password": "{{password}}",
"port": 587,
"securityProtocol": "TLS",
"username": "{{username}}"
}
Request fields
| Field | Type | Required | Description |
|---|---|---|---|
fromEmail | string | Yes | Sender address shown on outgoing emails |
host | string | Yes | SMTP server host (e.g. smtp.example.com) |
port | number | Yes | SMTP server port (e.g. 25, 465, 587) |
username | string | Yes | Username for SMTP server authentication |
password | string | Yes | Password for SMTP server authentication |
securityProtocol | string (enum) | Yes | Connection security protocol. See the reference table below. |
note
securityProtocol must match the port: typically 465 for SSL and 587 for TLS.
Response
"f5e6d7c8-1234-5678-9abc-def012345678"
Response fields
| Field | Type | Description |
|---|---|---|
(body) | string (UUID) | Unique identifier (UUID) of the saved SMTP setting. The response is a plain UUID value, not a JSON object. |
Security protocol values
| Value | Description |
|---|---|
NONE | Unencrypted connection |
SSL | SSL/TLS encrypted connection (typically port 465) |
TLS | Connection upgraded to TLS via STARTTLS (typically port 587) |
Response Codes
| Code | Description |
|---|---|
200 | OK — SMTP settings saved. Example value: f5e6d7c8-1234-5678-9abc-def012345678 |
201 | Created |
401 | Unauthorized — R-Auth header missing or invalid |
403 | Forbidden — Partner is not authorized for this operation |
404 | Not Found |