Skip to main content
POST
Create a session comment

Internal notes

Session comments are internal notes: agents see them in the inbox, the customer never does. A comment can be anchored two ways:
  • Attached to a message — pass thread_id, the UUID of the message being commented on. Message UUIDs come from Session History, where each event’s id is its message UUID.
  • Session-level — omit thread_id. The note stands on its own in the session timeline, not attached to any message.
agent_id is the numeric ID of the team member authoring the note.

HTML in a note

content can be plain text or HTML. A session-level note renders its HTML in the inbox: tables, callouts, status chips, buttons and collapsible sections, in your workspace’s own styling. See Write a comment in HTML for what renders and what is ignored. A comment attached to a message (thread_id) is shown as plain text. Escape any customer text you place inside the HTML (&, <, >), so it shows as text.

Retrieving comments

Comments are part of the session timeline, so there is no separate list endpoint. Use Session History and filter for events where event.type is human_agent_comment. Each one carries the author (human_agent_id), the text (content.text), and the thread it belongs to (comment_thread_id).

Deep linking

You can link agents straight to a message or note in the dashboard inbox:
  • To a message: https://platform.open.cx/inbox/?s=<session_id>&h=<message_uuid>
  • To a comment on a message: https://platform.open.cx/inbox/?s=<session_id>&thread=<thread_id>&comment=<comment_uuid> — thread_id is the message the comment is attached to, and comment_uuid is the uuid returned when the comment is created.
  • To a session-level comment: https://platform.open.cx/inbox/?s=<session_id>&comment=<comment_uuid>&h=<comment_uuid> — the note is its own timeline row, so h targets the note itself.
The inbox opens the session and scrolls to the target.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

session_id
string
required

The unique identifier of the chat session

Body

application/json
content
string
required

Comment content: plain text or HTML. A session-level note renders its HTML in the inbox (tables, lists, callouts, status chips, link and copy buttons, collapsible sections); a comment attached to a message shows as plain text. Escape customer text placed inside HTML so it shows as text.

Minimum string length: 1
agent_id
integer
required

Agent user ID that authors the comment

Required range: x <= 9007199254740991
thread_id
string<uuid>

Message UUID to attach the comment to. Omit to create a session-level note (not attached to any message).

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
attachments
object[]

Response

Default Response

