Notifications
Per-event notification preferences across email, in-app, and SMS channels.
Get notification preferences
POST
https://api.gobtcpay.com/public/api/v1.2/merchant/notifications/getReturns the per-event notification preferences, each with email, inApp, and sms toggles.
Authorization: merchantAuth
Responses
idstringrequiredExample:
3fa85f64-5717-4562-b3fc-2c963f66afa6resultobjectrequiredPOST /merchant/notifications/get
cURL
curl -X POST "$BASE_URL/merchant/notifications/get" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN"200 Successful response
JSON
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"result": {
"$case": "success",
"success": {
"preferences": [
{
"event": "string",
"email": true,
"inApp": true,
"sms": true
}
]
}
}
}Update notification preferences
POST
https://api.gobtcpay.com/public/api/v1.2/merchant/notifications/updateSaves the per-event notification preferences. Returns the stored set.
Authorization: merchantAuth
Body required
application/jsonpreferencesobject[]requiredResponses
idstringrequiredExample:
3fa85f64-5717-4562-b3fc-2c963f66afa6resultobjectrequiredPOST /merchant/notifications/update
cURL
curl -X POST "$BASE_URL/merchant/notifications/update" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{
"preferences": [
{
"event": "string",
"email": true,
"inApp": true,
"sms": true
}
]
}'200 Successful response
JSON
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"result": {
"$case": "success",
"success": {
"preferences": [
{
"event": "string",
"email": true,
"inApp": true,
"sms": true
}
]
}
}
}