Skip to main content

POST /contact-books/:id/contacts/bulk

Add multiple contacts to a contact book at once. Accepts an array of up to 1000 contacts.

Authentication

JWT Bearer token (dashboard auth)

Request Body

Array of contact objects:
FieldTypeRequiredDescription
emailstringYesContact email address
firstNamestringNoContact first name
lastNamestringNoContact last name
subscribedbooleanNoSubscription status (defaults to true)
propertiesobjectNoCustom key-value metadata

Response

{
  "success": true,
  "data": {
    "message": "Contacts added",
    "count": 3
  }
}

Example

curl -X POST https://app.usesendi.com/api/contact-books/BOOK_ID/contacts/bulk \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "email": "alice@example.com",
      "firstName": "Alice",
      "lastName": "Johnson"
    },
    {
      "email": "bob@example.com",
      "firstName": "Bob",
      "properties": { "source": "import" }
    },
    {
      "email": "carol@example.com",
      "subscribed": false
    }
  ]'

Errors

StatusErrorCause
400Invalid request dataArray is empty, exceeds 1000, or contains invalid entries
403Contact limit reachedFree plan allows a maximum of 200 total contacts
404Contact book not foundInvalid book ID or not owned by user