# 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](https://marketplace.zoom.us/user/build) 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)** `object` - **`account_id` (required)** `string` — The account ID. - **`object` (required)** `object` — The session's information - **`session_id` (required)** `string` — The Cobrowse session's ID. - **`start_time` (required)** `string`, format: `date-time` — The session's start time. - **`role_type`** `string`, possible values: `"customer", "agent"` — The joining user's role type. - **`start_url`** `string` — The URL the session started from. - **`user_id`** `string` — 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_name`** `string` — The user's display name. **Example:** ```json { "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](https://marketplace.zoom.us/user/build) 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)** `object` - **`account_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_reason`** `string`, 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_type`** `string`, possible values: `"customer", "agent"` — The joining user's role type. - **`user_name`** `string` — The user's display name. **Example:** ```json { "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](https://marketplace.zoom.us/user/build) 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)** `object` - **`account_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_type`** `string`, possible values: `"customer", "agent"` — The joining user's role type. - **`user_name`** `string` — The user's display name. **Example:** ```json { "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](https://marketplace.zoom.us/user/build) 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)** `object` - **`account_id` (required)** `string` — The account ID. - **`object` (required)** `object` — The session's information - **`end_time` (required)** `string`, format: `date-time` — The Cobrowse session's end time. - **`session_id` (required)** `string` — The Cobrowse session's ID. - **`end_reason`** `string`, possible values: `"The session ended", "Network connection error", "Unknown reason"` — The reason why the user left the session. - **`role_type`** `string`, possible values: `"customer", "agent"` — The joining user's role type. - **`session_pin`** `string` — The Cobrowse session's pin code that can be used to join the session. - **`start_time`** `string`, format: `date-time` — The Cobrowse session's start time. - **`user_id`** `string` — 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_name`** `string` — The user's display name. **Example:** ```json { "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)** `object` - **`account_id` (required)** `string` — The account ID. - **`object` (required)** `object` — The session's information - **`session_id` (required)** `string` — The Cobrowse session's ID. - **`start_time` (required)** `string`, format: `date-time` — The session's start time. - **`role_type`** `string`, possible values: `"customer", "agent"` — The joining user's role type. - **`start_url`** `string` — The URL the session started from. - **`user_id`** `string` — 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_name`** `string` — The user's display name. **Example:** ```json { "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)** `object` - **`account_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_reason`** `string`, 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_type`** `string`, possible values: `"customer", "agent"` — The joining user's role type. - **`user_name`** `string` — The user's display name. **Example:** ```json { "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)** `object` - **`account_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_type`** `string`, possible values: `"customer", "agent"` — The joining user's role type. - **`user_name`** `string` — The user's display name. **Example:** ```json { "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)** `object` - **`account_id` (required)** `string` — The account ID. - **`object` (required)** `object` — The session's information - **`end_time` (required)** `string`, format: `date-time` — The Cobrowse session's end time. - **`session_id` (required)** `string` — The Cobrowse session's ID. - **`end_reason`** `string`, possible values: `"The session ended", "Network connection error", "Unknown reason"` — The reason why the user left the session. - **`role_type`** `string`, possible values: `"customer", "agent"` — The joining user's role type. - **`session_pin`** `string` — The Cobrowse session's pin code that can be used to join the session. - **`start_time`** `string`, format: `date-time` — The Cobrowse session's start time. - **`user_id`** `string` — 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_name`** `string` — The user's display name. **Example:** ```json { "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" } } } ```