curl --request PATCH \
--url https://radiotools.rivi.software/api/v1/stations/{stationSlug}/push/devices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"token": "fictional-fcm-device-token",
"topics": {
"alerts": false,
"content": true
}
}
'import requests
url = "https://radiotools.rivi.software/api/v1/stations/{stationSlug}/push/devices"
payload = {
"token": "fictional-fcm-device-token",
"topics": {
"alerts": False,
"content": True
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({token: 'fictional-fcm-device-token', topics: {alerts: false, content: true}})
};
fetch('https://radiotools.rivi.software/api/v1/stations/{stationSlug}/push/devices', 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://radiotools.rivi.software/api/v1/stations/{stationSlug}/push/devices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'token' => 'fictional-fcm-device-token',
'topics' => [
'alerts' => false,
'content' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://radiotools.rivi.software/api/v1/stations/{stationSlug}/push/devices"
payload := strings.NewReader("{\n \"token\": \"fictional-fcm-device-token\",\n \"topics\": {\n \"alerts\": false,\n \"content\": true\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://radiotools.rivi.software/api/v1/stations/{stationSlug}/push/devices")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"fictional-fcm-device-token\",\n \"topics\": {\n \"alerts\": false,\n \"content\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://radiotools.rivi.software/api/v1/stations/{stationSlug}/push/devices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"token\": \"fictional-fcm-device-token\",\n \"topics\": {\n \"alerts\": false,\n \"content\": true\n }\n}"
response = http.request(request)
puts response.read_bodyUpdate push topics
Turn alerts and content delivery on or off for a registered device. Unspecified topics keep their current setting. Turning a topic off retains the device token. Requires the same public station gate and push:register tenant credential as registration.
curl --request PATCH \
--url https://radiotools.rivi.software/api/v1/stations/{stationSlug}/push/devices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"token": "fictional-fcm-device-token",
"topics": {
"alerts": false,
"content": true
}
}
'import requests
url = "https://radiotools.rivi.software/api/v1/stations/{stationSlug}/push/devices"
payload = {
"token": "fictional-fcm-device-token",
"topics": {
"alerts": False,
"content": True
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({token: 'fictional-fcm-device-token', topics: {alerts: false, content: true}})
};
fetch('https://radiotools.rivi.software/api/v1/stations/{stationSlug}/push/devices', 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://radiotools.rivi.software/api/v1/stations/{stationSlug}/push/devices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'token' => 'fictional-fcm-device-token',
'topics' => [
'alerts' => false,
'content' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://radiotools.rivi.software/api/v1/stations/{stationSlug}/push/devices"
payload := strings.NewReader("{\n \"token\": \"fictional-fcm-device-token\",\n \"topics\": {\n \"alerts\": false,\n \"content\": true\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://radiotools.rivi.software/api/v1/stations/{stationSlug}/push/devices")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"fictional-fcm-device-token\",\n \"topics\": {\n \"alerts\": false,\n \"content\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://radiotools.rivi.software/api/v1/stations/{stationSlug}/push/devices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"token\": \"fictional-fcm-device-token\",\n \"topics\": {\n \"alerts\": false,\n \"content\": true\n }\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Station-scoped listener credential. Send Authorization: Bearer <token>, for example Bearer rtm_…. Sending the rtm_ token alone without Bearer returns 401 UNAUTHENTICATED. In the interactive playground, enter only the raw rtm_ token; the playground adds the prefix. Listener REST and GraphQL: listener:read. Listener devices: push:register.
Path Parameters
Public station slug from the station settings; distinct from the internal station ID.
3 - 63Body
Push provider device token. This is not an API credential; never use a real device token in shared examples.
1 - 4096"fictional-fcm-device-token"
Topic preferences to update. Omitted topics retain their existing setting.
Show child attributes
Show child attributes
{ "alerts": false, "content": true }
Response
Topic preferences updated; omitted topics are unchanged This imported contract does not specify a response body; treat the HTTP status as the documented result.
Was this page helpful?