Notifications settings (SMTP)


Notifications settings (SMTP)

The SMTP notifications settings endpoints provide the ability to configure the organization’s own SMTP service to send email notifications for each environment, instead of the built-in email service of PingOne for Customers. These endpoints implement operations to read, update and reset the SMTP notification settings for the environment.

Note:

  • You need the Environment Admin role to perform operations on SMTP notifications settings resources.
  • You can configure only one SMTP server per environment.

SMTP notifications settings API operations

The SMTP notifications settings endpoints support the following operations:

For hands-on experience with the notifications settings API endpoints, click the Run in Postman button below to download a Postman collection that you can import and open in your local Postman application.

Endpoint examples

Get notifications settings

The GET /environments/{environmentId}/notificationsSettings/emailDeliverySettings endpoint returns the SMTP notifications settings resource for a specified environment.

curl -X "GET" "https://api.pingone.com/v1/environments/{environmentId}/notificationsSettings/emailDeliverySettings" \
-H 'Authorization: Bearer jwtToken'

The response data looks like this:

{
    "_links": {
        "self": {
            "href": "https://api.pingone.com/v1/environments/a3bee042-f4a0-43c1-869c-7c3b757a9fd0/notificationsSettings/emailDeliverySettings"
        },
        "environment": {
            "href": https://api.pingone.com/v1/environments/a3bee042-f4a0-43c1-869c-7c3b757a9fd0"
        }
    },
    "host": "email-smtp.amazonaws.com",
    "port": 465,
    "username": "smtp_username",
    "from": {
        "name": "from_name",
        "address": "from@pingidentity.com"
    },
    "replyTo": {
        "name": "reply_name",
        "address": "reply@pingidentity.com"
    },
    "environment": {
        "id": "a3bee042-f4a0-43c1-869c-7c3b757a9fd0"
    },
    "updatedAt": "2019-06-13T09:07:55.653Z"
}

Update notifications settings

The PUT /environments/{environmentId}/notificationsSettings/emailDeliverySettings endpoint updates the SMTP notifications settings for the specified environment.

curl -X "PUT" "https://api.pingone.com/v1/environments/{environmentId}/notificationsSettings/emailDeliverySettings" \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer jwtToken'
-d $'{
    "host": "email-smtp.amazonaws.com",
    "port": 465,
    "username": "smtp_username",
    "password": "smtp_password",
    "from": {
        "name": "from_name",
        "address": "from@pingidentity.com"
    },
    "replyTo": {
        "name": "reply_name",
        "address": "reply@pingidentity.com"
    }
}'

The response data looks like this:

{
    "_links": {
        "self": {
            "href": "http://localhost:8080/environments/a3bee042-f4a0-43c1-869c-7c3b757a9fd0/notificationsSettings/emailDeliverySettings"
        },
        "environment": {
            "href": "http://localhost:8080/environments/a3bee042-f4a0-43c1-869c-7c3b757a9fd0"
        }
    },
    "host": "email-smtp.amazonaws.com",
    "port": 465,
    "username": "smtp_username",
    "from": {
        "name": "from_name",
        "address": "from@pingidentity.com"
    },
    "replyTo": {
        "name": "reply_name",
        "address": "reply@pingidentity.com"
    },
    "environment": {
        "id": "a3bee042-f4a0-43c1-869c-7c3b757a9fd0"
    },
    "updatedAt": "2019-06-13T09:07:55.653Z"
}

Reset notifications settings

The DELETE /environments/{environmentId}/notificationsSettings/emailDeliverySettings operation resets the SMTP notifications settings for the specified environment to its default (the built-in email service of PingOne for Customers).

curl -X “DELETE” “https://api.pingone.com/v1/environments/{environmentId}/notificationsSettings/emailDeliverySettings” \
-H ‘Authorization: Bearer jwtToken’

A successful DELETE operation returns an HTTP 204 OK status, and removes the configuration for the organization’s custom SMTP server.