Skip to main content
GET
/
notifications
/
{public_id}
cURL
curl --request GET \
  --url https://sandbox.withclasp.com/notifications/{public_id} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://sandbox.withclasp.com/notifications/{public_id}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://sandbox.withclasp.com/notifications/{public_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.withclasp.com/notifications/{public_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://sandbox.withclasp.com/notifications/{public_id}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://sandbox.withclasp.com/notifications/{public_id}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://sandbox.withclasp.com/notifications/{public_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "related_object_id": "<string>",
  "payload": {},
  "created_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

API Key authentication with required prefix "Bearer"

Path Parameters

public_id
string
required

Response

200 - application/json
id
string
required
read-only
Pattern: ^[-a-zA-Z0-9_]+$
notification_type
enum<string>
required

The type of notification. For example, welcome is created for new hires and enrollment_submitted after a member submits their enrollment.

Available options:
enrollment_submitted,
enrollment_approved,
member_terminated,
welcome,
newly_eligible,
dependent_age_out,
open_enrollment_kickoff,
open_enrollment_reminder

The type of the object this notification is about.

Available options:
member,
dependent,
employer,
open_enrollment_window,
payroll_benefit,
subclass,
enrollment,
business_unit,
beneficiary,
plan,
plan_configuration,
notification,
retirement_connection

ID of the object this notification is about, so you can look up more information if needed.

payload
object
required
read-only

Commonly used information for notifications of this type that can be populated into an email template.

owner
enum<string>
required

Who is responsible for delivering this notification to the recipient.

Available options:
clasp,
partner
created_at
string<date-time>
required
read-only