# Record that a person does not want messages

`POST /phone/opt-out` · Rivier · voice

Record that a person does not want messages. They stay off the list until they opt back in.

- Scope: voice:write
- Mcp: rivier_phone_opt_out
- Graphql: Mutation.voicePhoneContactOptOut
- Sdk: voice.phoneContact.optOut
- Cli: voice phone contact opt out

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "peer": {
      "type": "string",
      "pattern": "^\\+\\d{6,15}$"
    },
    "channel": {
      "type": "string",
      "enum": [
        "sms",
        "mms",
        "whatsapp"
      ],
      "default": "sms"
    }
  },
  "required": [
    "peer"
  ],
  "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/phone/opt-out' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "peer": "string"
}'
```
