Docs
Contacts

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 answers RESOURCE_CONFLICT.
  • Web contacts carry a browserVisitorId and a null phone number. They cannot be enriched.
  • name and email are your workspace's overrides. After your workspace enriches the contact, an unset override shows the enriched value; before that, it is null. To clear an override, send null. 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

FieldTypeNotes
qstringSearch the contact id, name, email and phone number. Enriched name and email match only after your workspace enriched the contact.
sourceenum: INBOUND | OUTBOUND | MANUAL | WEB | IMPORTOnly contacts from this source.
sortByenum: createdAt | updatedAt | nameSort column. The other sort keys the shared schema accepts are not a 400 — they fall back to createdAt.
sortDirenum: asc | descSort direction.
aggregatebooleantrue adds totals.totalContacts for the filtered set.
limitinteger 0–100Rows per page. Default 20. 0 returns no rows, with hasMore: true when any exist.
cursorstringThe nextCursor from the previous page.

Responses

200 JSON body:

FieldTypeNotes
contactsobject[]phoneNumber is E.164, or null for a web-widget contact. The fields from nameType down are present only when lastEnrichedAt is set.
contacts[].idstring
contacts[].sourceenum: INBOUND | OUTBOUND | MANUAL | WEB | IMPORT
contacts[].phoneNumberstring | null
contacts[].browserVisitorIdstring | null
contacts[].namestring | null
contacts[].emailstring | null
contacts[].lastEnrichedAtdatetime | null
contacts[].deepResearchPendingboolean
contacts[].createdAtdatetime
contacts[].updatedAtdatetime
contacts[].nameTypeenum: consumer | business | null
contacts[].firstNamestring | null
contacts[].lastNamestring | null
contacts[].normalizedFullNamestring | null
contacts[].otherPhonesstring[] | null
contacts[].companyNamestring | null
contacts[].companyWebsitestring | null
contacts[].companyIndustrystring | null
contacts[].companyAddress1string | null
contacts[].companyAddress2string | null
contacts[].companyLocalitystring | null
contacts[].companyStatestring | null
contacts[].companyPostalCodestring | null
contacts[].companyCountrystring | null
contacts[].jobTitlestring | null
contacts[].twitterUrlstring | null
contacts[].linkedinUrlstring | null
contacts[].avatarUrlstring | null
contacts[].googlePlaceIdstring | null
contacts[].googleMapsUristring | null
contacts[].googleRatingnumber | null
contacts[].googleRatingCountnumber | null
contacts[].googleBusinessStatusstring | null
hasMoreboolean
nextCursorstring | null
totalsobjectPresent only with aggregate=true.
totals.totalContactsnumber

Errors

Problem Details (RFC 9457). Each code links to its reference page.

Plus the auth-layer codes every endpoint can return

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

FieldTypeNotes
phoneNumber *stringmin 1
namestring
emailstringemail

Responses

201 JSON body:

FieldTypeNotes
contactobjectNo phoneNumber string — the row carries the internal phoneNumberId instead. Fetch the contact to get the flat shape.
contact.idstring
contact.phoneNumberIdstring | null
contact.sourceenum: INBOUND | OUTBOUND | MANUAL | WEB | IMPORT
contact.namestring | null
contact.emailstring | null
contact.typedPhonestring | null
contact.lastEnrichedAtdatetime | null
contact.browserVisitorIdstring | null
contact.deletedAtdatetime | null
contact.createdAtdatetime
contact.updatedAtdatetime

Errors

Problem Details (RFC 9457). Each code links to its reference page.

Plus the auth-layer codes every endpoint can return

GET/api/contacts/{contactId}

Fetch one contact.

Auth: Bearer token · any workspace member

Responses

200 JSON body:

FieldTypeNotes
contactobjectphoneNumber is E.164, or null for a web-widget contact. The fields from nameType down are present only when lastEnrichedAt is set.
contact.idstring
contact.sourceenum: INBOUND | OUTBOUND | MANUAL | WEB | IMPORT
contact.phoneNumberstring | null
contact.browserVisitorIdstring | null
contact.namestring | null
contact.emailstring | null
contact.lastEnrichedAtdatetime | null
contact.deepResearchPendingboolean
contact.createdAtdatetime
contact.updatedAtdatetime
contact.nameTypeenum: consumer | business | null
contact.firstNamestring | null
contact.lastNamestring | null
contact.normalizedFullNamestring | null
contact.otherPhonesstring[] | null
contact.companyNamestring | null
contact.companyWebsitestring | null
contact.companyIndustrystring | null
contact.companyAddress1string | null
contact.companyAddress2string | null
contact.companyLocalitystring | null
contact.companyStatestring | null
contact.companyPostalCodestring | null
contact.companyCountrystring | null
contact.jobTitlestring | null
contact.twitterUrlstring | null
contact.linkedinUrlstring | null
contact.avatarUrlstring | null
contact.googlePlaceIdstring | null
contact.googleMapsUristring | null
contact.googleRatingnumber | null
contact.googleRatingCountnumber | null
contact.googleBusinessStatusstring | null
pendingSuggestionsobject[]
pendingSuggestions[].idstring
pendingSuggestions[].reasonenum: PHONE_MATCH
pendingSuggestions[].otherContactIdstring
pendingSuggestions[].otherContactLabelstring
pendingSuggestions[].otherContactHasPhoneboolean

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.

Plus the auth-layer codes every endpoint can return

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.

FieldTypeNotes
namestring | null
emailstring | "" | null

Responses

