See api-docs Menu

Test Config Without Account Email Settings Update

Use this API to test an Email Settings config without updating the account Email Settings configuration.









Resource URL

https://<api-domain>/api/2/branding/email_settings/test

Header Parameters

Authorization

required

string

Set to bearer <access_token>.

Set <access_token> to the access token you generated using the Generate Token API.

The access token must have been generated using an API credential pair created using the scope required to call this API. This API can be called using any one of the following scopes: Manage All.

Content-Type

required

string

Set to application/json.

Sample Email

Below is an example of a test email, verify that it’s sent from the correct domain.

Request Parameters

address string Required. Email Settings server address
domain string Required. Domain of the From address.
from string Required. The From email address in the message.
port integer Optional. Defaults to 2.5.
user_name string Optional. The user name of the account to authenticate with the Email Settings server.
password string Optional. The password of the account to authenticate with the Email Settings server.
use_tls boolean Optional. Defaults to true.

Sample Request Body

{
   "address": "smtp.sendgrid.net",
   "use_tls": true,
   "from": "email@example.com",
   "domain": "example.com",
   "user_name": "user-name",
   "password": "password",
   "port": 587
}

Sample Responses

{
   "message": "Success",
   "statusCode": 200,
   "name": "Success"
}

Typically, this error means that your Authorization header value is missing or incorrectly formatted. The Authorization header value should use this format: bearer:<access_token>.

{
    "message": "Unauthorized",
    "statusCode": 401,
    "name": "UnauthorizedError"
}
{
   "message": "535 Authentication failed: The provided authorization grant is invalid, expired, or revoked\n",
   "statusCode": 500,
   "name": "InternalServerError"
}

Postman Collection

Replace sample variables indicated by {{ }} with your actual values.

Download for the Branding API

Sample Code

cURL

Replace sample values indicated by < > with your actual values.

Test Config Without Account Email Settings Update

curl 'https://<api-domain>/api/2/branding/email_settings/test' \
-X PUT \
-H "Authorization: bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
    "address": ""smtp.sendgrid.net",
    "domain": "example.com",
    "from": "email@example.com"
}'

Have a Question?

Have a how-to question? Seeing a weird error? Ask us about it on StackOverflow.

Found a bug? Submit a support ticket.

Have a product idea or request? Share it with us in our Ideas Portal.