Skip to main content
You can create a contact using either the legacy v1 endpoint, which requires a phone number, or the v2 endpoint, which accepts one or more contact channels such as phone, email, or Facebook. Both endpoints return the new contact’s ID, revision number, and UUID.

POST /v1/contact

Creates a contact using a phone number as the primary identifier.

Request body

phone
string
required
The contact’s phone number in E.164 format without the leading +. For example, 15105553344.
first
string
The contact’s first name.
last
string
The contact’s last name.
display_name
string
The full display name shown in the inbox. Defaults to a combination of first and last if omitted.
email
string
The contact’s email address.
custom
object
Custom field values for this contact. Use the numeric custom field ID as the key and the field value as the value. For example, {"123": "Premium"}. To retrieve available field IDs, call POST /v1/contact-fields.
avatar
string
URL of an image to use as the contact’s avatar.
assignee_id
integer
ID of the user to assign this contact to. Pass -1 to explicitly unassign.
tags
array
List of tag objects to attach. Each item must have a tag_id integer. Maximum of 5 tags.
is_opted_out
boolean
Set to true if the contact has opted out of messages.

Response

id
integer
Integer ID of the newly created contact.
rev
integer
Revision number of the contact record.
uuid
string
UUID of the newly created contact, used with v2 endpoints.

Example

curl -X POST https://api.heymarket.com/v1/contact \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "15105553344",
    "first": "API",
    "last": "Contact",
    "display_name": "API Contact",
    "email": "help@heymarket.com",
    "is_opted_out": false
  }'
{
  "id": 98765,
  "rev": 1,
  "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}