200 JSON body:

FieldTypeNotes
contactobjectphoneNumber is E.164, or null for a web-widget contact. The fields from nameType down are present only when lastEnrichedAt is set.
contact.idstring
contact.sourceenum: INBOUND | OUTBOUND | MANUAL | WEB | IMPORT
contact.phoneNumberstring | null
contact.browserVisitorIdstring | null
contact.namestring | null
contact.emailstring | null
contact.lastEnrichedAtdatetime | null
contact.deepResearchPendingboolean
contact.createdAtdatetime
contact.updatedAtdatetime
contact.nameTypeenum: consumer | business | null
contact.firstNamestring | null
contact.lastNamestring | null
contact.normalizedFullNamestring | null
contact.otherPhonesstring[] | null
contact.companyNamestring | null
contact.companyWebsitestring | null
contact.companyIndustrystring | null
contact.companyAddress1string | null
contact.companyAddress2string | null
contact.companyLocalitystring | null
contact.companyStatestring | null
contact.companyPostalCodestring | null
contact.companyCountrystring | null
contact.jobTitlestring | null
contact.twitterUrlstring | null
contact.linkedinUrlstring | null
contact.avatarUrlstring | null
contact.googlePlaceIdstring | null
contact.googleMapsUristring | null
contact.googleRatingnumber | null
contact.googleRatingCountnumber | null
contact.googleBusinessStatusstring | null

Errors

Problem Details (RFC 9457). Each code links to its reference page.

Plus the auth-layer codes every endpoint can return

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.

Plus the auth-layer codes every endpoint can return

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:

FieldTypeNotes
contactobject
contact.idstring
contact.phoneNumberstring
contact.enrichedDataobjectNo enrichment source fills avatarUrl today, so expect null.
contact.enrichedData.lastEnrichedAtdatetime | null
contact.enrichedData.namestring | null
contact.enrichedData.nameTypestring | null
contact.enrichedData.firstNamestring | null
contact.enrichedData.lastNamestring | null
contact.enrichedData.normalizedFullNamestring | null
contact.enrichedData.emailstring | null
contact.enrichedData.otherPhonesstring[] | null
contact.enrichedData.companyNamestring | null
contact.enrichedData.companyWebsitestring | null
contact.enrichedData.companyIndustrystring | null
contact.enrichedData.companyAddress1string | null
contact.enrichedData.companyAddress2string | null
contact.enrichedData.companyLocalitystring | null
contact.enrichedData.companyStatestring | null
contact.enrichedData.companyPostalCodestring | null
contact.enrichedData.companyCountrystring | null
contact.enrichedData.jobTitlestring | null
contact.enrichedData.twitterUrlstring | null
contact.enrichedData.linkedinUrlstring | null
contact.enrichedData.avatarUrlstring | null
contact.enrichedData.googlePlaceIdstring | null
contact.enrichedData.googleMapsUristring | null
contact.enrichedData.googleRatingnumber | null
contact.enrichedData.googleRatingCountnumber | null
contact.enrichedData.googleBusinessStatusstring | 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.

FieldTypeNotes
status"deep_research_in_progress"
code"DEEP_RESEARCH_IN_PROGRESS"
contactIdstring
pollUrlstring
titlestring
detailstring

Errors

Problem Details (RFC 9457). Each code links to its reference page.

Plus the auth-layer codes every endpoint can return

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

FieldTypeNotes
dupIdstring (required) — the contact to fold in

Responses

200 The surviving contact, re-read after the merge.

FieldTypeNotes
contactobjectphoneNumber is E.164, or null for a web-widget contact. The fields from nameType down are present only when lastEnrichedAt is set.
contact.idstring
contact.sourceenum: INBOUND | OUTBOUND | MANUAL | WEB | IMPORT
contact.phoneNumberstring | null
contact.browserVisitorIdstring | null
contact.namestring | null
contact.emailstring | null
contact.lastEnrichedAtdatetime | null
contact.deepResearchPendingboolean
contact.createdAtdatetime
contact.updatedAtdatetime
contact.nameTypeenum: consumer | business | null
contact.firstNamestring | null
contact.lastNamestring | null
contact.normalizedFullNamestring | null
contact.otherPhonesstring[] | null
contact.companyNamestring | null
contact.companyWebsitestring | null
contact.companyIndustrystring | null
contact.companyAddress1string | null
contact.companyAddress2string | null
contact.companyLocalitystring | null
contact.companyStatestring | null
contact.companyPostalCodestring | null
contact.companyCountrystring | null
contact.jobTitlestring | null
contact.twitterUrlstring | null
contact.linkedinUrlstring | null
contact.avatarUrlstring | null
contact.googlePlaceIdstring | null
contact.googleMapsUristring | null
contact.googleRatingnumber | null
contact.googleRatingCountnumber | null
contact.googleBusinessStatusstring | null

Errors

Problem Details (RFC 9457). Each code links to its reference page.

Plus the auth-layer codes every endpoint can return

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.

Plus the auth-layer codes every endpoint can return

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.

FieldTypeNotes
fileCSV file in the `file` field (required)

Responses

200 JSON body:

FieldTypeNotes
importednumber
skippedExistingnumber
skippedDuplicateInFilenumber
rejectedobject[]
rejected[].rownumber
rejected[].reasonstring
rejectedTruncatednumber

rejected is capped; rejectedTruncated counts the rows that did not fit.

Errors

Problem Details (RFC 9457). Each code links to its reference page.

Plus the auth-layer codes every endpoint can return