Contacts

Get contact by phone number

POST
/api/contacts/phoneNumber

Looks up a contact by phone number. Org-scoped unless the caller is SUPERADMIN, in which case the lookup spans every organization. Non-admin callers only see contacts with a conversation assigned to them (department heads: assigned to their department), except when context is contact-creation, which checks the whole organization. selectedUser._id pins the lookup to one contact id. When several contacts hold the number (a SUPERADMIN lookup across organizations), the first match is returned. Used to resolve a contact reference for incoming-call routing and the dialpad. Returns 404 when no contact matches or the caller cannot see it.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/api/contacts/phoneNumber" \  -H "Content-Type: application/json" \  -d '{    "phoneNumber": "+14165550100"  }'
{  "data": {    "_id": "64f0a1b2c3d4e5f6a7b8c9d0",    "firstName": "Jane",    "lastName": "Doe",    "phoneNumber": [      {        "value": "+14165550100",        "isPrimary": true      }    ]  }}