curl --request POST \
--url https://alerts-api.dial.to/v2/{appId}/send \
--header 'Content-Type: application/json' \
--header 'x-dialect-api-key: <api-key>' \
--data '
{
"channels": [],
"message": {
"title": "Alert Title",
"body": "Alert body",
"image": "https://dialect-file-storage.s3.us-west-2.amazonaws.com/avatars/dialect-logo.png",
"actions": [
{
"type": "link",
"label": "Open Link",
"url": "https://dialect.to"
}
]
},
"recipient": {
"type": "subscriber",
"walletAddress": "6CxnSjtasq5Tzwb4b93AhLofXtiDvMpQ2vTkWdSZqTH7"
},
"topicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data": {
"type": "transaction",
"transactionId": "123",
"amount": "100"
},
"push": {}
}
'import requests
url = "https://alerts-api.dial.to/v2/{appId}/send"
payload = {
"channels": [],
"message": {
"title": "Alert Title",
"body": "Alert body",
"image": "https://dialect-file-storage.s3.us-west-2.amazonaws.com/avatars/dialect-logo.png",
"actions": [
{
"type": "link",
"label": "Open Link",
"url": "https://dialect.to"
}
]
},
"recipient": {
"type": "subscriber",
"walletAddress": "6CxnSjtasq5Tzwb4b93AhLofXtiDvMpQ2vTkWdSZqTH7"
},
"topicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data": {
"type": "transaction",
"transactionId": "123",
"amount": "100"
},
"push": {}
}
headers = {
"x-dialect-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-dialect-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
channels: [],
message: {
title: 'Alert Title',
body: JSON.stringify('Alert body'),
image: 'https://dialect-file-storage.s3.us-west-2.amazonaws.com/avatars/dialect-logo.png',
actions: [{type: 'link', label: 'Open Link', url: 'https://dialect.to'}]
},
recipient: {
type: 'subscriber',
walletAddress: '6CxnSjtasq5Tzwb4b93AhLofXtiDvMpQ2vTkWdSZqTH7'
},
topicId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
data: {type: 'transaction', transactionId: '123', amount: '100'},
push: {}
})
};
fetch('https://alerts-api.dial.to/v2/{appId}/send', 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/{appId}/send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'channels' => [
],
'message' => [
'title' => 'Alert Title',
'body' => 'Alert body',
'image' => 'https://dialect-file-storage.s3.us-west-2.amazonaws.com/avatars/dialect-logo.png',
'actions' => [
[
'type' => 'link',
'label' => 'Open Link',
'url' => 'https://dialect.to'
]
]
],
'recipient' => [
'type' => 'subscriber',
'walletAddress' => '6CxnSjtasq5Tzwb4b93AhLofXtiDvMpQ2vTkWdSZqTH7'
],
'topicId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'data' => [
'type' => 'transaction',
'transactionId' => '123',
'amount' => '100'
],
'push' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-dialect-api-key: <api-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://alerts-api.dial.to/v2/{appId}/send"
payload := strings.NewReader("{\n \"channels\": [],\n \"message\": {\n \"title\": \"Alert Title\",\n \"body\": \"Alert body\",\n \"image\": \"https://dialect-file-storage.s3.us-west-2.amazonaws.com/avatars/dialect-logo.png\",\n \"actions\": [\n {\n \"type\": \"link\",\n \"label\": \"Open Link\",\n \"url\": \"https://dialect.to\"\n }\n ]\n },\n \"recipient\": {\n \"type\": \"subscriber\",\n \"walletAddress\": \"6CxnSjtasq5Tzwb4b93AhLofXtiDvMpQ2vTkWdSZqTH7\"\n },\n \"topicId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"data\": {\n \"type\": \"transaction\",\n \"transactionId\": \"123\",\n \"amount\": \"100\"\n },\n \"push\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-dialect-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://alerts-api.dial.to/v2/{appId}/send")
.header("x-dialect-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"channels\": [],\n \"message\": {\n \"title\": \"Alert Title\",\n \"body\": \"Alert body\",\n \"image\": \"https://dialect-file-storage.s3.us-west-2.amazonaws.com/avatars/dialect-logo.png\",\n \"actions\": [\n {\n \"type\": \"link\",\n \"label\": \"Open Link\",\n \"url\": \"https://dialect.to\"\n }\n ]\n },\n \"recipient\": {\n \"type\": \"subscriber\",\n \"walletAddress\": \"6CxnSjtasq5Tzwb4b93AhLofXtiDvMpQ2vTkWdSZqTH7\"\n },\n \"topicId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"data\": {\n \"type\": \"transaction\",\n \"transactionId\": \"123\",\n \"amount\": \"100\"\n },\n \"push\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://alerts-api.dial.to/v2/{appId}/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-dialect-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"channels\": [],\n \"message\": {\n \"title\": \"Alert Title\",\n \"body\": \"Alert body\",\n \"image\": \"https://dialect-file-storage.s3.us-west-2.amazonaws.com/avatars/dialect-logo.png\",\n \"actions\": [\n {\n \"type\": \"link\",\n \"label\": \"Open Link\",\n \"url\": \"https://dialect.to\"\n }\n ]\n },\n \"recipient\": {\n \"type\": \"subscriber\",\n \"walletAddress\": \"6CxnSjtasq5Tzwb4b93AhLofXtiDvMpQ2vTkWdSZqTH7\"\n },\n \"topicId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"data\": {\n \"type\": \"transaction\",\n \"transactionId\": \"123\",\n \"amount\": \"100\"\n },\n \"push\": {}\n}"
response = http.request(request)
puts response.read_body{}{
"error": {}
}Send Alert
Send alert to one subscriber, multiple subscribers, or all with rich content support including images, actions, and custom data
curl --request POST \
--url https://alerts-api.dial.to/v2/{appId}/send \
--header 'Content-Type: application/json' \
--header 'x-dialect-api-key: <api-key>' \
--data '
{
"channels": [],
"message": {
"title": "Alert Title",
"body": "Alert body",
"image": "https://dialect-file-storage.s3.us-west-2.amazonaws.com/avatars/dialect-logo.png",
"actions": [
{
"type": "link",
"label": "Open Link",
"url": "https://dialect.to"
}
]
},
"recipient": {
"type": "subscriber",
"walletAddress": "6CxnSjtasq5Tzwb4b93AhLofXtiDvMpQ2vTkWdSZqTH7"
},
"topicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data": {
"type": "transaction",
"transactionId": "123",
"amount": "100"
},
"push": {}
}
'import requests
url = "https://alerts-api.dial.to/v2/{appId}/send"
payload = {
"channels": [],
"message": {
"title": "Alert Title",
"body": "Alert body",
"image": "https://dialect-file-storage.s3.us-west-2.amazonaws.com/avatars/dialect-logo.png",
"actions": [
{
"type": "link",
"label": "Open Link",
"url": "https://dialect.to"
}
]
},
"recipient": {
"type": "subscriber",
"walletAddress": "6CxnSjtasq5Tzwb4b93AhLofXtiDvMpQ2vTkWdSZqTH7"
},
"topicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data": {
"type": "transaction",
"transactionId": "123",
"amount": "100"
},
"push": {}
}
headers = {
"x-dialect-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-dialect-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
channels: [],
message: {
title: 'Alert Title',
body: JSON.stringify('Alert body'),
image: 'https://dialect-file-storage.s3.us-west-2.amazonaws.com/avatars/dialect-logo.png',
actions: [{type: 'link', label: 'Open Link', url: 'https://dialect.to'}]
},
recipient: {
type: 'subscriber',
walletAddress: '6CxnSjtasq5Tzwb4b93AhLofXtiDvMpQ2vTkWdSZqTH7'
},
topicId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
data: {type: 'transaction', transactionId: '123', amount: '100'},
push: {}
})
};
fetch('https://alerts-api.dial.to/v2/{appId}/send', 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/{appId}/send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'channels' => [
],
'message' => [
'title' => 'Alert Title',
'body' => 'Alert body',
'image' => 'https://dialect-file-storage.s3.us-west-2.amazonaws.com/avatars/dialect-logo.png',
'actions' => [
[
'type' => 'link',
'label' => 'Open Link',
'url' => 'https://dialect.to'
]
]
],
'recipient' => [
'type' => 'subscriber',
'walletAddress' => '6CxnSjtasq5Tzwb4b93AhLofXtiDvMpQ2vTkWdSZqTH7'
],
'topicId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'data' => [
'type' => 'transaction',
'transactionId' => '123',
'amount' => '100'
],
'push' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-dialect-api-key: <api-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://alerts-api.dial.to/v2/{appId}/send"
payload := strings.NewReader("{\n \"channels\": [],\n \"message\": {\n \"title\": \"Alert Title\",\n \"body\": \"Alert body\",\n \"image\": \"https://dialect-file-storage.s3.us-west-2.amazonaws.com/avatars/dialect-logo.png\",\n \"actions\": [\n {\n \"type\": \"link\",\n \"label\": \"Open Link\",\n \"url\": \"https://dialect.to\"\n }\n ]\n },\n \"recipient\": {\n \"type\": \"subscriber\",\n \"walletAddress\": \"6CxnSjtasq5Tzwb4b93AhLofXtiDvMpQ2vTkWdSZqTH7\"\n },\n \"topicId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"data\": {\n \"type\": \"transaction\",\n \"transactionId\": \"123\",\n \"amount\": \"100\"\n },\n \"push\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-dialect-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://alerts-api.dial.to/v2/{appId}/send")
.header("x-dialect-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"channels\": [],\n \"message\": {\n \"title\": \"Alert Title\",\n \"body\": \"Alert body\",\n \"image\": \"https://dialect-file-storage.s3.us-west-2.amazonaws.com/avatars/dialect-logo.png\",\n \"actions\": [\n {\n \"type\": \"link\",\n \"label\": \"Open Link\",\n \"url\": \"https://dialect.to\"\n }\n ]\n },\n \"recipient\": {\n \"type\": \"subscriber\",\n \"walletAddress\": \"6CxnSjtasq5Tzwb4b93AhLofXtiDvMpQ2vTkWdSZqTH7\"\n },\n \"topicId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"data\": {\n \"type\": \"transaction\",\n \"transactionId\": \"123\",\n \"amount\": \"100\"\n },\n \"push\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://alerts-api.dial.to/v2/{appId}/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-dialect-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"channels\": [],\n \"message\": {\n \"title\": \"Alert Title\",\n \"body\": \"Alert body\",\n \"image\": \"https://dialect-file-storage.s3.us-west-2.amazonaws.com/avatars/dialect-logo.png\",\n \"actions\": [\n {\n \"type\": \"link\",\n \"label\": \"Open Link\",\n \"url\": \"https://dialect.to\"\n }\n ]\n },\n \"recipient\": {\n \"type\": \"subscriber\",\n \"walletAddress\": \"6CxnSjtasq5Tzwb4b93AhLofXtiDvMpQ2vTkWdSZqTH7\"\n },\n \"topicId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"data\": {\n \"type\": \"transaction\",\n \"transactionId\": \"123\",\n \"amount\": \"100\"\n },\n \"push\": {}\n}"
response = http.request(request)
puts response.read_body{}{
"error": {}
}Authorizations
API key to authorize app-level requests
Path Parameters
Application ID
"255d6163-7e25-43e9-a188-c2f8d0980a4a"
Body
1PUSH, IN_APP, EMAIL, TELEGRAM Show child attributes
Show child attributes
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
{
"type": "subscriber",
"walletAddress": "6CxnSjtasq5Tzwb4b93AhLofXtiDvMpQ2vTkWdSZqTH7"
}
Optional topic ID to categorize the alert. Must be created in advance and belong to the authenticated app. If absent, the alert is uncategorized. If invalid or unauthorized, the request will fail.
Additional data to be sent with the alert. For push notifications, this data will be available in the notification payload and can be used by the app to handle the notification. Common use cases include deep linking, custom actions, or passing context to the app.
Show child attributes
Show child attributes
{
"type": "transaction",
"transactionId": "123",
"amount": "100"
}
Push notification specific configuration.
Show child attributes
Show child attributes
Response
Message sent successfully
The response is of type object.
Was this page helpful?