Email Provider
Returns server/emails.yml together with the content of server/scripts/email.provider.js. A tenant with no email provider configured yet gets a definition with a null type. The API key is never returned; hasApiKey indicates whether one is currently set. Omit apiKey on PUT to keep the currently configured key.
Authorization
Requires tenant.configuration.email:read scope.
Settings returned.
Email provider settings, with the API key redacted.
Provider type as stored in server/emails.yml. Usually one of the values of
Neo.Web.Api.Admin.Controllers.Settings.EmailProviderController.EmailProviderType, but a tenant configured by hand may hold any other value.
Null when this tenant has no email provider configured yet.
Whether an API key is currently set.
Content of server/scripts/email.provider.js. Null when the tenant has no script file yet.
Starter implementation to seed a new script with.
GET /api/{tenantId}/admin/emailProvider HTTP/1.1
Host: app.neostore.cloud
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
Settings returned.
{
"type": null,
"from": {
"email": "text",
"name": null
},
"hasApiKey": true,
"script": null,
"starterScript": "text"
}Replaces the provider section of server/emails.yml, leaving the resource folders untouched (or defaulted to /locales/emails/ when the file is being created for this tenant).
The script file is only written when type is script, so switching to another provider keeps the current script available to switch back to.
Authorization
Requires tenant.configuration.email:write scope.
Request body to configure the email provider.
Provider used to send mail.
API key of the provider. Omit or leave empty to keep the currently configured key, which is only
possible when the provider type is left unchanged. Ignored for script.
Content of server/scripts/email.provider.js. Only written when Neo.Web.Api.Admin.Controllers.Settings.EmailProviderController.UpdateEmailProviderRequest.Type is
script; omit or leave empty to keep the currently configured script. Ignored for the other
provider types, which leave the script file untouched.
Settings updated.
Email provider settings, with the API key redacted.
Provider type as stored in server/emails.yml. Usually one of the values of
Neo.Web.Api.Admin.Controllers.Settings.EmailProviderController.EmailProviderType, but a tenant configured by hand may hold any other value.
Null when this tenant has no email provider configured yet.
Whether an API key is currently set.
Content of server/scripts/email.provider.js. Null when the tenant has no script file yet.
Starter implementation to seed a new script with.
The sender identity, the API key, or the script is missing and none is currently configured.
PUT /api/{tenantId}/admin/emailProvider HTTP/1.1
Host: app.neostore.cloud
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 93
{
"type": "sendgrid",
"from": {
"email": "[email protected]",
"name": null
},
"apiKey": null,
"script": null
}{
"type": null,
"from": {
"email": "text",
"name": null
},
"hasApiKey": true,
"script": null,
"starterScript": "text"
}Last updated

