import { WhopClient } from "@whop/sdk";
const client = new WhopClient({ token: "YOUR_TOKEN", apiVersionDate: "2026-08-21-1", idempotencyKey: "YOUR_IDEMPOTENCY_KEY" });
await client.users.preferences.notifications.set({
preferences: [{
scope: {}
}]
});curl --request PATCH \
--url https://api.whop.com/api/v1/users/me/preferences/notifications \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"preferences": [
{
"level": "nothing",
"scope": {
"account_id": "biz_xxxxxxxxxxxxxx",
"channel": "in_app",
"experience_id": "exp_xxxxxxxxxxxxxx",
"team_account_id": "biz_xxxxxxxxxxxxxx",
"topic_id": "topic_xxxxxxxxxxxxxx"
}
}
]
}
'import requests
url = "https://api.whop.com/api/v1/users/me/preferences/notifications"
payload = { "preferences": [
{
"level": "nothing",
"scope": {
"account_id": "biz_xxxxxxxxxxxxxx",
"channel": "in_app",
"experience_id": "exp_xxxxxxxxxxxxxx",
"team_account_id": "biz_xxxxxxxxxxxxxx",
"topic_id": "topic_xxxxxxxxxxxxxx"
}
}
] }
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({
preferences: [
{
level: 'nothing',
scope: {
account_id: 'biz_xxxxxxxxxxxxxx',
channel: 'in_app',
experience_id: 'exp_xxxxxxxxxxxxxx',
team_account_id: 'biz_xxxxxxxxxxxxxx',
topic_id: 'topic_xxxxxxxxxxxxxx'
}
}
]
})
};
fetch('https://api.whop.com/api/v1/users/me/preferences/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://api.whop.com/api/v1/users/me/preferences/notifications",
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([
'preferences' => [
[
'level' => 'nothing',
'scope' => [
'account_id' => 'biz_xxxxxxxxxxxxxx',
'channel' => 'in_app',
'experience_id' => 'exp_xxxxxxxxxxxxxx',
'team_account_id' => 'biz_xxxxxxxxxxxxxx',
'topic_id' => 'topic_xxxxxxxxxxxxxx'
]
]
]
]),
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://api.whop.com/api/v1/users/me/preferences/notifications"
payload := strings.NewReader("{\n \"preferences\": [\n {\n \"level\": \"nothing\",\n \"scope\": {\n \"account_id\": \"biz_xxxxxxxxxxxxxx\",\n \"channel\": \"in_app\",\n \"experience_id\": \"exp_xxxxxxxxxxxxxx\",\n \"team_account_id\": \"biz_xxxxxxxxxxxxxx\",\n \"topic_id\": \"topic_xxxxxxxxxxxxxx\"\n }\n }\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://api.whop.com/api/v1/users/me/preferences/notifications")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"preferences\": [\n {\n \"level\": \"nothing\",\n \"scope\": {\n \"account_id\": \"biz_xxxxxxxxxxxxxx\",\n \"channel\": \"in_app\",\n \"experience_id\": \"exp_xxxxxxxxxxxxxx\",\n \"team_account_id\": \"biz_xxxxxxxxxxxxxx\",\n \"topic_id\": \"topic_xxxxxxxxxxxxxx\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.whop.com/api/v1/users/me/preferences/notifications")
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 \"preferences\": [\n {\n \"level\": \"nothing\",\n \"scope\": {\n \"account_id\": \"biz_xxxxxxxxxxxxxx\",\n \"channel\": \"in_app\",\n \"experience_id\": \"exp_xxxxxxxxxxxxxx\",\n \"team_account_id\": \"biz_xxxxxxxxxxxxxx\",\n \"topic_id\": \"topic_xxxxxxxxxxxxxx\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"level": "nothing",
"object": "notification_preference",
"scope": {
"account_id": "biz_xxxxxxxxxxxxxx",
"channel": "in_app",
"experience_id": "exp_xxxxxxxxxxxxxx",
"team_account_id": "biz_xxxxxxxxxxxxxx",
"topic_id": "topic_xxxxxxxxxxxxxx"
}
}
]
}{
"error": {
"message": "account_id is required",
"type": "bad_request",
"code": "<string>"
}
}{
"error": {
"message": "account_id is required",
"type": "bad_request",
"code": "<string>"
}
}Set
Sets the authenticated user’s notification preferences, each addressed by scope rather than by ID. The batch is applied in one transaction: if any entry is rejected, none are written. Experience levels are applied before topic overrides, because setting a level replaces every topic preference for that experience, so an override sent alongside a level wins. The response reports what each scope now resolves to, in the order the entries were sent.
import { WhopClient } from "@whop/sdk";
const client = new WhopClient({ token: "YOUR_TOKEN", apiVersionDate: "2026-08-21-1", idempotencyKey: "YOUR_IDEMPOTENCY_KEY" });
await client.users.preferences.notifications.set({
preferences: [{
scope: {}
}]
});curl --request PATCH \
--url https://api.whop.com/api/v1/users/me/preferences/notifications \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"preferences": [
{
"level": "nothing",
"scope": {
"account_id": "biz_xxxxxxxxxxxxxx",
"channel": "in_app",
"experience_id": "exp_xxxxxxxxxxxxxx",
"team_account_id": "biz_xxxxxxxxxxxxxx",
"topic_id": "topic_xxxxxxxxxxxxxx"
}
}
]
}
'import requests
url = "https://api.whop.com/api/v1/users/me/preferences/notifications"
payload = { "preferences": [
{
"level": "nothing",
"scope": {
"account_id": "biz_xxxxxxxxxxxxxx",
"channel": "in_app",
"experience_id": "exp_xxxxxxxxxxxxxx",
"team_account_id": "biz_xxxxxxxxxxxxxx",
"topic_id": "topic_xxxxxxxxxxxxxx"
}
}
] }
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({
preferences: [
{
level: 'nothing',
scope: {
account_id: 'biz_xxxxxxxxxxxxxx',
channel: 'in_app',
experience_id: 'exp_xxxxxxxxxxxxxx',
team_account_id: 'biz_xxxxxxxxxxxxxx',
topic_id: 'topic_xxxxxxxxxxxxxx'
}
}
]
})
};
fetch('https://api.whop.com/api/v1/users/me/preferences/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://api.whop.com/api/v1/users/me/preferences/notifications",
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([
'preferences' => [
[
'level' => 'nothing',
'scope' => [
'account_id' => 'biz_xxxxxxxxxxxxxx',
'channel' => 'in_app',
'experience_id' => 'exp_xxxxxxxxxxxxxx',
'team_account_id' => 'biz_xxxxxxxxxxxxxx',
'topic_id' => 'topic_xxxxxxxxxxxxxx'
]
]
]
]),
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://api.whop.com/api/v1/users/me/preferences/notifications"
payload := strings.NewReader("{\n \"preferences\": [\n {\n \"level\": \"nothing\",\n \"scope\": {\n \"account_id\": \"biz_xxxxxxxxxxxxxx\",\n \"channel\": \"in_app\",\n \"experience_id\": \"exp_xxxxxxxxxxxxxx\",\n \"team_account_id\": \"biz_xxxxxxxxxxxxxx\",\n \"topic_id\": \"topic_xxxxxxxxxxxxxx\"\n }\n }\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://api.whop.com/api/v1/users/me/preferences/notifications")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"preferences\": [\n {\n \"level\": \"nothing\",\n \"scope\": {\n \"account_id\": \"biz_xxxxxxxxxxxxxx\",\n \"channel\": \"in_app\",\n \"experience_id\": \"exp_xxxxxxxxxxxxxx\",\n \"team_account_id\": \"biz_xxxxxxxxxxxxxx\",\n \"topic_id\": \"topic_xxxxxxxxxxxxxx\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.whop.com/api/v1/users/me/preferences/notifications")
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 \"preferences\": [\n {\n \"level\": \"nothing\",\n \"scope\": {\n \"account_id\": \"biz_xxxxxxxxxxxxxx\",\n \"channel\": \"in_app\",\n \"experience_id\": \"exp_xxxxxxxxxxxxxx\",\n \"team_account_id\": \"biz_xxxxxxxxxxxxxx\",\n \"topic_id\": \"topic_xxxxxxxxxxxxxx\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"level": "nothing",
"object": "notification_preference",
"scope": {
"account_id": "biz_xxxxxxxxxxxxxx",
"channel": "in_app",
"experience_id": "exp_xxxxxxxxxxxxxx",
"team_account_id": "biz_xxxxxxxxxxxxxx",
"topic_id": "topic_xxxxxxxxxxxxxx"
}
}
]
}{
"error": {
"message": "account_id is required",
"type": "bad_request",
"code": "<string>"
}
}{
"error": {
"message": "account_id is required",
"type": "bad_request",
"code": "<string>"
}
}Authorizations
A user OAuth token. Prepend the key or token with Bearer, for example Bearer ***************************. See Auth & API keys for how to get each one.
Headers
Pins the request to a dated API version.
"2026-10-15-1"
Body
The preferences to set, at most 100 per request.
1 - 100 elementsShow child attributes
Show child attributes
Response
preferences set
Show child attributes
Show child attributes

