Skip to main content
Use these endpoints to manage the lifecycle state of a conversation. You can mark a conversation as open to bring it back into the active queue, or close it to archive it when the issue is resolved. Both endpoints accept the same request body and return "ok" on success.

POST /v1/conversations/open — mark as open

Marks a conversation as open. You can identify the conversation by its chat_id or by a target phone number within an inbox.

Request body

chat_id
integer
The ID of the conversation to open. Required if target is not provided.
inbox_id
integer
required
The ID of the inbox containing the conversation.
target
string
The contact’s phone number in E.164 format without the leading plus sign (e.g., 14151234567). Required if chat_id is not provided.
targets
string[]
An array of phone numbers for group MMS conversations. For example: ["14155554343", "12158375180"].
user_id
integer
required
The ID of the user performing the open action. This user is recorded as the conversation opener.

Request example

{
  "chat_id": 1,
  "inbox_id": 2,
  "target": "14151234567",
  "user_id": 3
}

Example

curl --request POST \
  --url https://api.heymarket.com/v1/conversations/open \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "chat_id": 9920,
    "inbox_id": 101,
    "user_id": 55
  }'

POST /v1/conversations/close — mark as closed

Marks a conversation as closed (archived). The request body is identical to the open endpoint.

Example

curl --request POST \
  --url https://api.heymarket.com/v1/conversations/close \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "chat_id": 9920,
    "inbox_id": 101,
    "user_id": 55
  }'

Response

Both endpoints return the string "ok" on success.
To mark a conversation as read, send a POST request to /v1/conversations/read with the same body shape: inbox_id, target or targets, and user_id.
To mark a conversation as unread, send a POST request to /v1/conversations/unread with the same body shape: inbox_id, target or targets, and user_id.