Cobrowse SDK Webhooks
- OpenAPI Version:
3.1.1 - API Version:
1.0.0
Servers
- URL:
https://{your-endpoint-url}
Operations
cobrowse.session_started
- Method:
POST - Path:
cobrowse.session_started - Tags: Sessions
The Session Start event is triggered when the first user joins.
Prerequisites
- Enable Event Subscriptions for your Marketplace app with:
- A valid Event Notification Endpoint URL.
- The Start session subscription enabled under the Cobrowse SDK event.
Request Body
Content-Type: application/json
event(required)string, possible values:"cobrowse.session_started"— The name of the event.event_ts(required)integer, format:int64— Timestamp (in milliseconds since epoch) when the event occurred. The value of this field is returned in long (int64) format.payload(required)objectaccount_id(required)string— The account ID.object(required)object— The session's informationsession_id(required)string— The Cobrowse session's ID.start_time(required)string, format:date-time— The session's start time.role_typestring, possible values:"customer", "agent"— The joining user's role type.start_urlstring— The URL the session started from.user_idstring— The ID of the user who started the session. This is a unique ID assigned to the user joining a session and is valid for only that session.user_namestring— The user's display name.
Example:
{
"event": "cobrowse.session_started",
"event_ts": 1,
"payload": {
"account_id": "",
"object": {
"session_id": "",
"start_url": "",
"user_id": "",
"user_name": "",
"role_type": "customer",
"start_time": ""
}
}
}Responses
Status: 200 Successfully received the webhook event.
cobrowse.session_user_left
- Method:
POST - Path:
cobrowse.session_user_left - Tags: Sessions
The Session User Left event is triggered every time a user leaves a session.
Prerequisites
- Enable Event Subscriptions for your Marketplace app with:
- A valid Event Notification Endpoint URL.
- The User left subscription enabled under the Cobrowse SDK event.
Request Body
Content-Type: application/json
event(required)string, possible values:"cobrowse.session_user_left"— The name of the event.event_ts(required)integer, format:int64— Timestamp (in milliseconds since epoch) when the event occurred. The value of this field is returned in long (int64) format.payload(required)objectaccount_id(required)string— The account ID.object(required)object— The session's information.leave_time(required)string, format:date-time— The time when the user left the session.session_id(required)string— The Cobrowse session's ID.user_connection_id(required)string— The connection's ID for each time the user joined the session.user_id(required)string— The user's ID. This is a unique ID assigned to the user joining a session and is valid for only that session.leave_reasonstring, possible values:"Left the session", "Got disconnected from the session", "The session end", "Network connection error", "Unknown reason", default:"Left the session"— The reason why the user left the session.role_typestring, possible values:"customer", "agent"— The joining user's role type.user_namestring— The user's display name.
Example:
{
"event": "cobrowse.session_user_left",
"event_ts": 1,
"payload": {
"account_id": "",
"object": {
"session_id": "",
"user_connection_id": "",
"user_id": "",
"user_name": "",
"role_type": "customer",
"leave_time": "",
"leave_reason": "Left the session"
}
}
}Responses
Status: 200 Successfully received the webhook event.
cobrowse.session_user_joined
- Method:
POST - Path:
cobrowse.session_user_joined - Tags: Sessions
The Session User Joined event is triggered every time a user joins a session.
Prerequisites
- Enable Event Subscriptions for your Marketplace app with:
- A valid Event Notification Endpoint URL.
- The User joined subscription enabled under the Cobrowse SDK event.
Request Body
Content-Type: application/json
event(required)string, possible values:"cobrowse.session_user_joined"— The name of the event.event_ts(required)integer, format:int64— Timestamp (in milliseconds since epoch) when the event occurred. The value of this field is returned in long (int64) format.payload(required)objectaccount_id(required)string— The account ID.object(required)object— The session's information.join_time(required)string, format:date-time— The time when the user joined the session.session_id(required)string— The Cobrowse session's ID.user_connection_id(required)string— The connection's ID for each time the user joined the session.user_id(required)string— The user's ID. This is a unique ID assigned to the user joining a session and is valid for only that session.role_typestring, possible values:"customer", "agent"— The joining user's role type.user_namestring— The user's display name.
Example:
{
"event": "cobrowse.session_user_joined",
"event_ts": 1,
"payload": {
"account_id": "",
"object": {
"session_id": "",
"user_connection_id": "",
"user_id": "",
"user_name": "",
"role_type": "customer",
"join_time": ""
}
}
}Responses
Status: 200 Successfully received the webhook event.
cobrowse.session_ended
- Method:
POST - Path:
cobrowse.session_ended - Tags: Sessions
The Session End event is triggered when someone ends the session, or when all users have left the session.
Prerequisites
- Enable Event Subscriptions for your Marketplace app with:
- A valid Event Notification Endpoint URL.
- The End session subscription enabled under the Cobrowse SDK event.
Request Body
Content-Type: application/json
event(required)string, possible values:"cobrowse.session_ended"— The name of the event.event_ts(required)integer, format:int64— Timestamp (in milliseconds since epoch) when the event occurred. The value of this field is returned in long (int64) format.payload(required)objectaccount_id(required)string— The account ID.object(required)object— The session's informationend_time(required)string, format:date-time— The Cobrowse session's end time.session_id(required)string— The Cobrowse session's ID.end_reasonstring, possible values:"The session ended", "Network connection error", "Unknown reason"— The reason why the user left the session.role_typestring, possible values:"customer", "agent"— The joining user's role type.session_pinstring— The Cobrowse session's pin code that can be used to join the session.start_timestring, format:date-time— The Cobrowse session's start time.user_idstring— The ID of the user who ended the session. This is a unique ID assigned to the user joining a session and is valid for only that session.user_namestring— The user's display name.
Example:
{
"event": "cobrowse.session_ended",
"event_ts": 1,
"payload": {
"account_id": "",
"object": {
"session_id": "",
"session_pin": "",
"user_id": "",
"user_name": "",
"role_type": "customer",
"start_time": "",
"end_time": "",
"end_reason": "The session ended"
}
}
}Responses
Status: 200 Successfully received the webhook event.
Schemas
Cobrowse.session_startedEvent
- Type:
object
event(required)string, possible values:"cobrowse.session_started"— The name of the event.event_ts(required)integer, format:int64— Timestamp (in milliseconds since epoch) when the event occurred. The value of this field is returned in long (int64) format.payload(required)objectaccount_id(required)string— The account ID.object(required)object— The session's informationsession_id(required)string— The Cobrowse session's ID.start_time(required)string, format:date-time— The session's start time.role_typestring, possible values:"customer", "agent"— The joining user's role type.start_urlstring— The URL the session started from.user_idstring— The ID of the user who started the session. This is a unique ID assigned to the user joining a session and is valid for only that session.user_namestring— The user's display name.
Example:
{
"event": "cobrowse.session_started",
"event_ts": 1,
"payload": {
"account_id": "",
"object": {
"session_id": "",
"start_url": "",
"user_id": "",
"user_name": "",
"role_type": "customer",
"start_time": ""
}
}
}Cobrowse.session_user_leftEvent
- Type:
object
event(required)string, possible values:"cobrowse.session_user_left"— The name of the event.event_ts(required)integer, format:int64— Timestamp (in milliseconds since epoch) when the event occurred. The value of this field is returned in long (int64) format.payload(required)objectaccount_id(required)string— The account ID.object(required)object— The session's information.leave_time(required)string, format:date-time— The time when the user left the session.session_id(required)string— The Cobrowse session's ID.user_connection_id(required)string— The connection's ID for each time the user joined the session.user_id(required)string— The user's ID. This is a unique ID assigned to the user joining a session and is valid for only that session.leave_reasonstring, possible values:"Left the session", "Got disconnected from the session", "The session end", "Network connection error", "Unknown reason", default:"Left the session"— The reason why the user left the session.role_typestring, possible values:"customer", "agent"— The joining user's role type.user_namestring— The user's display name.
Example:
{
"event": "cobrowse.session_user_left",
"event_ts": 1,
"payload": {
"account_id": "",
"object": {
"session_id": "",
"user_connection_id": "",
"user_id": "",
"user_name": "",
"role_type": "customer",
"leave_time": "",
"leave_reason": "Left the session"
}
}
}Cobrowse.session_user_joinedEvent
- Type:
object
event(required)string, possible values:"cobrowse.session_user_joined"— The name of the event.event_ts(required)integer, format:int64— Timestamp (in milliseconds since epoch) when the event occurred. The value of this field is returned in long (int64) format.payload(required)objectaccount_id(required)string— The account ID.object(required)object— The session's information.join_time(required)string, format:date-time— The time when the user joined the session.session_id(required)string— The Cobrowse session's ID.user_connection_id(required)string— The connection's ID for each time the user joined the session.user_id(required)string— The user's ID. This is a unique ID assigned to the user joining a session and is valid for only that session.role_typestring, possible values:"customer", "agent"— The joining user's role type.user_namestring— The user's display name.
Example:
{
"event": "cobrowse.session_user_joined",
"event_ts": 1,
"payload": {
"account_id": "",
"object": {
"session_id": "",
"user_connection_id": "",
"user_id": "",
"user_name": "",
"role_type": "customer",
"join_time": ""
}
}
}Cobrowse.session_endedEvent
- Type:
object
event(required)string, possible values:"cobrowse.session_ended"— The name of the event.event_ts(required)integer, format:int64— Timestamp (in milliseconds since epoch) when the event occurred. The value of this field is returned in long (int64) format.payload(required)objectaccount_id(required)string— The account ID.object(required)object— The session's informationend_time(required)string, format:date-time— The Cobrowse session's end time.session_id(required)string— The Cobrowse session's ID.end_reasonstring, possible values:"The session ended", "Network connection error", "Unknown reason"— The reason why the user left the session.role_typestring, possible values:"customer", "agent"— The joining user's role type.session_pinstring— The Cobrowse session's pin code that can be used to join the session.start_timestring, format:date-time— The Cobrowse session's start time.user_idstring— The ID of the user who ended the session. This is a unique ID assigned to the user joining a session and is valid for only that session.user_namestring— The user's display name.
Example:
{
"event": "cobrowse.session_ended",
"event_ts": 1,
"payload": {
"account_id": "",
"object": {
"session_id": "",
"session_pin": "",
"user_id": "",
"user_name": "",
"role_type": "customer",
"start_time": "",
"end_time": "",
"end_reason": "The session ended"
}
}
}