Gateways
Information about email gateways objects. Email gateway can be owned by a dealer or leased from platform owner.
Email gateway object
A dealer can send notification mail either through a gateway it owns, or through one leased from the platform owner. The two are separate objects, and the list operation returns them separately.
Own gateways currently support the SMTP provider only. Leased gateways are not limited to SMTP: router and mandrill_smtp have both been observed.
For an SMTP gateway, params carries default_from_address together with the mail.smtp.* transport settings, for example mail.smtp.host, mail.smtp.port, mail.smtp.auth, and the TLS options. The exact set depends on the provider.
API actions
API path: panel/gateways/email.
required permissions: email_gateways: "read".
List the email gateways available to the current dealer, and report which one is currently bound.
The response separates gateways the dealer owns from gateways that can be leased from the platform owner. Takes no parameters beyond the session credential.
A dealer that is the platform owner receives an empty leasable list, since there is nobody to lease from.
Enter the panel session hash with the "NVX " prefix, e.g. "NVX fa7bf873fab9333144e171372a321b06". Obtain the hash from the accountAuth operation.
Email gateways
true if request finished successfully.
trueID of the gateway currently bound to this dealer, or null when none is bound.
2Bad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array.
Operation not permitted, error code 13: the session lacks the required permission.
Error response object
POST /v2/panel/gateways/email/list HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Accept: */*
{
"success": true,
"bound_gateway": 2,
"own": [
{
"id": 2,
"leasable": false,
"label": "Paas gate",
"provider": "smtp",
"params": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
],
"leasable": [
{
"id": 1,
"label": "Platform gate",
"provider": "router",
"default_from_address": "no-reply@domain.tld"
}
]
}A dealer that is itself the platform owner receives an empty leasable list.
The originators used when sending through the bound gateway are configured in notification settings.
Errors
General types only.
Last updated
Was this helpful?