Skip to content

Search customers by email, phone, or name

GET
/customers/search

Routes on the shape of q when by is omitted: contains ”@” → email; else normalizes to a phone digit count → phone; otherwise → name. Requires a secret key.

q
required
string
>= 1 characters <= 200 characters
by
string
Allowed values: auto email phone name
limit
integer
>= 1 <= 50
program

The programme to act in: its handle (for example vv) or its lower-case id. Optional on a workspace with one programme; on a workspace with several, a call that names none is refused with 400 program_required. A programme that is not this workspace’s is 404 not_found.

string

The programme to act in: its handle (for example vv) or its lower-case id. Optional on a workspace with one programme; on a workspace with several, a call that names none is refused with 400 program_required. A programme that is not this workspace’s is 404 not_found.

Matches for the resolved field.

object
query
required
string
matched_by
required
string
Allowed values: email phone name
results
required
Array<object>
object
customer_uuid
required
string format: uuid
name
required
string | null
tier
required
string | null
channels
required
Array<string>
email_on_file
required
boolean
phone_on_file
required
boolean

Q is missing, or by/limit is out of range, or the program is malformed (not a lower-case programme id or a programme handle), or a workspace with several programmes was given none (program_required).

object
error
required
object
code
required
string
Example
not_found
message
required
string
details
request_id
required
string
Example
req_9f8e7d6c5b4a3210

Missing or invalid API key or OAuth credential.

object
error
required
object
code
required
string
Example
not_found
message
required
string
details
request_id
required
string
Example
req_9f8e7d6c5b4a3210

The credential lacks the loyalty:read scope — a publishable key (publishable_key_forbidden).

object
error
required
object
code
required
string
Example
not_found
message
required
string
details
request_id
required
string
Example
req_9f8e7d6c5b4a3210

The program names no programme of this workspace (not_found).

object
error
required
object
code
required
string
Example
not_found
message
required
string
details
request_id
required
string
Example
req_9f8e7d6c5b4a3210