Get Notification History
curl --request GET \
--url https://alerts-api.dial.to/v2/history \
--header 'Authorization: Bearer <token>' \
--header 'X-Dialect-Client-Key: <x-dialect-client-key>'import requests
url = "https://alerts-api.dial.to/v2/history"
headers = {
"X-Dialect-Client-Key": "<x-dialect-client-key>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'X-Dialect-Client-Key': '<x-dialect-client-key>',
Authorization: 'Bearer <token>'
}
};
fetch('https://alerts-api.dial.to/v2/history', 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://alerts-api.dial.to/v2/history",
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>",
"X-Dialect-Client-Key: <x-dialect-client-key>"
],
]);
$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://alerts-api.dial.to/v2/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Dialect-Client-Key", "<x-dialect-client-key>")
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://alerts-api.dial.to/v2/history")
.header("X-Dialect-Client-Key", "<x-dialect-client-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://alerts-api.dial.to/v2/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Dialect-Client-Key"] = '<x-dialect-client-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"alerts": [
{
"id": "<string>",
"timestamp": "2024-02-20T15:30:00.000Z",
"title": "<string>",
"body": "<string>",
"image": "https://www.dialect.to/favicon.ico",
"actions": [
{
"type": "<string>",
"label": "<string>",
"url": "<string>",
"context": {
"type": "<string>",
"apiUrl": "<string>",
"action": "<string>"
}
}
],
"topic": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Product Announcements",
"slug": "product-announcements"
},
"app": {
"id": "255d6163-7e25-43e9-a188-c2f8d0980a4a",
"name": "Dialect",
"icon": "https://dialect-file-storage.s3.us-west-2.amazonaws.com/avatars/dialect-logo.png"
},
"data": {
"type": "transaction",
"transactionId": "123",
"amount": "100"
}
}
],
"summary": {
"unreadCount": 5,
"lastRead": {
"timestamp": "2024-02-20T15:30:00.000Z"
}
},
"limit": 10,
"cursor": "<string>"
}{
"error": {}
}{
"message": "<string>"
}Integrate an Inbox
Get Notification History
Retrieve user’s alert history with pagination, filtering by app, and detailed notification metadata
GET
/
v2
/
history
Get Notification History
curl --request GET \
--url https://alerts-api.dial.to/v2/history \
--header 'Authorization: Bearer <token>' \
--header 'X-Dialect-Client-Key: <x-dialect-client-key>'import requests
url = "https://alerts-api.dial.to/v2/history"
headers = {
"X-Dialect-Client-Key": "<x-dialect-client-key>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'X-Dialect-Client-Key': '<x-dialect-client-key>',
Authorization: 'Bearer <token>'
}
};
fetch('https://alerts-api.dial.to/v2/history', 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://alerts-api.dial.to/v2/history",
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>",
"X-Dialect-Client-Key: <x-dialect-client-key>"
],
]);
$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://alerts-api.dial.to/v2/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Dialect-Client-Key", "<x-dialect-client-key>")
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://alerts-api.dial.to/v2/history")
.header("X-Dialect-Client-Key", "<x-dialect-client-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://alerts-api.dial.to/v2/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Dialect-Client-Key"] = '<x-dialect-client-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"alerts": [
{
"id": "<string>",
"timestamp": "2024-02-20T15:30:00.000Z",
"title": "<string>",
"body": "<string>",
"image": "https://www.dialect.to/favicon.ico",
"actions": [
{
"type": "<string>",
"label": "<string>",
"url": "<string>",
"context": {
"type": "<string>",
"apiUrl": "<string>",
"action": "<string>"
}
}
],
"topic": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Product Announcements",
"slug": "product-announcements"
},
"app": {
"id": "255d6163-7e25-43e9-a188-c2f8d0980a4a",
"name": "Dialect",
"icon": "https://dialect-file-storage.s3.us-west-2.amazonaws.com/avatars/dialect-logo.png"
},
"data": {
"type": "transaction",
"transactionId": "123",
"amount": "100"
}
}
],
"summary": {
"unreadCount": 5,
"lastRead": {
"timestamp": "2024-02-20T15:30:00.000Z"
}
},
"limit": 10,
"cursor": "<string>"
}{
"error": {}
}{
"message": "<string>"
}Authorizations
Bearer token authentication for subscriber calls
Headers
Client Key used to uniquely identify the client
Example:
"dk_gyh2eqzfkc4mhp5eiahnndkz"
Query Parameters
Application ID
Example:
"255d6163-7e25-43e9-a188-c2f8d0980a4a"
Pagination limit
Required range:
1 <= x <= 20Example:
10
Pagination cursor
Was this page helpful?
⌘I