# Add contacts in bulk (/docs/api-reference/bulk-calls/addBulkCallContacts)

> Add up to 1000 contacts to a campaign in one request.

**POST** `/calls/bulk_call/{campaign_id}/add_contacts`

Add up to 1000 contacts to a campaign in one request.

This is the batch form of Add contact to dynamic campaign. Prefer it
whenever you have more than a handful: one request of 500 contacts is
far cheaper than 500 requests, on your side and ours.

Repeated numbers are kept, not merged. If the same number appears twice
with different variables, it is called twice, because two rows for one
number usually means two real reasons to call.

Rows that fail validation are reported in `rejected` and the rest are
still added, so a single bad number does not lose the batch. If the
campaign has `call_conditions`, rows that do not match are added with
status `Skipped`.

```yaml
operationId: addBulkCallContacts
parameters:
  - in: path
    name: campaign_id
    required: true
    schema:
      type: integer
    description: Id of the bulk call campaign.
requestBody:
  required: true
  content:
    application/json:
      schema:
        type: object
        required:
          - contacts
        properties:
          contacts:
            type: array
            maxItems: 1000
            description: |
              Each row needs `to_number`. Note this differs from the
              `contact_list` on Create bulk call, which uses
              `phone_number` and takes loose keys: here the variables go
              in an explicit `custom_variables` object.
            items:
              type: object
              required:
                - to_number
              properties:
                to_number:
                  type: string
                  description: Number to call, in international format.
                  example: '+15551234567'
                custom_variables:
                  type: object
                  description: |
                    Passed to the agent as context for this call, so it
                    can use them in the conversation.
                  additionalProperties: true
                  example:
                    contact_name: Ravi
                metadata:
                  type: object
                  description: |
                    Stored with the contact and returned on its row in
                    Bulk call results. Not shown to the agent.
                  additionalProperties: true
responses:
  '200':
    description: |
      What was added and what was not. `added` and `rejected` together
      account for every row you sent.
    content:
      application/json:
        schema:
          type: object
          properties:
            status:
              type: string
            added:
              type: array
              items:
                type: object
                properties:
                  line_id:
                    type: integer
                  to_number:
                    type: string
            rejected:
              type: array
              description: |
                One entry per row that was not added. `index` is the
                row's position in the array you sent.
              items:
                type: object
                properties:
                  index:
                    type: integer
                  reason:
                    type: string
            added_count:
              type: integer
            rejected_count:
              type: integer
            message:
              type: string
            campaign_id:
              type: integer
            campaign_status:
              type: string
        example:
          status: success
          message: 1 of 2 contacts added
          campaign_id: 314
          campaign_status: in_progress
          added:
            - line_id: 8801
              to_number: '+15551234567'
          added_count: 1
          rejected:
            - index: 1
              reason: to_number is not a valid phone number
          rejected_count: 1
```

**cURL**

```bash
curl -X POST "https://backend.omnidim.io/api/v1/calls/bulk_call/314/add_contacts" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contacts": [
      {"to_number": "+15551234567", "custom_variables": {"contact_name": "Ravi"}},
      {"to_number": "+15559876543", "custom_variables": {"contact_name": "Priya"}}
    ]
  }'
```

**curl**

```bash
curl -X POST "https://omnidim.io/api/v1/calls/bulk_call/{campaign_id}/add_contacts" \
  -H "Authorization: Bearer $OMNIDIM_API_KEY"
```