Skip to main content
After creating a list you can rename it, add contacts, or remove contacts at any time using PUT /v2/lists/{id}. When you no longer need a list, use DELETE /v2/lists/{id} to remove it permanently.

Update a list

PUT /v2/lists/{id}
id
integer
required
The ID of the list to update.
title
string
New display name for the list.
contacts
integer[]
Replaces the entire member set with the provided contact IDs.
add_contacts
integer[]
Contact IDs to add to the list without affecting existing members.
remove_contacts
integer[]
Contact IDs to remove from the list.
add_phones
string[]
Phone numbers in E.164 format (without leading +) to add to the list.
remove_phones
string[]
Phone numbers in E.164 format (without leading +) to remove from the list.
add_emails
string[]
Email addresses to add to the list.
remove_emails
string[]
Email addresses to remove from the list.

Example

curl --request PUT \
  --url https://api.heymarket.com/v2/lists/42 \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "title": "Updated VIP List",
    "add_contacts": [1004, 1005],
    "remove_contacts": [1001]
  }'
{
  "id": 42,
  "rev": 2
}

Delete a list

DELETE /v2/lists/{id} Permanently removes the list. You can optionally pass a body to remove specific contacts before deletion.
id
integer
required
The ID of the list to delete.
contact_ids
integer[]
Optional. Contact IDs to remove from the list before it is deleted.

Example

curl --request DELETE \
  --url https://api.heymarket.com/v2/lists/42 \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "contact_ids": [1002, 1003]
  }'
{
  "deleted": true,
  "id": 42
}
Deleting a list is permanent and cannot be undone. The contacts themselves are not deleted — only their membership in the list is removed.