Update subscriber preferences
Update subscriber preferences by its unique key identifier **subscriberId**. **workflowId** is optional field, if provided, this API will update that workflow preference, otherwise it will update global preferences
Update subscriber preferences by its unique key identifier subscriberId. workflowId is optional field, if provided, this API will update that workflow preference, otherwise it will update global preferences
Authorization
secretKey API key authentication. Allowed headers-- "Authorization: ApiKey <secret_key>".
In: header
Path Parameters
The identifier of the subscriber
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
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 PATCH "https://example.com/v2/subscribers/string/preferences" \ -H "Content-Type: application/json" \ -d '{}'{ "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" } ] }}Retrieve subscriber preferences GET
Retrieve subscriber channel preferences by its unique key identifier **subscriberId**. This API returns all five channels preferences for all workflows and global preferences.
Bulk update subscriber preferences PATCH
Bulk update subscriber preferences by its unique key identifier **subscriberId**. This API allows updating multiple workflow preferences in a single request.