POST
/
auth
/
user
/
{id}
/
notification-preferences
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
      }
    }
  }
}

Authorizations

Authorization
string
header
required

Access token

Path Parameters

id
string
required

user id

Body

application/json

Response

200 - application/json
OK

The response is of type object.