/contacts/importsImport contacts
Adds up to 100,000 contacts in one request (at most 20 MB). Every number is checked and merged with your existing contacts, then added to groupIds. The work runs in the background: poll the import at Location until status is DONE or FAILED. Send a larger list as several imports.
The contacts are checked exactly as a file imported in the portal is. A request that is not shaped as below is refused whole (400) and nothing is imported; what each value holds is checked per contact once the import runs:
- by default a contact with any invalid field is rejected;
- with
keepContactsWithInvalidDetails: trueit is imported with its invalid fields left empty, and only a contact whose number cannot be used is rejected.
Rejected contacts are counted in counts.rejected and listed, with their reasons, at /contacts/imports/{importId}/rejected. A number that passes the check but turns out not to be a real one is saved with numberStatus: INVALID. A number without a country prefix takes defaultCountry. A number on your blocklist stays blocked.
Every contact carries the same fields: a number you already have takes each field the import sends (null or "" clears it), so leave a field out of every contact to keep it as it is.
At most 5 imports or uploads of a brand wait at a time (portal uploads included); another is 429 IMPORT_QUEUE_FULL. Scope portal:write.
Headers
Idempotency-Keystring· min 1 chars· max 255 chars· pattern ^[\x21-\x7E]+$Any value of yours, such as a UUID; send one with every import, so a retry never imports twice. A repeat within 24 hours with the same body, byte for byte, answers
200with the import the first request created and imports nothing;409while the first request is still being accepted;422 IDEMPOTENCY_KEY_REUSEDwhen the body differs.Example:
"crm-sync-2026-11-22-0001"
Request body
application/jsondefaultCountrystringrequired· pattern ^[A-Za-z]{2}$ISO 3166-1 alpha-2, for numbers without a country prefix.
Example:
"GB"groupIdsarray of string· max 100 itemsGroups every imported contact joins.
keepContactsWithInvalidDetailsbooleanfalse: a contact with any invalid field is rejected.true: it is imported with its invalid fields left empty; only a contact whose number cannot be used is rejected.Default:
falsecontactsarray of objectrequired· min 1 items· max 100000 itemsEvery contact carries the same fields as the first. Each value is a string of at most 1,000 characters, or
null; the limits below are checked per contact once the import runs and reject (or, withkeepContactsWithInvalidDetails, empty) the field rather than the request.
Responses
Ready to send your first message?
We set up your account, sender profiles and API key with you, and help you through the first integration.

