Notifications settings


Notifications settings

The notifications settings endpoints provide the ability to configure specific notifications settings for each environment. They implement operations to read, update and reset the settings for the environment.

Notifications settings API operations

The 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.

Notifications settings data model

Property Description
updatedAt The time the resource was last updated.
restrictions.smsVoiceQuota.daily The maximum number of SMS notifications that can be sent per user per day.
  • restrictions.smsVoiceQuota.daily can be set to any value between 0 and 50.
  • Trial accounts have a default value of 30.
  • The daily counters are reset every night at midnight UTC.
  • Voice notifications will be added at a future date.
deliveryMode A string that indicates the environment’s delivery mode.
Possible values:
  • ALL: Enable notifications to all users.
    • This option is supported in the production environment only.
    • The default deliveryMode for the production environment is ALL.
  • WHITELIST: Enable notifications to whitelisted users only.
    • This option is supported for both production and sandbox environments.
    • The default deliveryMode for sandbox environments is WHITELIST.
whitelist.user.id Declaration of the whitelist array comprising users and their IDs.
  • These users will receive notifications when deliveryMode is set to WHITELIST.
  • Sandbox environments have a maximum limit of 50 users in the whitelist array.
environment.id A string that specifies the environment resource’s unique identifier.

Response codes

Code Message
200 Successful operation.
201 Successfully created.
400 The request could not be completed.
401 You do not have access to this resource.
403 You do not have permissions or are not licensed to make this request.
404 The requested resource was not found.

Endpoint examples

Get notifications settings

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

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

The response data looks like this:

{
    "_links": {
        "self": {
            "href": "https://api.pingone.com/v1/environments/a95f225d-33af-4f1f-b1d2-5abc50262552/notificationsSettings"
        },
        "environment": {
            "href": "https://api.pingone.com/v1/environments/a95f225d-33af-4f1f-b1d2-5abc50262552"
        }
    },
    "updatedAt": "2019-01-28T16:57:42.293Z",
    "restrictions": {
        "smsVoiceQuota": {
            "daily": 30
        }
    },
      "whitelist": [
        {
            "user": {
                "id": "44c3b230-5cfa-443d-9449-5626b48d8293"
            }
        },
        {
            "user": {
                "id": "fb6cab6b-79f8-4f64-b09d-663916378b65"
            }
        }
    ]
    "deliveryMode": "ALL",
    "environment": {
        "id": "a95f225d-33af-4f1f-b1d2-5abc50262552"
    },
    "defaultLanguage": "en"
}

Update notifications settings

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

curl -X "PUT" "https://api.pingone.com/v1/environments/{environmentId}/notificationsSettings" \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer jwtToken'
-d $'{
    "restrictions": {
        "smsVoiceQuota": {
            "daily": 1
        }
    },
    "whitelist": [
    	{
    		"user":
    		{
    			"id": "ef285863-10b6-4b84-800e-4285b2e140cd"
    		}

    	}
    	],
    "deliveryMode": "WHITELIST",
    "defaultLanguage": "en"
}'

Reset notifications settings

The DELETE /environments/{environmentId}/notificationsSettings operation resets the notifications settings for the specified environment to its default.

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

A successful DELETE operation returns an HTTP 200 OK status, and the notifications resource reset with its default settings.