Contacts
The people you talk to — list, create, update, merge, enrich and import contacts.
A contact is one person, identified by a phone number (for phone and SIP calls) or by a browser visitor id (for the web widget). dBel creates contacts automatically from inbound calls and answered outbound calls. It also creates one for a web-widget visitor who gives an identity detail, such as a name, email or phone number. You can also create contacts, import them from a CSV, and enrich them with caller and company details.
Beta. This API is documented but not yet frozen. Response fields and error codes may change without a version bump. Pin your integration to the fields you use, and expect additions.
Three shapes. Create returns the raw contact row (with an internal phoneNumberId, no phoneNumber string). List, get, update and merge return the flat contact shape. Enrich returns id, phoneNumber and the lookup fields nested in enrichedData (a 202 returns contactId and pollUrl instead). Read the id off the create or enrich response, then fetch the contact if you need the flat shape.
Identity
- Phone contacts carry an E.164
phoneNumber(+14155551234). A workspace holds at most one active contact per number; creating a second answersRESOURCE_CONFLICT. - Web contacts carry a
browserVisitorIdand anullphone number. They cannot be enriched. nameandemailare your workspace's overrides. After your workspace enriches the contact, an unset override shows the enriched value; before that, it isnull. To clear an override, sendnull. An empty string is stored as-is and hides the enriched value.
Roles
Any member can list, read, create, update, enrich and import contacts. Deleting, merging and dismissing a duplicate suggestion need ADMIN or OWNER.
Duplicates
When a web visitor gives a phone number — in the widget's lead form, or through the page's visitor metadata — dBel checks it against the workspace's contacts that have a phone number. If one already has that number, or a later call to or from that number links one, dBel flags the pair as a possible duplicate. A call alone never raises a suggestion, and dBel never merges contacts on its own. The contact detail lists these in pendingSuggestions (ADMIN/OWNER only).
Merge them with the merge endpoint, or dismiss the suggestion. A merge does not need a suggestion: any two active contacts in the workspace can be merged. The contact in the URL survives, and the dupId contact's calls move to it. The dupId contact is soft-deleted: it leaves the list, and fetching it answers CONTACT_NOT_FOUND_OR_UNAUTHORIZED. The survivor keeps its own values and takes the dupId contact's name, email, typed phone, phone number, visitor id or enrichment status only where its own is unset (null; an empty-string override counts as set) — so a survivor that was never enriched can start showing enriched fields. RESOURCE_CONFLICT means one of the two contacts was merged or deleted while the request ran; a dupId equal to the contact in the URL answers INVALID_REQUEST_BODY. If both have a phone number, the survivor keeps its own, and the other number is left with no contact.
Example — create, then read back the flat shape
# Create
curl -X POST https://dbel.ai/api/contacts \
-H "Authorization: Bearer $DBEL_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "phoneNumber": "+14155551234", "name": "Alex Rivera" }'
# → 201 { "contact": { "id": "clx…", "phoneNumberId": "…", … } }
# Read the flat shape
curl https://dbel.ai/api/contacts/clx… \
-H "Authorization: Bearer $DBEL_API_TOKEN"
# → 200 { "contact": { "id": "clx…", "phoneNumber": "+14155551234", … }, "pendingSuggestions": [] }CSV import
Post a CSV as multipart/form-data in a field named file. A file can be up to 1 MB and 1,000 data rows. The first line must be a header row with a phone column; name and email columns are optional. Header names ignore case, and other columns are ignored.
A number can be full E.164 (+14155551234). If all of your workspace's own phone numbers are from one country, a local number in that country's format also works. With no phone numbers, or numbers from several countries, every number needs the leading +. (Create always needs the +.)
Rows are checked one by one. A row whose number already has a contact is skipped, and so is a repeat of an earlier row in the file. A row that fails a check, or cannot be saved, is listed in rejected with its row number; the header is row 1. At most 200 rows are listed; rejectedTruncated counts the rest. Nothing is overwritten. The Importing contacts guide walks through the file format.
Endpoints
GET/api/contacts
List contacts with search, filter and sort.
Auth: Bearer token · any workspace member
Query parameters
| Field | Type | Notes |
|---|---|---|
| q | string | Search the contact id, name, email and phone number. Enriched name and email match only after your workspace enriched the contact. |
| source | enum: INBOUND | OUTBOUND | MANUAL | WEB | IMPORT | Only contacts from this source. |
| sortBy | enum: createdAt | updatedAt | name | Sort column. The other sort keys the shared schema accepts are not a 400 — they fall back to createdAt. |
| sortDir | enum: asc | desc | Sort direction. |
| aggregate | boolean | true adds totals.totalContacts for the filtered set. |
| limit | integer 0–100 | Rows per page. Default 20. 0 returns no rows, with hasMore: true when any exist. |
| cursor | string | The nextCursor from the previous page. |
Responses
200 JSON body:
| Field | Type | Notes |
|---|---|---|
| contacts | object[] | phoneNumber is E.164, or null for a web-widget contact. The fields from nameType down are present only when lastEnrichedAt is set. |
| contacts[].id | string | |
| contacts[].source | enum: INBOUND | OUTBOUND | MANUAL | WEB | IMPORT | |
| contacts[].phoneNumber | string | null | |
| contacts[].browserVisitorId | string | null | |
| contacts[].name | string | null | |
| contacts[].email | string | null | |
| contacts[].lastEnrichedAt | datetime | null | |
| contacts[].deepResearchPending | boolean | |
| contacts[].createdAt | datetime | |
| contacts[].updatedAt | datetime | |
| contacts[].nameType | enum: consumer | business | null | |
| contacts[].firstName | string | null | |
| contacts[].lastName | string | null | |
| contacts[].normalizedFullName | string | null | |
| contacts[].otherPhones | string[] | null | |
| contacts[].companyName | string | null | |
| contacts[].companyWebsite | string | null | |
| contacts[].companyIndustry | string | null | |
| contacts[].companyAddress1 | string | null | |
| contacts[].companyAddress2 | string | null | |
| contacts[].companyLocality | string | null | |
| contacts[].companyState | string | null | |
| contacts[].companyPostalCode | string | null | |
| contacts[].companyCountry | string | null | |
| contacts[].jobTitle | string | null | |
| contacts[].twitterUrl | string | null | |
| contacts[].linkedinUrl | string | null | |
| contacts[].avatarUrl | string | null | |
| contacts[].googlePlaceId | string | null | |
| contacts[].googleMapsUri | string | null | |
| contacts[].googleRating | number | null | |
| contacts[].googleRatingCount | number | null | |
| contacts[].googleBusinessStatus | string | null | |
| hasMore | boolean | |
| nextCursor | string | null | |
| totals | object | Present only with aggregate=true. |
| totals.totalContacts | number |
Errors
Problem Details (RFC 9457). Each code links to its reference page.
- 400 INVALID_REQUEST_QUERY — The request query is invalid.
- 400 INVALID_WORKSPACE_ID — The workspace is missing or invalid.
- 500 UNKNOWN_ERROR — An unexpected server error occurred. Please try again later.
Plus the auth-layer codes every endpoint can return
- 401 UNAUTHENTICATED — Authentication required.
- 403 EMAIL_NOT_VERIFIED — Your email address is not verified.
- 401 INVALID_USER — The authenticated user is invalid or missing.
- 400 INVALID_WORKSPACE_ID — The workspace is missing or invalid.
- 404 WORKSPACE_NOT_FOUND_OR_UNAUTHORIZED — Workspace not found or you do not have access.
- 403 FORBIDDEN — You do not have permission to access this resource.
- 429 RATE_LIMIT_EXCEEDED — Too many requests. Please wait.
POST/api/contacts
Create a contact from a phone number.
RESOURCE_CONFLICT means an active contact with that number already exists in the workspace.
Auth: Bearer token · any workspace member
Request body
application/json
| Field | Type | Notes |
|---|---|---|
| phoneNumber * | string | min 1 |
| name | string | |
| string |
Responses
201 JSON body:
| Field | Type | Notes |
|---|---|---|
| contact | object | No phoneNumber string — the row carries the internal phoneNumberId instead. Fetch the contact to get the flat shape. |
| contact.id | string | |
| contact.phoneNumberId | string | null | |
| contact.source | enum: INBOUND | OUTBOUND | MANUAL | WEB | IMPORT | |
| contact.name | string | null | |
| contact.email | string | null | |
| contact.typedPhone | string | null | |
| contact.lastEnrichedAt | datetime | null | |
| contact.browserVisitorId | string | null | |
| contact.deletedAt | datetime | null | |
| contact.createdAt | datetime | |
| contact.updatedAt | datetime |
Errors
Problem Details (RFC 9457). Each code links to its reference page.
- 400 INVALID_REQUEST_BODY — The request body is invalid.
- 400 INVALID_WORKSPACE_ID — The workspace is missing or invalid.
- 409 RESOURCE_CONFLICT — The request conflicts with the current state of the target resource.
- 500 UNKNOWN_ERROR — An unexpected server error occurred. Please try again later.
Plus the auth-layer codes every endpoint can return
- 401 UNAUTHENTICATED — Authentication required.
- 403 EMAIL_NOT_VERIFIED — Your email address is not verified.
- 401 INVALID_USER — The authenticated user is invalid or missing.
- 400 INVALID_WORKSPACE_ID — The workspace is missing or invalid.
- 404 WORKSPACE_NOT_FOUND_OR_UNAUTHORIZED — Workspace not found or you do not have access.
- 403 FORBIDDEN — You do not have permission to access this resource.
- 429 RATE_LIMIT_EXCEEDED — Too many requests. Please wait.
GET/api/contacts/{contactId}
Fetch one contact.
Auth: Bearer token · any workspace member
Responses
200 JSON body:
| Field | Type | Notes |
|---|---|---|
| contact | object | phoneNumber is E.164, or null for a web-widget contact. The fields from nameType down are present only when lastEnrichedAt is set. |
| contact.id | string | |
| contact.source | enum: INBOUND | OUTBOUND | MANUAL | WEB | IMPORT | |
| contact.phoneNumber | string | null | |
| contact.browserVisitorId | string | null | |
| contact.name | string | null | |
| contact.email | string | null | |
| contact.lastEnrichedAt | datetime | null | |
| contact.deepResearchPending | boolean | |
| contact.createdAt | datetime | |
| contact.updatedAt | datetime | |
| contact.nameType | enum: consumer | business | null | |
| contact.firstName | string | null | |
| contact.lastName | string | null | |
| contact.normalizedFullName | string | null | |
| contact.otherPhones | string[] | null | |
| contact.companyName | string | null | |
| contact.companyWebsite | string | null | |
| contact.companyIndustry | string | null | |
| contact.companyAddress1 | string | null | |
| contact.companyAddress2 | string | null | |
| contact.companyLocality | string | null | |
| contact.companyState | string | null | |
| contact.companyPostalCode | string | null | |
| contact.companyCountry | string | null | |
| contact.jobTitle | string | null | |
| contact.twitterUrl | string | null | |
| contact.linkedinUrl | string | null | |
| contact.avatarUrl | string | null | |
| contact.googlePlaceId | string | null | |
| contact.googleMapsUri | string | null | |
| contact.googleRating | number | null | |
| contact.googleRatingCount | number | null | |
| contact.googleBusinessStatus | string | null | |
| pendingSuggestions | object[] | |
| pendingSuggestions[].id | string | |
| pendingSuggestions[].reason | enum: PHONE_MATCH | |
| pendingSuggestions[].otherContactId | string | |
| pendingSuggestions[].otherContactLabel | string | |
| pendingSuggestions[].otherContactHasPhone | boolean |
pendingSuggestions (possible duplicates) is filled only for ADMIN/OWNER callers; a MEMBER receives [].
Errors
Problem Details (RFC 9457). Each code links to its reference page.
- 404 CONTACT_NOT_FOUND_OR_UNAUTHORIZED — Contact not found or you do not have access.
- 400 INVALID_CONTACT_ID — The contactId is missing or invalid.
- 400 INVALID_WORKSPACE_ID — The workspace is missing or invalid.
- 500 UNKNOWN_ERROR — An unexpected server error occurred. Please try again later.
Plus the auth-layer codes every endpoint can return
- 401 UNAUTHENTICATED — Authentication required.
- 403 EMAIL_NOT_VERIFIED — Your email address is not verified.
- 401 INVALID_USER — The authenticated user is invalid or missing.
- 400 INVALID_WORKSPACE_ID — The workspace is missing or invalid.
- 404 WORKSPACE_NOT_FOUND_OR_UNAUTHORIZED — Workspace not found or you do not have access.
- 403 FORBIDDEN — You do not have permission to access this resource.
- 429 RATE_LIMIT_EXCEEDED — Too many requests. Please wait.
PATCH/api/contacts/{contactId}
Set or clear the contact's display name and email.
Auth: Bearer token · any workspace member
Request body
application/json
null clears a field back to the enriched value.
| Field | Type | Notes |
|---|---|---|
| name | string | null | |
| string | "" | null |
Responses
200 JSON body:
| Field | Type | Notes |
|---|---|---|
| contact | object | phoneNumber is E.164, or null for a web-widget contact. The fields from nameType down are present only when lastEnrichedAt is set. |
| contact.id | string | |
| contact.source | enum: INBOUND | OUTBOUND | MANUAL | WEB | IMPORT | |
| contact.phoneNumber | string | null | |
| contact.browserVisitorId | string | null | |
| contact.name | string | null | |
| contact.email | string | null | |
| contact.lastEnrichedAt | datetime | null | |
| contact.deepResearchPending | boolean | |
| contact.createdAt | datetime | |
| contact.updatedAt | datetime | |
| contact.nameType | enum: consumer | business | null | |
| contact.firstName | string | null | |
| contact.lastName | string | null | |
| contact.normalizedFullName | string | null | |
| contact.otherPhones | string[] | null | |
| contact.companyName | string | null | |
| contact.companyWebsite | string | null | |
| contact.companyIndustry | string | null | |
| contact.companyAddress1 | string | null | |
| contact.companyAddress2 | string | null | |
| contact.companyLocality | string | null | |
| contact.companyState | string | null | |
| contact.companyPostalCode | string | null | |
| contact.companyCountry | string | null | |
| contact.jobTitle | string | null | |
| contact.twitterUrl | string | null | |
| contact.linkedinUrl | string | null | |
| contact.avatarUrl | string | null | |
| contact.googlePlaceId | string | null | |
| contact.googleMapsUri | string | null | |
| contact.googleRating | number | null | |
| contact.googleRatingCount | number | null | |
| contact.googleBusinessStatus | string | null |
Errors
Problem Details (RFC 9457). Each code links to its reference page.
- 404 CONTACT_NOT_FOUND_OR_UNAUTHORIZED — Contact not found or you do not have access.
- 400 INVALID_CONTACT_ID — The contactId is missing or invalid.
- 400 INVALID_REQUEST_BODY — The request body is invalid.
- 400 INVALID_WORKSPACE_ID — The workspace is missing or invalid.
- 500 UNKNOWN_ERROR — An unexpected server error occurred. Please try again later.
Plus the auth-layer codes every endpoint can return
- 401 UNAUTHENTICATED — Authentication required.
- 403 EMAIL_NOT_VERIFIED — Your email address is not verified.
- 401 INVALID_USER — The authenticated user is invalid or missing.
- 400 INVALID_WORKSPACE_ID — The workspace is missing or invalid.
- 404 WORKSPACE_NOT_FOUND_OR_UNAUTHORIZED — Workspace not found or you do not have access.
- 403 FORBIDDEN — You do not have permission to access this resource.
- 429 RATE_LIMIT_EXCEEDED — Too many requests. Please wait.
DELETE/api/contacts/{contactId}
Soft-delete a contact.
Auth: Bearer token · workspace ADMIN or OWNER
Responses
204 No body.
Errors
Problem Details (RFC 9457). Each code links to its reference page.
- 404 CONTACT_NOT_FOUND_OR_UNAUTHORIZED — Contact not found or you do not have access.
- 400 INVALID_CONTACT_ID — The contactId is missing or invalid.
- 400 INVALID_WORKSPACE_ID — The workspace is missing or invalid.
- 500 UNKNOWN_ERROR — An unexpected server error occurred. Please try again later.
Plus the auth-layer codes every endpoint can return
- 401 UNAUTHENTICATED — Authentication required.
- 403 EMAIL_NOT_VERIFIED — Your email address is not verified.
- 401 INVALID_USER — The authenticated user is invalid or missing.
- 400 INVALID_WORKSPACE_ID — The workspace is missing or invalid.
- 404 WORKSPACE_NOT_FOUND_OR_UNAUTHORIZED — Workspace not found or you do not have access.
- 403 FORBIDDEN — You do not have permission to access this resource.
- 429 RATE_LIMIT_EXCEEDED — Too many requests. Please wait.
POST/api/contacts/{contactId}/enrich
Look up caller and company details for a phone contact.
No request body. Enrichment counts against the workspace owner's plan limit; a web-widget contact (no phone number) is refused with INVALID_REQUEST_BODY. The plan limit is checked first, so at the limit every enrich call answers SUBSCRIPTION_LIMIT_EXCEEDED, even for an unknown id.
Auth: Bearer token · any workspace member
Responses
200 JSON body:
| Field | Type | Notes |
|---|---|---|
| contact | object | |
| contact.id | string | |
| contact.phoneNumber | string | |
| contact.enrichedData | object | No enrichment source fills avatarUrl today, so expect null. |
| contact.enrichedData.lastEnrichedAt | datetime | null | |
| contact.enrichedData.name | string | null | |
| contact.enrichedData.nameType | string | null | |
| contact.enrichedData.firstName | string | null | |
| contact.enrichedData.lastName | string | null | |
| contact.enrichedData.normalizedFullName | string | null | |
| contact.enrichedData.email | string | null | |
| contact.enrichedData.otherPhones | string[] | null | |
| contact.enrichedData.companyName | string | null | |
| contact.enrichedData.companyWebsite | string | null | |
| contact.enrichedData.companyIndustry | string | null | |
| contact.enrichedData.companyAddress1 | string | null | |
| contact.enrichedData.companyAddress2 | string | null | |
| contact.enrichedData.companyLocality | string | null | |
| contact.enrichedData.companyState | string | null | |
| contact.enrichedData.companyPostalCode | string | null | |
| contact.enrichedData.companyCountry | string | null | |
| contact.enrichedData.jobTitle | string | null | |
| contact.enrichedData.twitterUrl | string | null | |
| contact.enrichedData.linkedinUrl | string | null | |
| contact.enrichedData.avatarUrl | string | null | |
| contact.enrichedData.googlePlaceId | string | null | |
| contact.enrichedData.googleMapsUri | string | null | |
| contact.enrichedData.googleRating | number | null | |
| contact.enrichedData.googleRatingCount | number | null | |
| contact.enrichedData.googleBusinessStatus | string | null |
202 A deeper lookup is still running. Poll pollUrl (the contact's GET) after the Retry-After seconds. While its deepResearchPending is true, the lookup is running. When it turns false, the lookup has ended. A lastEnrichedAt newer than your request means it finished. Otherwise it ended without a result: nothing was saved, and it does not count against the plan limit. You can enrich again after a short wait; until then, the call answers CONTACT_RECENTLY_ENRICHED.
| Field | Type | Notes |
|---|---|---|
| status | "deep_research_in_progress" | |
| code | "DEEP_RESEARCH_IN_PROGRESS" | |
| contactId | string | |
| pollUrl | string | |
| title | string | |
| detail | string |
Errors
Problem Details (RFC 9457). Each code links to its reference page.
- 422 CONTACT_INVALID_PHONE_NUMBER — Invalid phone number associated with contact.
- 404 CONTACT_NOT_FOUND_OR_UNAUTHORIZED — Contact not found or you do not have access.
- 409 CONTACT_RECENTLY_ENRICHED — Contact enrichment is on cooldown.
- 400 INVALID_CONTACT_ID — The contactId is missing or invalid.
- 400 INVALID_REQUEST_BODY — The request body is invalid.
- 400 INVALID_WORKSPACE_ID — The workspace is missing or invalid.
- 402 SUBSCRIPTION_LIMIT_EXCEEDED — You have reached the maximum limit for this action based on your subscription plan.
- 500 UNKNOWN_ERROR — An unexpected server error occurred. Please try again later.
- 404 WORKSPACE_NOT_FOUND_OR_UNAUTHORIZED — Workspace not found or you do not have access.
Plus the auth-layer codes every endpoint can return
- 401 UNAUTHENTICATED — Authentication required.
- 403 EMAIL_NOT_VERIFIED — Your email address is not verified.
- 401 INVALID_USER — The authenticated user is invalid or missing.
- 400 INVALID_WORKSPACE_ID — The workspace is missing or invalid.
- 404 WORKSPACE_NOT_FOUND_OR_UNAUTHORIZED — Workspace not found or you do not have access.
- 403 FORBIDDEN — You do not have permission to access this resource.
- 429 RATE_LIMIT_EXCEEDED — Too many requests. Please wait.
POST/api/contacts/{contactId}/merge
Merge a duplicate into this contact. The URL's contact survives.
Auth: Bearer token · workspace ADMIN or OWNER
Request body
application/json
| Field | Type | Notes |
|---|---|---|
| dupId | string (required) — the contact to fold in |
Responses
200 The surviving contact, re-read after the merge.
| Field | Type | Notes |
|---|---|---|
| contact | object | phoneNumber is E.164, or null for a web-widget contact. The fields from nameType down are present only when lastEnrichedAt is set. |
| contact.id | string | |
| contact.source | enum: INBOUND | OUTBOUND | MANUAL | WEB | IMPORT | |
| contact.phoneNumber | string | null | |
| contact.browserVisitorId | string | null | |
| contact.name | string | null | |
| contact.email | string | null | |
| contact.lastEnrichedAt | datetime | null | |
| contact.deepResearchPending | boolean | |
| contact.createdAt | datetime | |
| contact.updatedAt | datetime | |
| contact.nameType | enum: consumer | business | null | |
| contact.firstName | string | null | |
| contact.lastName | string | null | |
| contact.normalizedFullName | string | null | |
| contact.otherPhones | string[] | null | |
| contact.companyName | string | null | |
| contact.companyWebsite | string | null | |
| contact.companyIndustry | string | null | |
| contact.companyAddress1 | string | null | |
| contact.companyAddress2 | string | null | |
| contact.companyLocality | string | null | |
| contact.companyState | string | null | |
| contact.companyPostalCode | string | null | |
| contact.companyCountry | string | null | |
| contact.jobTitle | string | null | |
| contact.twitterUrl | string | null | |
| contact.linkedinUrl | string | null | |
| contact.avatarUrl | string | null | |
| contact.googlePlaceId | string | null | |
| contact.googleMapsUri | string | null | |
| contact.googleRating | number | null | |
| contact.googleRatingCount | number | null | |
| contact.googleBusinessStatus | string | null |
Errors
Problem Details (RFC 9457). Each code links to its reference page.
- 404 CONTACT_NOT_FOUND_OR_UNAUTHORIZED — Contact not found or you do not have access.
- 400 INVALID_CONTACT_ID — The contactId is missing or invalid.
- 400 INVALID_REQUEST_BODY — The request body is invalid.
- 400 INVALID_WORKSPACE_ID — The workspace is missing or invalid.
- 409 RESOURCE_CONFLICT — The request conflicts with the current state of the target resource.
- 500 UNKNOWN_ERROR — An unexpected server error occurred. Please try again later.
Plus the auth-layer codes every endpoint can return
- 401 UNAUTHENTICATED — Authentication required.
- 403 EMAIL_NOT_VERIFIED — Your email address is not verified.
- 401 INVALID_USER — The authenticated user is invalid or missing.
- 400 INVALID_WORKSPACE_ID — The workspace is missing or invalid.
- 404 WORKSPACE_NOT_FOUND_OR_UNAUTHORIZED — Workspace not found or you do not have access.
- 403 FORBIDDEN — You do not have permission to access this resource.
- 429 RATE_LIMIT_EXCEEDED — Too many requests. Please wait.
POST/api/contacts/{contactId}/suggestions/{suggestionId}/dismiss
Dismiss a possible-duplicate suggestion.
No request body. RESOURCE_CONFLICT means this contact has no pending suggestion with that id: it was already merged or dismissed, it does not exist, or it belongs to another contact.
Auth: Bearer token · workspace ADMIN or OWNER
Responses
204 No body.
Errors
Problem Details (RFC 9457). Each code links to its reference page.
- 400 INVALID_REQUEST_BODY — The request body is invalid.
- 400 INVALID_WORKSPACE_ID — The workspace is missing or invalid.
- 409 RESOURCE_CONFLICT — The request conflicts with the current state of the target resource.
- 500 UNKNOWN_ERROR — An unexpected server error occurred. Please try again later.
Plus the auth-layer codes every endpoint can return
- 401 UNAUTHENTICATED — Authentication required.
- 403 EMAIL_NOT_VERIFIED — Your email address is not verified.
- 401 INVALID_USER — The authenticated user is invalid or missing.
- 400 INVALID_WORKSPACE_ID — The workspace is missing or invalid.
- 404 WORKSPACE_NOT_FOUND_OR_UNAUTHORIZED — Workspace not found or you do not have access.
- 403 FORBIDDEN — You do not have permission to access this resource.
- 429 RATE_LIMIT_EXCEEDED — Too many requests. Please wait.
POST/api/contacts/import
Import contacts from a CSV file.
IMPORT_FILE_INVALID and IMPORT_TOO_MANY_ROWS carry a detail built from your file (the columns found, the row that broke) so the file can be fixed.
Auth: Bearer token · any workspace member
Request body
multipart/form-data
A number that already has a contact is skipped, never overwritten.
| Field | Type | Notes |
|---|---|---|
| file | CSV file in the `file` field (required) |
Responses
200 JSON body:
| Field | Type | Notes |
|---|---|---|
| imported | number | |
| skippedExisting | number | |
| skippedDuplicateInFile | number | |
| rejected | object[] | |
| rejected[].row | number | |
| rejected[].reason | string | |
| rejectedTruncated | number |
rejected is capped; rejectedTruncated counts the rows that did not fit.
Errors
Problem Details (RFC 9457). Each code links to its reference page.
- 400 IMPORT_FILE_INVALID — The file could not be read as CSV. It needs a header row with a `phone` column.
- 413 IMPORT_FILE_TOO_LARGE — The file is too large. Split it into smaller files and retry.
- 422 IMPORT_TOO_MANY_ROWS — The file has too many rows. Split it into smaller files and retry.
- 400 INVALID_REQUEST_BODY — The request body is invalid.
- 400 INVALID_WORKSPACE_ID — The workspace is missing or invalid.
- 500 UNKNOWN_ERROR — An unexpected server error occurred. Please try again later.
Plus the auth-layer codes every endpoint can return
- 401 UNAUTHENTICATED — Authentication required.
- 403 EMAIL_NOT_VERIFIED — Your email address is not verified.
- 401 INVALID_USER — The authenticated user is invalid or missing.
- 400 INVALID_WORKSPACE_ID — The workspace is missing or invalid.
- 404 WORKSPACE_NOT_FOUND_OR_UNAUTHORIZED — Workspace not found or you do not have access.
- 403 FORBIDDEN — You do not have permission to access this resource.
- 429 RATE_LIMIT_EXCEEDED — Too many requests. Please wait.