Contacts & data sources

Import contacts from a spreadsheet, connect an external database as a live source, and manage individual contacts.

POST/data-sources/preview-uploadcontacts.manage

Multipart file (CSV/XLSX). Returns detected columns plus a 5-row sample. Nothing is persisted.

POST/data-sources/uploadcontacts.manage

Multipart file + fieldMappings (array of {sourceField, targetField} - one must target msisdn) + optional name. Commits the import.

POST/data-sources/external/testcontacts.manage

Body: {connection, spec}. Tests an external Postgres/MySQL/SQL Server connection and query/table, returns a sample.

POST/data-sources/externalcontacts.manage

Body: {name, connection, spec, fieldMappings}. Creates the data source (credentials encrypted at rest) and runs a first sync.

POST/data-sources/:id/resynccontacts.manage

Re-runs an external data source's sync. Manual-trigger only - there's no scheduled background sync yet.

GET/data-sources

List the account's data sources.

GET/contacts

List contacts, with any custom fields captured at import.

POST/contactscontacts.manage

Create a single contact.

PATCH/contacts/:idcontacts.manage

Update a contact.

DELETE/contacts/:idcontacts.manage

Delete a contact.