# Set a person's notification choices

`PUT /notify/preferences/{userRef}` · Rivier · campaigns

Set a person's notification choices.

- Scope: campaigns:write
- Mcp: rivier_notify_preferences_put
- Graphql: Mutation.campaignsNotifyPrefsPut
- Sdk: campaigns.notifyPrefs.put
- Cli: campaigns notify prefs put

## Parameters

- `userRef` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "channels": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "push",
          "email",
          "sms",
          "whatsapp"
        ]
      },
      "maxItems": 4,
      "default": [
        "push",
        "email"
      ]
    },
    "email": {
      "anyOf": [
        {
          "type": "string",
          "format": "email",
          "maxLength": 320
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "phone": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^\\+\\d{6,15}$"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "language": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[a-z]{2,3}(-[A-Za-z0-9]{2,8})?$"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "muted": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[a-z][a-z0-9_.-]{0,39}$"
      },
      "maxItems": 50,
      "default": []
    },
    "feed": {
      "type": "boolean",
      "default": true
    }
  },
  "additionalProperties": false
}
```

## Responses

- `200`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X PUT 'https://api.rivier.ai/notify/preferences/{userRef}' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "channels": [
    "push",
    "email"
  ],
  "email": null,
  "phone": null,
  "language": null,
  "muted": [],
  "feed": true
}'
```
