SMTP service providers

Use these methods to manage connections to SMTP service providers that are used for managing outgoing emails in the Back Office.

GET[host]/api/v2/mail/providers

Get a list of SMTP service providers

GET[host]/api/v2/mail/providers/{providerId}

Get SMTP service provider details

GET[host]/api/v2/mail/providers/{providerId}/status

Validate an SMTP service provider connection

POST[host]/api/v2/mail/providers

Configure a new SMTP service provider connection

PATCH[host]/api/v2/mail/providers/{providerId}

Update an SMTP service provider connection

DELETE[host]/api/v2/mail/providers/{providerId}

Delete an SMTP service provider

Get a list of SMTP service providers

Use this method to obtain a list of SMTP service provider connections configured in the Back Office.

To obtain detailed information about a specific connection, use a separate method to get SMTP service provider details.

Request

Header parameters:

  • Authorization: Bearer <token>

GET[host]/api/v2/mail/providers

curl --location --request GET 'https://host.name/api/v2/mail/providers?limit=10&offset=0' \
--header 'Authorization: Bearer <token>' \
--header 'accept-language: ja'

Response

A response includes an array of SMTP Service Provider objects providing information about the connections configured in the Back Office.

Get SMTP service provider details

Use this method to obtain detailed information about a specific connection to an SMTP service provider.

To obtain a full list of connections to SMTP service providers, use a separate method to get a list of SMTP service providers.

Request

Header parameters:

  • Authorization: Bearer <token>

Path parameters:

providerId required

The identifier of a connection to an SMTP service provider.

GET[host]/api/v2/mail/providers/{providerId}

curl --location --request GET 'https://host.name/api/v2/mail/providers/1' \
--header 'Authorization: Bearer <token>'

Response

A response includes an SMTP Service Provider object containing information about the specified connection.

Validate an SMTP service provider connection

Use this method to validate the connection settings of a specified SMTP service provider.

Request

Header parameters:

  • Authorization: Bearer <token>

Path parameters:

providerId required

The identifier of a connection to an SMTP service provider.

GET[host]/api/v2/mail/providers/{providerId}/status

curl --location --request GET 'https://host.name/api/v2/mail/providers/1/status' \
--header 'Authorization: Bearer <token>'

Response

If the connection settings of the specified SMTP service provider are valid, no response body is returned.

Configure a new SMTP service provider connection

Use this method to configure a new connection to an SMTP service provider.

Request

Header parameters:

  • Authorization: Bearer <token>

Body:

Specify the following parameters when configuring a connection:

driver string required

The driver used for sending emails (smtp).

host string required

The SMTP hostname.

port integer required

The SMTP port number.

username string required

The SMTP username.

password string required

The SMTP password.

sendFrom string required

The sender’s email address displayed to your email recipients.

sendFromName string required

The sender’s name displayed to your email recipients (for example, this may be your company name).

encryption string required

The encryption protocol used to securely communicate with an SMTP service provider. Possible values:

  • tls

  • ssl

isEnabled boolean required

If true, a connection to an SMTP service provider is enabled; otherwise, false.

caption string

The name that you want to use for a connection configuration in the Back Office.

POST[host]/api/v2/mail/providers

curl --location --request GET 'https://host.name/api/v2/mail/providers' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
  "driver": "smtp",
  "host": "host.example.com",
  "port": 25,
  "username": "User",
  "password": "Password",
  "sendFrom": "user@example.com",
  "sendFromName": "Company name",
  "encryption": "ssl",
  "isEnabled": 1,
  "caption": "My SMTP connection"
}'

Response

A response includes an SMTP Service Provider object containing information about the configured connection to an SMTP service provider.

Update an SMTP service provider connection

Use this method to update the connection settings of an SMTP service provider.

Request

Header parameters:

  • Authorization: Bearer <token>

Path parameters:

providerId required

The identifier of a connection to an SMTP service provider.

Body:

The following field values can be updated:

caption string

The name that you want to use for a connection configuration in the Back Office.

driver string

The driver used for sending emails (smtp).

host string

The SMTP hostname.

port integer

The SMTP port number.

username string

The SMTP username.

password string

The SMTP password.

sendFrom string

The sender’s email address displayed to your email recipients.

sendFromName string

The sender’s name displayed to your email recipients (for example, this may be your company name).

encryption string

The encryption protocol. Possible values:

  • tls

  • ssl

isEnabled integer

If true, a connection to an SMTP service provider is enabled; otherwise, false.

PATCH[host]/api/v2/mail/providers/{providerId}

curl --location --request PATCH 'https://host.name/api/v2/mail/providers/1' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
  "caption": "My SMTP connection",
  "driver": "smtp",
  "host": "host.example.com",
  "port": 25,
  "username": "User",
  "password": "Password",
  "sendFrom": "user@example.com",
  "sendFromName": "Company name",
  "encryption": "ssl",
  "isEnabled": 1
}'

Response

A response includes an SMTP Service Provider object containing information about the updated connection settings.

Delete an SMTP service provider

Use this method to remove an existing connection to an SMTP service provider.

Request

Header parameters:

  • Authorization: Bearer <token>

Path parameters:

providerId required

The identifier of a connection to an SMTP service provider.

DELETE[host]/api/v2/mail/providers/{providerId}

curl --location --request DELETE 'https://host.name/api/v2/mail/providers/1' \
--header 'Authorization: Bearer <token>'

Response

In case of success, no response body is returned.