customFields is keyed by the DataField name returned by ListDataFields. HeyX
stores canonical DataField IDs internally, but this public endpoint deliberately
accepts and returns names for compatibility. Unknown names are preserved.
Set isProspect to make a prospect: a customer that has not bought yet. It
enters by a run of the workspace’s create prospect flow, like the flow’s own
prospects, and can carry where it came from (prospectSourceId, from
List Prospect Sources)
and the opt-in the person answered on your own form (prospectOptIn, with
the statement and terms link they read). Both need isProspect.
A prospect’s email address or phone number that already belongs to a customer
or prospect makes no second record. When the API key may edit that record, it
gets a new prospect next to its others and comes back with created: false
and 200 OK; its title and fields are left as they are (use
Patch Customer Data Fields
to change them). When the key may not edit it, the request is refused with
already_exists (409) and nothing is created. Follow a customer’s prospects
with List Customer Prospects.
This operation is not idempotent.
Creates a customer, or a prospect with is_prospect, from the supplied fields. A prospect's email address or phone number that belongs to an existing customer or prospect the API key may edit makes no new record: that record gets a new prospect and is returned with created false, its fields left unchanged (use PatchCustomerDataFields); one the key may not edit is refused (409). Contacts are not a public API resource. This operation is not idempotent.
RequestCreateCustomerRequest
ResponseCreateCustomerResponse
CreateCustomerRequest
Field
Type
Description
title
string
custom_fields
map<string, string>
Keys are DataField names from ListDataFields. The public API maps these to canonical internal IDs and continues returning names for compatibility.
expected_close_date
optional int64
customer_name
optional string
email
optional string
phone
optional string
Accepts an international number or a local number when phone_country is set.
phone_country
optional string
ISO 3166-1 alpha-2 country code used to normalize a local phone number.
is_prospect
bool
Make the record a prospect: a customer that has not bought yet. It enters by a run of the workspace's create prospect flow, as the flow's own prospects do.
prospect_source_id
optional string
Where the prospect comes from: an active source from ListProspectSources. Only with is_prospect.
prospect_opt_in
ProspectOptInInput
The opt-in the person answered on your own form. Only with is_prospect.
prospect_fields
map<string, string>
The new prospect's own data fields (ListDataFields with entity_type "prospect"), keyed by data field name like custom_fields. Only with is_prospect. They are stored on the prospect this call opens, also when the contact details belong to an existing customer, whose own fields stay as they are.
CreateCustomerResponse
Field
Type
Description
customer
Customer
created
bool
False when the contact details matched an existing record, which got the new prospect instead.
prospect_id
string
The prospect the request opened; empty without is_prospect.
Related Types
ProspectOptInInput
Field
Type
Description
agreed
bool
Whether the person agreed.
statement
string
The statement the person agreed to (or declined), as they read it.
terms_url
string
The terms link shown with the statement, and its text.
terms_label
string
Customer
Field
Type
Description
id
string
title
string
custom_fields
map<string, string>
Name-keyed compatibility representation; keys are not internal UUIDs.
reference_number
string
created_at
int64
updated_at
int64
kind
string
"prospect" until the customer buys (a confirmed quote, a payment that received money or a work order), then "customer". Its prospects are in ListCustomerProspects.
owner
CustomerOwner
Deprecated: customers no longer have an owner of their own, so this is always unset. Quotes and orders keep their owner.
prospect_owner
CustomerOwner
The owner of its current prospect (its newest open prospect, else the one it was won by); unset when none. Each prospect has its own owner: see ListCustomerProspects.
contact_attempt_count
int32
Contact attempts on the customer: how many, and the latest.
last_contact_attempt
ContactAttemptSummary
expected_close_date
optional int64
As set by CreateCustomer and PatchCustomer: the expected close date (Unix seconds; unset when none) and the assigned members and teams.
assignee_ids
repeated string
team_ids
repeated string
CustomerOwner
Field
Type
member_id
string
first_name
string
last_name
string
ContactAttemptSummary
Field
Type
Description
occurred_at
int64
Unix seconds.
channel
string
phone, email, whatsapp, sms or in_person.
outcome
string
The result's name; empty when the attempt has no result.
outcome_kind
string
follow_up, negative or positive; empty without a result.