Who owns a phone number
GET/api/contacts/lookup
Resolve a phone number to the one contact that owns it, for a dialler that has a number and no name yet. Both the query and the stored number are reduced to digits and compared on their last nine, so +905321234567 and 0532 123 45 67 are the same number.
data is null both when nobody has the number AND when more than one contact does — a name printed beside a number an agent is about to ring is a claim about whose phone will light up, and with two candidates there is no truthful one to make. A query shorter than seven digits is treated as a fragment and answers null. RLS-scoped; requires the same permission as the contacts list.
Request
Responses
- 200
- 401
- 403
The contact that owns the number, or null.
Not authenticated. code: account_disabled means the member's seat was deactivated in this workspace: the session is over even though the token was not revoked (clients sign out and clean up).
Authenticated but not allowed.