This documentation is currently under development. Certain sections are not yet complete and will be added shortly.
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Email Provider

Get email provider settings

get
/api/{tenantId}/admin/emailProvider

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.

Required scopes
This endpoint requires the following scopes:
Authorizations
OAuth2implicitRequired
Authorization URL:
Path parameters
tenantIdstringRequired
Responses
200

Settings returned.

Email provider settings, with the API key redacted.

typestring · nullableOptional

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.

hasApiKeybooleanRequired

Whether an API key is currently set.

scriptstring · nullableOptional

Content of server/scripts/email.provider.js. Null when the tenant has no script file yet.

starterScriptstringRequired

Starter implementation to seed a new script with.

get/api/{tenantId}/admin/emailProvider
GET /api/{tenantId}/admin/emailProvider HTTP/1.1
Host: app.neostore.cloud
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
200

Settings returned.

{
  "type": null,
  "from": {
    "email": "text",
    "name": null
  },
  "hasApiKey": true,
  "script": null,
  "starterScript": "text"
}

Configure email provider settings

put
/api/{tenantId}/admin/emailProvider

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.

Required scopes
This endpoint requires the following scopes:
Authorizations
OAuth2implicitRequired
Authorization URL:
Path parameters
tenantIdstringRequired
Body

Request body to configure the email provider.

typestring · enumRequired

Provider used to send mail.

Possible values:
apiKeystring · nullableOptional

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.

scriptstring · nullableOptional

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.

Responses
200

Settings updated.

Email provider settings, with the API key redacted.

typestring · nullableOptional

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.

hasApiKeybooleanRequired

Whether an API key is currently set.

scriptstring · nullableOptional

Content of server/scripts/email.provider.js. Null when the tenant has no script file yet.

starterScriptstringRequired

Starter implementation to seed a new script with.

put/api/{tenantId}/admin/emailProvider
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