API
Log in
Documentation › Contacts › Bulk create contacts
POST

Bulk create contacts

POSThttps://app.sendapp.ai/api/contacts/bulk
Import up to 10,000 contacts in a single call. Duplicates (by phone or email) are automatically merged with existing contacts.
If the plan's contact limit is reached during import, the response has HTTP code 207 (partial) and reports how many contacts were actually imported.
Parameters
apikey required
La tua API Key (anche header X-API-Key).
contacts required
Array of contact objects — max 10,000 per call. Each object accepts name, phone, email, tags, metadata.
Request
curl -X POST 'https://app.sendapp.ai/api/contacts/bulk' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "contacts": [
      { "name": "Alice", "phone": "+39111111111", "tags": ["newsletter"] },
      { "name": "Bob", "email": "bob@example.com" }
    ]
  }'
<?php
$ch = curl_init('https://app.sendapp.ai/api/contacts/bulk');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => ['X-API-Key: YOUR_API_KEY', 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => json_encode([
        'contacts' => [
            ['name' => 'Alice', 'phone' => '+39111111111', 'tags' => ['newsletter']],
            ['name' => 'Bob', 'email' => 'bob@example.com'],
        ],
    ]),
]);
echo curl_exec($ch);
curl_close($ch);
const res = await fetch('https://app.sendapp.ai/api/contacts/bulk', {
  method: 'POST',
  headers: { 'X-API-Key': 'YOUR_API_KEY', 'Content-Type': 'application/json' },
  body: JSON.stringify({
    contacts: [
      { name: 'Alice', phone: '+39111111111', tags: ['newsletter'] },
      { name: 'Bob', email: 'bob@example.com' }
    ]
  })
});
console.log(await res.json());
Response (200 OK)
{
  "status": "success",
  "results": {
    "total": 3,
    "imported": 2,
    "updated": 1,
    "unchanged": 0,
    "errors": [],
    "discarded": [],
    "limit_exceeded": false,
    "custom_fields_created": 0
  },
  "limit_info": {
    "exceeded": false,
    "current": 130,
    "max": 5000,
    "unlimited": false
  }
}
Error
{
  "status": "error",
  "message": "Error importing contacts."
}