id
number
required
uuid
string
required
session_id
string
required
type
enum<string>
required
Available options:
agent_assigned_by_integration,
agent_assigned_by_system,
agent_assigned_by_user,
agent_changed,
agent_comment,
agent_initiated_session,
agent_joined,
agent_message,
agent_message_deleted_by_agent,
agent_reopened_session,
agent_took_session_from_ai,
agent_unassigned_by_integration,
agent_unassigned_by_system,
agent_unassigned_by_user,
ai_assumed_the_session_resolved,
ai_decided_to_not_reply,
ai_decided_to_resolve_the_issue,
ai_follow_up_cancelled,
ai_follow_up_fired,
ai_follow_up_scheduled,
ai_reopened_session,
ai_response_cancelled,
ai_resumed_by_system,
ai_services_paused_handoff,
ai_suggestion,
call_history,
call_transferred,
ces_request_cancelled,
ces_requested,
ces_submitted,
closed_resolved_by_agent,
closed_resolved_by_api,
closed_resolved_by_contact,
closed_resolved_by_integration,
closed_resolved_by_system,
closed_unresolved_by_agent,
closed_unresolved_by_api,
closed_unresolved_by_system,
contact_data_updated,
csat_request_cancelled,
csat_requested,
csat_submitted,
email_draft_message,
handoff,
handoff_to_salesforce_miaw,
handoff_to_third_party_failed,
handoff_to_zendesk,
integration_reopened_session,
ivr_selection,
journey_step_by_integration,
merged_session_message,
message,
nps_request_cancelled,
nps_requested,
nps_submitted,
pii_attachment_removed,
primary_contact_changed,
prohibited_topic_detected,
quoted_content_modified,
salesforce_fields_updated,
sequence_message,
session_erased_by_system_due_to_retention_threshold,
session_forwarded,
session_language_changed_by_agent,
session_language_changed_by_api,
session_language_changed_by_integration,
session_language_changed_by_system,
session_merged,
session_priority_changed_by_agent,
session_priority_changed_by_system,
session_snoozed,
session_subject_changed_by_agent,
session_subject_changed_by_system,
session_unsnoozed,
skills_added_by_system,
sla_applied_by_agent,
sla_applied_by_system,
sla_first_reply_breached,
sla_first_reply_completed_after_breach,
sla_first_reply_fulfilled,
sla_first_reply_metric_started,
sla_freezed_office_hours_ended,
sla_freezed_snoozed,
sla_next_reply_breached,
sla_next_reply_completed_after_breach,
sla_next_reply_fulfilled,
sla_next_reply_metric_started,
sla_removed_by_agent,
sla_removed_by_system,
sla_resolution_breached,
sla_resolution_completed_after_breach,
sla_resolution_fulfilled,
sla_resolution_metric_started,
sla_resolution_paused_resolved,
sla_resolution_paused_waiting_on_customer,
sla_resolution_resumed_customer_replied,
sla_resolution_resumed_reopened,
sla_resumed_office_hours_started,
sla_resumed_snooze_cancelled,
sla_resumed_snooze_expired,
state_checkpoint,
sub_session_created,
sub_session_linked_by_agent,
sub_session_linked_by_api,
sub_session_linked_by_integration,
sub_session_linked_by_system,
sub_session_unlinked_by_agent,
sub_session_unlinked_by_api,
sub_session_unlinked_by_integration,
sub_session_unlinked_by_system,
sub_status_removed_by_agent,
sub_status_removed_by_api,
sub_status_removed_by_integration,
sub_status_removed_by_system,
sub_status_set_by_agent,
sub_status_set_by_api,
sub_status_set_by_integration,
sub_status_set_by_system,
system_reopened_session,
tag_added_by_agent,
tag_added_by_api,
tag_added_by_integration,
tag_added_by_system,
tag_removed_by_agent,
tag_removed_by_api,
tag_removed_by_integration,
tag_removed_by_system,
team_assigned_by_integration,
team_assigned_by_system,
team_assigned_by_user,
team_unassigned_by_integration,
team_unassigned_by_system,
team_unassigned_by_user,
user_confirmed_the_session_resolved,
voice_call_ai_joined,
voice_call_ai_left,
voice_call_contact_answered,
voice_call_contact_joined,
voice_call_contact_left,
voice_call_ended,
voice_call_failed_to_start,
voice_call_human_answered,
voice_call_human_joined,
voice_call_human_left,
voice_call_started,
workflow_message,
workflow_note,
workflow_triggered
chatbot_id
string | null
from_user
boolean | null
message
string | null
original_message
string | null
original_language
string | null
translated_message
string | null
translated_language
string | null
created_at
string<date-time> | null
updated_at
string<date-time> | null
debug_json
object
knowledgebase_called
boolean | null
ivr_selection
object | null
extra_params
object | null
message_options
object | null
agent_id
number | null
agent_name
string | null
agent_avatar
string | null
handoff_happened_during_office_hours
boolean | null
sender_display_name
string | null
plan_executed
boolean | null
contact_id
string | null
contact_name
string | null
contact_avatar_url
string | null
contact_source
enum<string> | null
Available options:
csv,
form,
freshchat,
hubspot,
intercom,
outbound,
pipedream,
salesforce,
slack
contact_slack_data
string | null
attachments
object[] | null
email_rfc_message_id
string | null
email_to
string[] | null
email_cc
string[] | null
external_message_id
string | null
email_last_seen_at
string<date-time> | null
email_read_receipts_enabled
boolean
csat_score
number | null
csat_feedback
string | null
state_checkpoint_payload
unknown
client_context
object | null
workflow_id
string | null
workflow_run_id
string | null
sequence_id
string | null
whatsapp_template_name
string | null
whatsapp_template_snapshot
object | null
from_opencx_public_api
boolean | null
sub_status_id
string | null
whatsapp_sent_at
string<date-time> | null
whatsapp_delivered_at
string<date-time> | null
whatsapp_read_at
string<date-time> | null
whatsapp_failed_at
string<date-time> | null
whatsapp_error_title
string | null
whatsapp_error_details
string | null
twitter_sent_at
string<date-time> | null
twitter_read_at
string<date-time> | null
twitter_failed_at
string<date-time> | null
twitter_error_title
string | null
twitter_error_details
string | null
sms_failed_at
string<date-time> | null
sms_error_code
string | null
session_closed_payload
any
agent_changed_payload
object
comment_thread_id
string | null
edited_at
string<date-time> | null
deleted_at
string<date-time> | null
phone_call_id
string | null
phone_call
object | null
quoted_message
object | null