SDK
Explore our fully type-safe SDK for Node.js
Create user notification preferences API allows clients to create a userβs notification preferences based on their unique user identifier (user_id).
curl --request POST \ --url https://staging.api.commercengine.io/api/v1/{store_id}/storefront/auth/user/{id}/notification-preferences \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "notification_preferences": { "transactional": { "email": true, "sms": true, "whatsapp": true }, "promotional": { "email": true, "sms": true, "whatsapp": true }, "newsletter": { "email": true, "sms": true, "whatsapp": true } } }'
{ "message": "<string>", "success": true, "content": { "notification_preferences": { "transactional": { "email": true, "sms": true, "whatsapp": true }, "promotional": { "email": true, "sms": true, "whatsapp": true }, "newsletter": { "email": true, "sms": true, "whatsapp": true } } } }
Access token
user id
OK
The response is of type object.
object