# Contacts bulk recipients compile

`POST /crm/bulk/recipients` · Rivier · contacts

Compile a multi-select of segments, lists, tags and individual contacts, less exclusions, into one audience rule and count it live: matched, able to receive, and without consent.

- Scope: contacts:read
- Graphql: Query.contactsBulkRecipientsCompile
- Sdk: contacts.bulkRecipients.compile
- Cli: contacts bulk recipients compile

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "segmentIds": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid"
      },
      "maxItems": 20
    },
    "lists": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 60
      },
      "maxItems": 20
    },
    "contactIds": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid"
      },
      "maxItems": 200
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 40
      },
      "maxItems": 20
    },
    "excludeSegmentIds": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid"
      },
      "maxItems": 10
    },
    "channel": {
      "type": "string",
      "enum": [
        "email",
        "sms",
        "whatsapp"
      ],
      "default": "email"
    }
  },
  "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/crm/bulk/recipients' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "segmentIds": [
    "string"
  ],
  "lists": [
    "string"
  ],
  "contactIds": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "excludeSegmentIds": [
    "string"
  ],
  "channel": "email"
}'
```
