# Import up to 1000 contacts in the background (/api/bulkImportContacts)

Answers `202` with a `job`, not with contacts: nothing has been created
yet when the call returns. Poll `GET /jobs/{id}` to watch it finish and
to read the per-row errors.

Each row is matched the way `POST /contacts` matches, with one
`on_existing` for the whole call, so sending the same rows twice
creates nothing the second time. The finished job reports `counts`.

Endpoint: POST /api/v1/contacts/bulk
Full URL: https://app.sendkuy.com/api/v1/contacts/bulk
- header parameter Idempotency-Key (optional): string — Any unique string, one per logical request. Retrying with the same key returns the first answer instead of doing the work twice, and answers with `Idempotent…
Request body (JSON, required); required fields: contacts
Example "Two rows": {"contacts":[{"first_name":"Citra","whatsapp":"+6281234567892"},{"first_name":"Dewi","email":"dewi@example.com"}]}
Success status: 202

cURL:

```bash
curl -X POST https://app.sendkuy.com/api/v1/contacts/bulk \
  -H "Authorization: Bearer sk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "contacts": [
    {
      "first_name": "Citra",
      "whatsapp": "+6281234567892"
    },
    {
      "first_name": "Dewi",
      "email": "dewi@example.com"
    }
  ]
}'
```

Node.js:

```ts
import { SendKuy } from 'sendkuy';

const sendkuy = new SendKuy('sk_live_YOUR_API_KEY');

const result = await sendkuy.contacts.bulkImport({
  contacts: [
    {
      first_name: 'Citra',
      whatsapp: '+6281234567892',
    },
    {
      first_name: 'Dewi',
      email: 'dewi@example.com',
    },
  ],
});
```

PHP:

```php
<?php

use SendKuy\SendKuy;

$sendkuy = new SendKuy('sk_live_YOUR_API_KEY');

$result = $sendkuy->contacts()->bulkImport([
    'contacts' => [
        [
            'first_name' => 'Citra',
            'whatsapp' => '+6281234567892',
        ],
        [
            'first_name' => 'Dewi',
            'email' => 'dewi@example.com',
        ],
    ],
]);
```

Python:

```python
import requests

response = requests.request(
    "POST",
    "https://app.sendkuy.com/api/v1/contacts/bulk",
    headers={"Authorization": "Bearer sk_live_YOUR_API_KEY"},
    json={
        "contacts": [
            {
                "first_name": "Citra",
                "whatsapp": "+6281234567892"
            },
            {
                "first_name": "Dewi",
                "email": "dewi@example.com"
            }
        ]
    },
)

data = response.json()["data"]
```