# Tell a person something

`POST /notify/send` · Rivier · campaigns

Tell a person something: it goes in their feed, then each channel in their order (push, email, text, WhatsApp) is tried until one carries it, falling back when one fails. A template set chooses the words in their language. The same idempotency key sends once.

- Scope: campaigns:write
- Mcp: rivier_notify_send
- Graphql: Mutation.campaignsNotifySend
- Sdk: campaigns.notify.send
- Cli: campaigns notify send
- Events: campaigns.notification.sent, campaigns.notification.failed

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "userRef": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "Your own id for the person; Rivier keeps it as given and never shows it to anyone else"
    },
    "category": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9_.-]{0,39}$",
      "default": "general"
    },
    "template": {
      "type": "string",
      "pattern": "^[a-z0-9][a-z0-9_.-]{0,59}$"
    },
    "language": {
      "type": "string",
      "pattern": "^[a-z]{2,3}(-[A-Za-z0-9]{2,8})?$"
    },
    "data": {
      "type": "object",
      "additionalProperties": {},
      "default": {}
    },
    "content": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "body": {
          "type": "string",
          "maxLength": 1000,
          "default": ""
        },
        "url": {
          "type": "string",
          "format": "uri",
          "maxLength": 1000
        },
        "icon": {
          "type": "string",
          "format": "uri",
          "maxLength": 1000
        }
      },
      "required": [
        "title"
      ],
      "additionalProperties": false,
      "description": "The words, when no template is named"
    },
    "channels": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "push",
          "email",
          "sms",
          "whatsapp"
        ]
      },
      "maxItems": 4,
      "description": "Try these channels in this order instead of the person's"
    },
    "all": {
      "type": "boolean",
      "default": false,
      "description": "Send on every channel in the order instead of stopping at the first that carries it"
    },
    "idempotencyKey": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    }
  },
  "required": [
    "userRef"
  ],
  "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 POST 'https://api.rivier.ai/notify/send' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "userRef": "string"
}'
```
