Keystone Developers
Open Keystone
API reference

Console API

Conversations

3 endpoints.

GET/api/v1/admin/conversations

List conversations

Authentication

Authorization: Bearer <token>.

Parameters

NameInTypeDescription
business_idrequiredquerystring (uuid)

The business whose inbox this is: each item's `contact` is its contact. A business the caller does not belong to is 403.

statusquerystring | null

OPEN | CLOSED | SNOOZED

assigned_toqueryinteger | null
unread_onlyquerybooleandefault false
needs_attentionqueryboolean | null

Only conversations whose contact an open Needs you item is about (true), or not (false).

qquerystring | null

Case-insensitive search over the contact's name, display name, emails and phones (digits alone also match a phone), the web-chat visitor's name and the last message preview, among `business_id`'s contacts.

channelqueryInboxChannel | null

Only conversations with a message on this channel, each read as its newest message there: `last_message_at`, its preview, channel, direction and sender, and the order.

cursorquerystring | null
limitqueryintegerdefault 50

Responses

200Successful Response
application/jsonSuccessResponse_list_ConversationListItem__
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredConversationListItem[]
ConversationListItem[] fields
FieldTypeDescription
idrequiredstring
contact_idstring | null

The business's contact this conversation is with; None for an anonymous web-chat visitor

statusrequiredstring
assigned_tointeger | null
ai_enabledbooleandefault true
last_message_atstring (date-time) | null
last_message_previewstring | null
last_message_channelstring | null
last_message_directionstring | null

INBOUND | OUTBOUND

last_message_sender_typestring | null

CONSUMER | KEYSTONE_USER | AI_AGENT | SYSTEM

last_inbound_channelstring | null

Channel of the contact's latest message

unread_countintegerdefault 0
message_countintegerdefault 0
snoozed_untilstring (date-time) | null
created_atrequiredstring (date-time)
updated_atrequiredstring (date-time)
reply_channelReplyChannelData | null
ReplyChannelData fields

ReplyChannelData (not expanded)

contactConversationContactSummary | null
ConversationContactSummary fields

ConversationContactSummary (not expanded)

metadataResponseMetadata | null
ResponseMetadata fields
FieldTypeDescription
paginationPaginationMetadata | null
PaginationMetadata fields
FieldTypeDescription
limitrequiredinteger
next_cursorstring | null
prev_cursorstring | null
has_morerequiredboolean
has_prevbooleandefault false
total_countinteger | null
status_countsobject | null
object | null fields

Map of string to integer

lifecycle_countsLifecycleCounts | null
LifecycleCounts fields
FieldTypeDescription
allintegerdefault 0
leadintegerdefault 0
prospectintegerdefault 0
customerintegerdefault 0
former_customerintegerdefault 0
classification_countsClassificationCounts | null
ClassificationCounts fields
FieldTypeDescription
signalobject
object fields

Nested object (not expanded)

touchobject
object fields

Nested object (not expanded)

stageobject
object fields

Nested object (not expanded)

metaResponseMeta | null
ResponseMeta fields
FieldTypeDescription
totalinteger | null
total_countinteger | null
pageinteger | null
per_pageinteger | null
  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

GET/api/v1/admin/conversations/{conversation_id}

Get conversation

The conversation as its row in the business's inbox reads (`contact`), with where a reply can go.

Authentication

Authorization: Bearer <token>.

Parameters

NameInTypeDescription
conversation_idrequiredpathstring (uuid)
business_idrequiredquerystring (uuid)

The business whose conversation it is: `contact` is its contact. 403 unless the caller belongs to the business and the conversation is the business's; 404 when there is no such conversation.

Responses

200Successful Response
application/jsonSuccessResponse_ConversationListItem_
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredConversationListItem
ConversationListItem fields

ConversationListItem, expanded above.

metadataResponseMetadata | null
ResponseMetadata fields

ResponseMetadata, expanded above.

metaResponseMeta | null
ResponseMeta fields

ResponseMeta, expanded above.

  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

GET/api/v1/admin/conversations/{conversation_id}/messages

List messages in a conversation

Authentication

Authorization: Bearer <token>.

Parameters

NameInTypeDescription
conversation_idrequiredpathstring (uuid)
channelqueryInboxChannel | null

Only the messages on this channel.

cursorquerystring | null
limitqueryintegerdefault 50

Responses

200Successful Response
application/jsonSuccessResponse_list_MessageData__
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredMessageData[]
MessageData[] fields
FieldTypeDescription
idrequiredstring
conversation_idrequiredstring
directionrequiredstring
sender_typerequiredstring
sender_idstring | null
sender_display_namestring | null
channelrequiredstring
content_typerequiredstring
bodystring | null
attachments(FormSubmissionAttachment | SiteAccountAttachment | MessageAttachment)[]
(FormSubmissionAttachment | SiteAccountAttachment | MessageAttachment)[] fields

Nested object (not expanded)

external_idstring | null
statusrequiredstring
error_codestring | null
error_messagestring | null
ai_metadataobject
created_atrequiredstring (date-time)
delivered_atstring (date-time) | null
read_atstring (date-time) | null
metadataResponseMetadata | null
ResponseMetadata fields

ResponseMetadata, expanded above.

metaResponseMeta | null
ResponseMeta fields

ResponseMeta, expanded above.

  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.