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

url = "https://sandbox.withclasp.com/notifications"

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', 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",
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"

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")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

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

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
{
  "next": "<string>",
  "previous": "<string>",
  "results": [
    {
      "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"

Query Parameters

cursor
string

The pagination cursor value.

notification_type
enum<string>[]

Filter by one or more notification types.

  • enrollment_submitted - A member submitted their enrollment
  • enrollment_approved - A member's enrollment was approved
  • member_terminated - A member was terminated
  • welcome - A new hire should be welcomed and invited to enroll
  • newly_eligible - A member became eligible for benefits
  • dependent_age_out - A member's dependent is about to age out of coverage
  • open_enrollment_kickoff - An open enrollment window opened
  • open_enrollment_reminder - A member has not yet completed open enrollment
Available options:
enrollment_submitted,
enrollment_approved,
member_terminated,
welcome,
newly_eligible,
dependent_age_out,
open_enrollment_kickoff,
open_enrollment_reminder
page_size
integer

Number of results to return per page.

Filter to notifications about a specific object.

Filter by the type of the related object.

Response

200 - application/json
next
string | null
previous
string | null
results
object[]