https://app.evoriqa.com/api/v1/reseller/mail-configSave the BYO email config
Sets or replaces the org BYO email delivery config (active reseller plan required). The body is one of two shapes chosen by `mode`: a hosted **preset**, or a **custom** SMTP relay. Any save resets the config to `pending` — it only becomes active after a successful test send via `POST /reseller/mail-config/test`. Secrets are write-only: a read never echoes them, only `smtpPasswordSet`. Reseller endpoints additionally require the key to live on the organization owner own (primary) workspace — any other workspace returns 403.
Requires scope reseller:write
Access is gated — enable it before your first call
The API is off by default. A request succeeds only when all three switches are on: the platform master switch (off by default), your organisation’s API toggle, and your plan or client entitlement. Any one off returns 403 API access is not enabled for this workspace.
Request body
Content type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
| mode | string one of preset · custom | Required | Which of the two config shapes the rest of the body follows. |
| fromAddress | string up to 200 chars, email | Required | The From address every branded email is sent as. |
Hosted preset — mode: preset | |||
| presetId | string 1–40 chars | Required | The provider preset to use. |
| regionId | string 1–40 chars | Optional | The preset region, when the provider has more than one. |
| port | integer | Optional | Overrides the preset default port. |
| secret | string 1–200 chars | Optional | The provider API key or token. Write-only; omit on a later save to keep the stored value. |
| username | string up to 200 chars | Optional | Username, for presets that authenticate with a pair rather than a single secret. |
| password | string up to 200 chars | Optional | Password for that pair. Write-only; omit to keep the stored value. |
Custom SMTP relay — mode: custom | |||
| smtpHost | string 1–300 chars | Required | The relay hostname. A pasted URL is normalized to its host before validation; an invalid hostname is a 422. |
| smtpPort | integer | Required | The relay port. |
| smtpSecure | boolean | Required | Whether to connect over implicit TLS. |
| smtpUsername | string up to 200 chars | Optional | SMTP username. Omit to keep the stored value. |
| smtpPassword | string up to 200 chars | Optional | SMTP password. Write-only; omit to keep the stored value. |
| smtpNoAuth | boolean | Optional | Declares an unauthenticated relay, which CLEARS any stored credentials — the one case where omitting a secret does not keep it. |
Request
curl -X PUT "https://app.evoriqa.com/api/v1/reseller/mail-config" \
-H "x-api-key: $EVORIQA_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "mode": "custom", "fromAddress": "support@acme.com", "smtpHost": "smtp.acme.com", "smtpPort": 587, "smtpSecure": false, "smtpUsername": "acme", "smtpPassword": "…" }'const res = await fetch("https://app.evoriqa.com/api/v1/reseller/mail-config", {
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.EVORIQA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"mode": "custom",
"fromAddress": "support@acme.com",
"smtpHost": "smtp.acme.com",
"smtpPort": 587,
"smtpSecure": false,
"smtpUsername": "acme",
"smtpPassword": "…"
}),
});
const responseBody = await res.json();import os
import requests
res = requests.put(
"https://app.evoriqa.com/api/v1/reseller/mail-config",
headers={"Authorization": f"Bearer {os.environ['EVORIQA_API_KEY']}"},
json={
"mode": "custom",
"fromAddress": "support@acme.com",
"smtpHost": "smtp.acme.com",
"smtpPort": 587,
"smtpSecure": False,
"smtpUsername": "acme",
"smtpPassword": "…"
},
)
body = res.json()Response
{
"success": true,
"data": {
"mode": "custom",
"smtpHost": "smtp.acme.com",
"smtpPort": 587,
"smtpSecure": false,
"smtpUsername": "mailer@acme.com",
"smtpPasswordSet": true,
"fromAddress": "support@acme.com",
"status": "pending"
}
}