Notifly
API ReferenceSubscribers

Retrieve subscriber preferences

Retrieve subscriber channel preferences by its unique key identifier **subscriberId**. This API returns all five channels preferences for all workflows and global preferences.

GET
/v2/subscribers/{subscriberId}/preferences

Retrieve subscriber channel preferences by its unique key identifier subscriberId. This API returns all five channels preferences for all workflows and global preferences.

Authorization

secretKey
Authorization<token>

API key authentication. Allowed headers-- "Authorization: ApiKey <secret_key>".

In: header

Path Parameters

subscriberId*string

The identifier of the subscriber

Query Parameters

criticality?string
Default"nonCritical"

Value in

  • "critical"
  • "nonCritical"
  • "all"
contextKeys?array<string>

Context keys for filtering preferences (e.g., ["tenant:acme"])

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v2/subscribers/string/preferences?contextKeys=tenant%3Aacme"
{  "data": {    "global": {      "enabled": true,      "channels": {        "email": true,        "sms": false,        "in_app": true,        "chat": false,        "push": true      },      "schedule": {        "isEnabled": true,        "weeklySchedule": {          "monday": {            "isEnabled": true,            "hours": [              {                "start": "09:00 AM",                "end": "05:00 PM"              }            ]          },          "tuesday": {            "isEnabled": true,            "hours": [              {                "start": "09:00 AM",                "end": "05:00 PM"              }            ]          },          "wednesday": {            "isEnabled": true,            "hours": [              {                "start": "09:00 AM",                "end": "05:00 PM"              }            ]          },          "thursday": {            "isEnabled": true,            "hours": [              {                "start": "09:00 AM",                "end": "05:00 PM"              }            ]          },          "friday": {            "isEnabled": true,            "hours": [              {                "start": "09:00 AM",                "end": "05:00 PM"              }            ]          },          "saturday": {            "isEnabled": true,            "hours": [              {                "start": "09:00 AM",                "end": "05:00 PM"              }            ]          },          "sunday": {            "isEnabled": true,            "hours": [              {                "start": "09:00 AM",                "end": "05:00 PM"              }            ]          }        }      }    },    "workflows": [      {        "enabled": true,        "channels": {          "email": true,          "sms": false,          "in_app": true,          "chat": false,          "push": true        },        "overrides": [          {            "channel": "in_app",            "source": "subscriber"          }        ],        "workflow": {          "slug": "string",          "identifier": "string",          "name": "string",          "updatedAt": "string"        },        "updatedAt": "string"      }    ]  }}