Skip to main content
Contact channels represent the different ways you can reach a contact — phone number, email address, Facebook, and other supported integrations. A single contact can have multiple channels attached to them. The v2 API provides endpoints to add, update, retrieve, and delete individual channels on a contact.

The ContactChannel object

FieldTypeDescription
idstringUnique identifier for this channel record.
team_idintegerID of the team that owns this channel.
contact_idstringUUID of the contact this channel belongs to.
channel_typestringType of channel: phone, email, facebook, or another integration.
channel_idstringThe channel value, such as a phone number or email address.
channel_handlestringHandle associated with the channel, if applicable.
info_channelstringRelated integration channel, if applicable.
createdstringISO 8601 timestamp of when this channel was added.
updatedstringISO 8601 timestamp of the last update.

POST /v2/contact//channel

Adds a new channel to an existing contact.

Path parameters

contactID
string
required
The UUID of the contact to add a channel to.

Request body

channel_type
string
required
The type of channel to add: phone, email, facebook, or another supported integration.
channel_id
string
required
The value for the channel, such as a phone number in E.164 format or an email address.

Response

Returns the updated list of ContactChannel objects for the contact.

Example

curl -X POST https://api.heymarket.com/v2/contact/a1b2c3d4-e5f6-7890-abcd-ef1234567890/channel \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "channel_type": "email",
    "channel_id": "alice@example.com"
  }'

PUT /v2/contact//channel

Updates an existing channel on a contact.

Path parameters

contactID
string
required
The UUID of the contact whose channel you want to update.

Request body

channel_type
string
required
The type of the channel to update.
channel_id
string
required
The new value for the channel.

Example

curl -X PUT https://api.heymarket.com/v2/contact/a1b2c3d4-e5f6-7890-abcd-ef1234567890/channel \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "channel_type": "email",
    "channel_id": "newemail@example.com"
  }'

GET /v2/contact//channels

Returns all channels attached to a contact.

Path parameters

contactID
string
required
The UUID of the contact whose channels you want to list.

Response

Returns an array of ContactChannel objects.

Example

curl -X GET https://api.heymarket.com/v2/contact/a1b2c3d4-e5f6-7890-abcd-ef1234567890/channels \
  -H "Authorization: Bearer YOUR_API_KEY"
[
  {
    "id": "ch_001",
    "team_id": 1,
    "contact_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "channel_type": "phone",
    "channel_id": "15105553344",
    "created": "2024-01-15T10:00:00Z",
    "updated": "2024-01-15T10:00:00Z"
  },
  {
    "id": "ch_002",
    "team_id": 1,
    "contact_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "channel_type": "email",
    "channel_id": "alice@example.com",
    "created": "2024-01-15T10:05:00Z",
    "updated": "2024-01-15T10:05:00Z"
  }
]

GET /v2/contact//channel/

Returns a specific channel for a contact, identified by channel type.

Path parameters

contactID
string
required
The UUID of the contact.
channelType
string
required
The type of channel to retrieve, for example phone or email.

Example

curl -X GET https://api.heymarket.com/v2/contact/a1b2c3d4-e5f6-7890-abcd-ef1234567890/channel/phone \
  -H "Authorization: Bearer YOUR_API_KEY"

DELETE /v2/contact//channel/

Removes a specific channel from a contact.

Path parameters

contactID
string
required
The UUID of the contact.
channelType
string
required
The type of channel to delete, for example email.

Example

curl -X DELETE https://api.heymarket.com/v2/contact/a1b2c3d4-e5f6-7890-abcd-ef1234567890/channel/email \
  -H "Authorization: Bearer YOUR_API_KEY"
Deleting a channel removes it permanently from the contact. If the contact has only one channel, deleting it may prevent you from messaging that contact.