Channels
Methods in this section: 2. All methods
GET /channels/{id}/widget Available
#Get chat widget settings
Appearance of the chat widget of your web_chat channel: assistant, operator queue, attribution, visitor files, color and more. A channel of another type or another account — not_found.
- Scopes
channels:read
- Rate limit
- read
- Idempotency
- not required
- Successful response
200 Widget settings.
Parameters
| Field | Type | Description |
|---|
id | string required | In: path. The web_chat channel id. |
Response body
| Field | Type | Description |
|---|
channel_id | string required | The web_chat channel id. |
name | string required | Channel name. |
is_active | boolean required | The channel is active. |
assistant_name | string required, may be null | Assistant name in the header; defaults to the channel name. Up to 60 characters. |
assistant_subtitle | string required, may be null | Assistant subtitle. Up to 80 characters. |
assistant_avatar_url | string required, may be null | Assistant icon (header and feed). Only https:// or a path on this cell starting with "/". Up to 500 characters. |
queue_title | string required, may be null | Header title while the conversation waits for an operator. Up to 60 characters. |
queue_subtitle | string required, may be null | Subtitle while waiting for an operator. Up to 80 characters. |
queue_icon_url | string required, may be null | Icon while waiting for an operator. Only https:// or a path on this cell starting with "/". Up to 500 characters. |
powered_by | ChannelWidgetPoweredBy required | |
files | ChannelWidgetFiles required | |
color | string required, may be null | Widget color: #rrggbb. |
greeting | string required, may be null | Greeting. Up to 500 characters. |
position | string required, may be null | Launcher corner. Values: bottom-right bottom-left |
theme | string required, may be null | Theme. Values: light dark |
bubble_text | string required, may be null | Launcher hint text. Up to 60 characters. |
delay | integer required, may be null | Display delay, seconds. |
consent_text | string required, may be null | Consent text before the first message. Up to 600 characters. |
consent_url | string required, may be null | Link to the consent document: https:// only. |
Examples
Request
curl -X GET 'https://wfacademy.id/api/public/v1/channels/EXAMPLE_ID/widget' \
-H 'Authorization: Bearer '"$API_KEY"
Response 200
{
"channel_id": "EXAMPLE_ID",
"name": "string",
"is_active": false,
"assistant_name": "string",
"assistant_subtitle": "string",
"assistant_avatar_url": "https://example.com/hooks/sapport",
"queue_title": "string",
"queue_subtitle": "string",
"queue_icon_url": "https://example.com/hooks/sapport",
"powered_by": {
"mode": "default",
"text": "string",
"url": "https://example.com/hooks/sapport"
},
"files": {
"visitor_upload": false,
"max_mb": 1
},
"color": "string",
"greeting": "string",
"position": "bottom-right",
"theme": "light",
"bubble_text": "string",
"delay": 0,
"consent_text": "string",
"consent_url": "https://example.com/hooks/sapport"
}
Error example
{
"type": "https://wfacademy.id/developers/errors#scope_missing",
"title": "Scope is missing",
"status": 403,
"code": "scope_missing",
"detail": "EXAMPLE",
"request_id": "req_EXAMPLE"
}
Examples are illustrative: the key in them is a placeholder (EXAMPLE), field values are made up.
Possible errors
invalid_api_key wrong_cell integration_inactive tenant_inactive ip_not_allowed feature_not_in_plan rate_limited wallet_suspended service_unavailable internal_error scope_missing not_found
PATCH /channels/{id}/widget Available
#Update chat widget settings
The same checks as in the dashboard: color #rrggbb, image URLs https:// or a path on your site only, field lengths; a failure is validation_failed with field errors. The change is recorded in the audit log.
- Scopes
channels:write
- Rate limit
- write
- Idempotency
- not required
- Successful response
200 Settings after the update.
Parameters
| Field | Type | Description |
|---|
id | string required | In: path. The web_chat channel id. |
Request body The fields to change.
| Field | Type | Description |
|---|
assistant_name | string optional, may be null | Assistant name in the header; defaults to the channel name. Up to 60 characters. |
assistant_subtitle | string optional, may be null | Assistant subtitle. Up to 80 characters. |
assistant_avatar_url | string optional, may be null | Assistant icon (header and feed). Only https:// or a path on this cell starting with "/". Up to 500 characters. |
queue_title | string optional, may be null | Header title while the conversation waits for an operator. Up to 60 characters. |
queue_subtitle | string optional, may be null | Subtitle while waiting for an operator. Up to 80 characters. |
queue_icon_url | string optional, may be null | Icon while waiting for an operator. Only https:// or a path on this cell starting with "/". Up to 500 characters. |
powered_by | ChannelWidgetPoweredBy optional, may be null | |
files | object optional, may be null | |
files.visitor_upload | boolean optional | Visitors may send files. Default true. |
files.max_mb | integer optional | Per-file limit, MB (1–10). |
color | string optional, may be null | Widget color: #rrggbb. |
greeting | string optional, may be null | Greeting. Up to 500 characters. |
position | string optional, may be null | Launcher corner. Values: bottom-right bottom-left |
theme | string optional, may be null | Theme. Values: light dark |
bubble_text | string optional, may be null | Launcher hint text. Up to 60 characters. |
delay | integer optional, may be null | Display delay, seconds. |
consent_text | string optional, may be null | Consent text before the first message. Up to 600 characters. |
consent_url | string optional, may be null | Link to the consent document: https:// only. |
Response body
| Field | Type | Description |
|---|
channel_id | string required | The web_chat channel id. |
name | string required | Channel name. |
is_active | boolean required | The channel is active. |
assistant_name | string required, may be null | Assistant name in the header; defaults to the channel name. Up to 60 characters. |
assistant_subtitle | string required, may be null | Assistant subtitle. Up to 80 characters. |
assistant_avatar_url | string required, may be null | Assistant icon (header and feed). Only https:// or a path on this cell starting with "/". Up to 500 characters. |
queue_title | string required, may be null | Header title while the conversation waits for an operator. Up to 60 characters. |
queue_subtitle | string required, may be null | Subtitle while waiting for an operator. Up to 80 characters. |
queue_icon_url | string required, may be null | Icon while waiting for an operator. Only https:// or a path on this cell starting with "/". Up to 500 characters. |
powered_by | ChannelWidgetPoweredBy required | |
files | ChannelWidgetFiles required | |
color | string required, may be null | Widget color: #rrggbb. |
greeting | string required, may be null | Greeting. Up to 500 characters. |
position | string required, may be null | Launcher corner. Values: bottom-right bottom-left |
theme | string required, may be null | Theme. Values: light dark |
bubble_text | string required, may be null | Launcher hint text. Up to 60 characters. |
delay | integer required, may be null | Display delay, seconds. |
consent_text | string required, may be null | Consent text before the first message. Up to 600 characters. |
consent_url | string required, may be null | Link to the consent document: https:// only. |
Examples
Request
curl -X PATCH 'https://wfacademy.id/api/public/v1/channels/EXAMPLE_ID/widget' \
-H 'Authorization: Bearer '"$API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"assistant_name": "string",
"assistant_subtitle": "string",
"assistant_avatar_url": "https://example.com/hooks/sapport",
"queue_title": "string",
"queue_subtitle": "string",
"queue_icon_url": "https://example.com/hooks/sapport",
"powered_by": {
"mode": "default",
"text": null,
"url": null
},
"files": {
"visitor_upload": false,
"max_mb": 1
},
"color": "string",
"greeting": "string",
"position": "bottom-right",
"theme": "light",
"bubble_text": "string",
"delay": 0,
"consent_text": "string",
"consent_url": "https://example.com/hooks/sapport"
}'
Response 200
{
"channel_id": "EXAMPLE_ID",
"name": "string",
"is_active": false,
"assistant_name": "string",
"assistant_subtitle": "string",
"assistant_avatar_url": "https://example.com/hooks/sapport",
"queue_title": "string",
"queue_subtitle": "string",
"queue_icon_url": "https://example.com/hooks/sapport",
"powered_by": {
"mode": "default",
"text": "string",
"url": "https://example.com/hooks/sapport"
},
"files": {
"visitor_upload": false,
"max_mb": 1
},
"color": "string",
"greeting": "string",
"position": "bottom-right",
"theme": "light",
"bubble_text": "string",
"delay": 0,
"consent_text": "string",
"consent_url": "https://example.com/hooks/sapport"
}
Error example
{
"type": "https://wfacademy.id/developers/errors#scope_missing",
"title": "Scope is missing",
"status": 403,
"code": "scope_missing",
"detail": "EXAMPLE",
"request_id": "req_EXAMPLE"
}
Examples are illustrative: the key in them is a placeholder (EXAMPLE), field values are made up.
Possible errors
invalid_api_key wrong_cell integration_inactive tenant_inactive ip_not_allowed feature_not_in_plan rate_limited wallet_suspended service_unavailable internal_error scope_missing not_found bad_request validation_failed payload_too_large