Edit a Live Chat Channel
Edit a Live Chat channel.
Request URL
POST {base_url}/{api_path}/message_channel/updatelivechat?access_token={access_token}
Request parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| id | Yes | Integer | The unique ID of the Live Chat channel. Note: You can query the Live Chat channel ID
using Search Specific Message Channels. |
| name | No | String | Name of the message channel. Note: The
length must not exceed 63 characters. |
| website_domain | No | String | The domain name of the website where the Live Chat channel
will be embedded. Note: The length must not
exceed 1023 characters. |
| communication_method | No | Integer | The interaction mode supported on the Live Chat
widget. Valid value:
|
| destination_type | No | String | The type of the destination. Valid value:
|
| destination_id | No | Integer | The ID of the destination. Note:
|
| enable_webrtc_inbound_call | No | Integer | Whether to enable WebRTC inbound call, so that website
visitors can make calls through the Live Chat
channel. Valid value:
|
| webrtc_trunk_id | No | Integer | The ID of the WebRTC
trunk. Note:
|
| webrtc_inbound_route_id | No | Integer | The ID of the inbound route associated with the WebRTC trunk.
Note:
|
| max_concurrent_call | No | Integer | Set the maximum number of concurrent calls supported on the
Live Chat channel. Valid value: 1 - 10. |
| message_type | No | Integer | The message type that website visitors can send. Valid
value:
|
| auto_close_session | No | Integer | Whether to close messaging sessions automatically after a
specified period of inactivity. Valid value:
|
| session_expired_time | No | Integer | The duration of inactivity after which a session is automatically closed. |
| session_expired_unit | No | String | Specify the time unit for session expiration. Note: This parameter is REQUIRED when
Valid value:auto_close_session is set to
1.
|
| theme_mode | No | String | Theme mode of the Live Chat widget. Valid value:
|
| theme_color | No | String | Theme color of the Live Chat widget. Valid value:
6-digit hexadecimal RGB color value. E.g.
|
| minimize_style | No | String | The style of the minimized window. Valid value:
|
| chat_icon | No | String | Chat icon of the Live Chat widget. Valid value:
|
| default_avatar | No | String | The file name (ID) of the agent avatar. Note: To use a custom avatar, upload
the avatar image first, then enter the
file parameter value returned by the
upload API in this field. |
| default_agent_name | No | String | Agent name. Note: The
length must not exceed 63 characters.
|
| show_agent_info | No | Integer | Whether to display the agent information. Valid
value:
|
| hide_provider_info | No | Integer | Whether to display the service provider's information
Powered by Yeastar in the Live Chat
widget.Valid value:
|
| language | No | String | Specify the display language of the Live Chat
channel. Valid value:
|
| enable_prechat_form | No | Integer | Whether to enable pre-chat form. Valid value:
|
| prechat_form_title | No | String | The title of the pre-chat form. Note: This parameter is REQUIRED when
enable_prechat_form is set to
1. |
| prechat_form_subtitle | No | String | The sub-title of the pre-chat form. Note: This parameter is REQUIRED when
enable_prechat_form is set to
1. |
| show_name | No | Integer | Whether to display name field in the pre-chat form. Note: When
enable_prechat_form is set to
1, at least one of
show_name, show_email,
or show_phone must be set to
1.Valid value:
|
| show_email | No | Integer | Whether to display email address field in the pre-chat form. Note: When
enable_prechat_form is set to
1, at least one of
show_name, show_email,
or show_phone must be set to
1.Valid value:
|
| show_phone | No | Integer | Whether to display phone number field in the pre-chat form. Note: When
enable_prechat_form is set to
1, at least one of
show_name, show_email,
or show_phone must be set to
1.Valid value:
|
| require_name | No | Integer | Whether name is required in the pre-chat form. Valid
value:
|
| require_email | No | Integer | Whether email address is required in the pre-chat form.
Valid value:
|
| require_phone | No | Integer | Whether phone number is required in the pre-chat form.
Valid value:
|
| enable_data_privacy | No | Integer | Whether to enable the data privacy statement. Valid
value:
|
| data_privacy_content | No | String | The content of the data privacy statement. Note:
|
| require_data_privacy_consent | No | Integer | Whether explicit consent to the data privacy statement is
required. Valid value:
|
| online_welcome_message | No | String | The welcome message automatically sent to website visitors
when they enter the chat widget while the system is within
business hours and the message destination is available. Note: The length must not exceed 255
characters. |
| offline_welcome_message | No | String | The welcome message automatically sent to website visitors
when they enter the chat widget while the system is outside
business hours, or the message destination is not
available. Note: The length must not exceed 255
characters. |
| first_reply_message | No | String | The message automatically sent after the website visitor
sends their first message, regardless of message type. Note: The length must not exceed 255
characters. |
| session_closed_message | No | String | The message automatically sent to website visitors when the
chat session ends, either manually closed by agent / website
visitor or automatically closed when session timeout is
reached. Note: The length must not exceed 255
characters. |
Response parameters
| Parameter | Type | Description |
|---|---|---|
| errcode | Integer | Returned error code.
Note: You can check the error code and
error message in Error Code and Error Message.
|
| errmsg | String | Returned message.
|
Examples
Request example
Update the agent avatar of a Live Chat channel (ID: 266).
POST /openapi/v1.0/message_channel/updatelivechat?access_token=rkM38ZxbNvhdXtGGyD37e4PlLEVrbcxB HTTP/1.1
Host: yeastardocs.example.yeastarcloud.com
Content-Type: application/json
{
"id": 266,
"default_avatar":"livechat-a827b53f-9c51-4778-82e0-5afe2b174656"
}
Response example
HTTP/1.1 200 OK
{
"errcode": 0,
"errmsg": "SUCCESS"
}