The Enforced TLS settings specify whether or not the recipient is required to support TLS or have a valid certificate. See the SMTP Ports User Guide for more information on opportunistic TLS.

If either setting is enabled and the recipient does not support TLS or have a valid certificate, we drop the message and send a block event with “TLS required but not supported” as the description.

GET

Get the current Enforced TLS settings.

Request

1
GET https://api.sendgrid.com/v3/user/settings/enforced_tls HTTP/1.1

Response

1
2
3
4
5
HTTP/1.1 200
{
    "require_tls": true,
    "require_valid_cert": false
}

PATCH

Change the Enforced TLS settings

URI Parameter Required Requirements Description
require_tls False true or false Require recipient TLS support
require_valid_cert False true or false Require certificates to be valid

Request

1
PATCH https://api.sendgrid.com/v3/user/settings/enforced_tls HTTP/1.1
Request Body
1
2
3
{
  "require_tls": true
}

Response

1
2
3
4
5
HTTP/1.1 200
{
    "require_tls": true,
    "require_valid_cert": false
}