From b380347564d156dae43d69cfa48611c4675e16fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20P=2E=20Michalik?= Date: Tue, 28 Oct 2025 12:47:28 +0100 Subject: [PATCH 1/3] AC-1385: allowed domains --- src/pages/management/changelog/index.mdx | 7 + .../configuration-api/v3.7/index.mdx | 153 ++++++++++++++++++ 2 files changed, 160 insertions(+) diff --git a/src/pages/management/changelog/index.mdx b/src/pages/management/changelog/index.mdx index a1721b455..59044427e 100644 --- a/src/pages/management/changelog/index.mdx +++ b/src/pages/management/changelog/index.mdx @@ -22,6 +22,13 @@ The developer preview version provides a preview of the upcoming changes to the ## [v3.7] - Developer preview +### Allowed Domains + +- Added allowed domains management methods: + - [**Add Allowed Domain**](/management/configuration-api/v3.7#add-allowed-domain) + - [**List Allowed Domains**](/management/configuration-api/v3.7#list-allowed-domains) + - [**Delete Allowed Domain**](/management/configuration-api/v3.7#delete-allowed-domain) + ### Canned responses - Added canned response management methods: diff --git a/src/pages/management/configuration-api/v3.7/index.mdx b/src/pages/management/configuration-api/v3.7/index.mdx index 18c9d6d75..efdbfdef8 100644 --- a/src/pages/management/configuration-api/v3.7/index.mdx +++ b/src/pages/management/configuration-api/v3.7/index.mdx @@ -35,6 +35,7 @@ All configurations set by this API will have action in system after max 2 minute | | | | -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Agents** | [`create_agent`](#create-agent) [`get_agent`](#get-agent) [`list_agents`](#list-agents) [`update_agent`](#update-agent) [`delete_agent`](#delete-agent) [`suspend_agent`](#suspend-agent) [`unsuspend_agent`](#unsuspend-agent) [`request_agent_unsuspension`](#request-agent-unsuspension) [`approve_agent`](#approve-agent) | +| **Allowed Domains** | [`add_allowed_domain`](#add-allowed-domain) [`list_allowed_domains`](#list-allowed-domains) [`delete_allowed_domain`](#delete-allowed-domain) | | **Auto access** | [`add_auto_access`](#add-auto-access) [`list_auto_access`](#list-auto-access) [`delete_auto_access`](#delete-auto-access) [`update_auto_access`](#update-auto-access) | | **Bots** | [`create_bot_template`](#create-bot-template) [`create_bot`](#create-bot) [`delete_bot_template`](#delete-bot-template) [`delete_bot`](#delete-bot) [`update_bot_template`](#update-bot-template) [`update_bot`](#update-bot) [`list_bot_templates`](#list-bot-templates) [`get_bot`](#get-bot) [`list_bots`](#list-bots) [`issue_bot_token`](#issue-bot-token) [`reset_bot_template_secret`](#reset-bot-template-secret) [`reset_bot_secret`](#reset-bot-secret) | | **Customer bans** | [`list_customer_bans`](#list-customer-bans) [`unban_customer`](#unban-customer) | @@ -836,6 +837,158 @@ curl -X POST \ +# Allowed Domains + +**Allowed Domains** is a security feature that enables you to restrict which domains can embed your chat widget. By configuring allowed domains, you can prevent unauthorized websites from using your LiveChat license. Only domains explicitly added to the allowed list will be able to display and use your chat widget. + +## Methods + +
+ + + +### Add Allowed Domain + +Adds a new domain to the allowed domains list. + +#### Specifics + +| | | +| -------------------------------- | ---------------------------------------------------------------------------- | +| Method URL | `https://api.livechatinc.com/v3.7/configuration/action/add_allowed_domain` | +| Required scopes | `domain_manage` | +| [Batch support](#batch-requests) | No | + +| Parameter | Required | Data type | Notes | +| --------- | -------- | --------- | ------------------------------------------------- | +| `domain` | Yes | `string` | Domain name to allow (max 255 characters) | + + + + + + + +```shell +curl -X POST \ + https://api.livechatinc.com/v3.7/configuration/action/add_allowed_domain \ + -H 'Content-Type: application/json' \ + -H 'Authorization: Bearer ' \ + -d '{ + "domain": "example.com" + }' +``` + + + + + +```json +{} +``` + + + + + +
+ +
+ + + +### List Allowed Domains + +Returns all domains currently allowed to embed your chat widget. + +#### Specifics + +| | | +| -------------------------------- | ------------------------------------------------------------------------------ | +| Method URL | `https://api.livechatinc.com/v3.7/configuration/action/list_allowed_domains` | +| Required scopes | `domain_manage` | +| [Batch support](#batch-requests) | No | + + + + + + + +```shell +curl -X POST \ + https://api.livechatinc.com/v3.7/configuration/action/list_allowed_domains \ + -H 'Content-Type: application/json' \ + -H 'Authorization: Bearer ' \ + -d '{}' +``` + + + + + +```json +{ + "domains": [ + "example.com", + "subdomain.example.com", + "another-domain.com" + ] +} +``` + + + + + +
+ +
+ + + +### Delete Allowed Domain + +Removes a domain from the allowed domains list. + +#### Specifics + +| | | +| -------------------------------- | ------------------------------------------------------------------------------- | +| Method URL | `https://api.livechatinc.com/v3.7/configuration/action/delete_allowed_domain` | +| Required scopes | `domain_manage` | +| [Batch support](#batch-requests) | No | + +| Parameter | Required | Data type | Notes | +| --------- | -------- | --------- | -------------------------------- | +| `domain` | Yes | `string` | Domain name to remove | + +#### Response + +No response payload (`200 OK`). + + + + + + + +```shell +curl -X POST \ + https://api.livechatinc.com/v3.7/configuration/action/delete_allowed_domain \ + -H 'Content-Type: application/json' \ + -H 'Authorization: Bearer ' \ + -d '{ + "domain": "example.com" + }' +``` + + + + + +
+ # Auto access **Auto access** allows you to assign groups to a thread that will be created when a customer starts a chat. Those groups are From 228c1d6f0c200db176a0e1debc3289ca7880134e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20P=2E=20Michalik?= Date: Tue, 28 Oct 2025 13:31:24 +0100 Subject: [PATCH 2/3] visitor domains report --- src/pages/data-reporting/changelog/index.mdx | 6 ++ .../data-reporting/reports-api/v3.7/index.mdx | 84 +++++++++++++++++++ 2 files changed, 90 insertions(+) diff --git a/src/pages/data-reporting/changelog/index.mdx b/src/pages/data-reporting/changelog/index.mdx index f3c251fa3..d5585c1da 100644 --- a/src/pages/data-reporting/changelog/index.mdx +++ b/src/pages/data-reporting/changelog/index.mdx @@ -19,6 +19,12 @@ The developer preview version provides a preview of the upcoming changes to the +## [v3.7] - Developer Preview + +### Stats + +- There's a new method, [**Visitor Domains**](/data-reporting/reports-api/v3.7/#visitor-domains), which returns the top domains from which visitors accessed your website, along with their page view counts. + ## [v3.6] - 2025-08-07 - There's a new method, [**Unique Visitors**](/data-reporting/reports-api/#unique-visitors), which returns the total number of page views and unique visitors during the specified period. diff --git a/src/pages/data-reporting/reports-api/v3.7/index.mdx b/src/pages/data-reporting/reports-api/v3.7/index.mdx index f246ac2c6..721f5c623 100644 --- a/src/pages/data-reporting/reports-api/v3.7/index.mdx +++ b/src/pages/data-reporting/reports-api/v3.7/index.mdx @@ -59,6 +59,7 @@ You can authorize your calls to the Reports API using one of the following metho | **Agents** | [`availability`](#availability) [`performance`](#performance) | | **Customers** | [`unique_visitors`](#unique-visitors) [`queued_visitors`](#queued-visitors) [`queued_visitors_left`](#queued-visitors-left) | | **Tags** | [`chat_usage`](#chat-usage) | +| **Stats** | [`visitor_domains`](#visitor-domains) | ## Available parameters and filters @@ -1202,6 +1203,89 @@ https://api.livechatinc.com/v3.7/reports/tags/chat_usage \ +## Stats + +
+ + +### Visitor Domains + +Returns the top domains from which visitors accessed your website, along with their page view counts. + +#### Specifics + +| | | +| ------------------- | ------------------------------------------------------------------ | +| **Method URL** | `https://api.livechatinc.com/v3.7/reports/stats/visitor_domains` | +| **HTTP method** | POST, GET | +| **Required scopes** | `reports_read` | + +#### Request + +| Parameter | Required | Data type | Notes | +| -------------- | -------- | --------- | ----------------------------------------------------------------------------------------------------- | +| `filters` | No | `object` | If none provided, your report will span last seven days. | +| `filters.from` | No | `string` | Filters visits within specified time range. See [format reference](#available-parameters-and-filters). | +| `filters.to` | No | `string` | Filters visits within specified time range. See [format reference](#available-parameters-and-filters). | + +#### Response + +| Field | Notes | +| -------------------------- | ---------------------------------------------------------- | +| `name` | Report name: `visitor-domains-report`. | +| `summary` | Map of domain names with their page view counts. | +| `summary.` | Number of page views from the specified domain. | + +#### Notes + +- Returns up to 100 domains with the highest page view counts + + + + + + + + +```shell +curl -X POST \ +https://api.livechatinc.com/v3.7/reports/stats/visitor_domains \ + -H 'Content-Type: application/json' \ + -H 'Authorization: Bearer ' \ + -d '{ + "filters": { + "from": "2024-10-01T00:00:00-00:00", + "to": "2024-10-07T23:59:59-00:00" + } + }' +``` + + + + + + + + +```json +{ + "name": "visitor-domains-report", + "summary": { + "example.com": 1523, + "another-site.org": 847, + "customer-portal.net": 612, + "shop.example.com": 458, + "blog.example.com": 234 + } +} +``` + + + + + +
+ # Contact us If you found a bug or a typo, you can create an issue on [GitHub](https://github.com/livechat/livechat-public-docs/). In case of any questions or feedback, don't hesitate to contact us at [developers@text.com](mailto:developers@text.com) From 74683e66042926d5a8ae6c75a019283109a13a06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?xi=C4=85=C5=BCe=20=C5=81ukasz=20P=2E=20Michalik?= Date: Fri, 31 Oct 2025 09:35:41 +0100 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: oliwiapolec <54406259+oliwiapolec@users.noreply.github.com> --- src/pages/data-reporting/reports-api/v3.7/index.mdx | 4 +--- src/pages/management/configuration-api/v3.7/index.mdx | 10 +++++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/pages/data-reporting/reports-api/v3.7/index.mdx b/src/pages/data-reporting/reports-api/v3.7/index.mdx index 721f5c623..5935d9407 100644 --- a/src/pages/data-reporting/reports-api/v3.7/index.mdx +++ b/src/pages/data-reporting/reports-api/v3.7/index.mdx @@ -1210,7 +1210,7 @@ https://api.livechatinc.com/v3.7/reports/tags/chat_usage \ ### Visitor Domains -Returns the top domains from which visitors accessed your website, along with their page view counts. +Returns up to 100 domains from which visitors access your website, ranked by page view count. #### Specifics @@ -1236,9 +1236,7 @@ Returns the top domains from which visitors accessed your website, along with th | `summary` | Map of domain names with their page view counts. | | `summary.` | Number of page views from the specified domain. | -#### Notes -- Returns up to 100 domains with the highest page view counts diff --git a/src/pages/management/configuration-api/v3.7/index.mdx b/src/pages/management/configuration-api/v3.7/index.mdx index efdbfdef8..15a5e8d8d 100644 --- a/src/pages/management/configuration-api/v3.7/index.mdx +++ b/src/pages/management/configuration-api/v3.7/index.mdx @@ -35,7 +35,7 @@ All configurations set by this API will have action in system after max 2 minute | | | | -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Agents** | [`create_agent`](#create-agent) [`get_agent`](#get-agent) [`list_agents`](#list-agents) [`update_agent`](#update-agent) [`delete_agent`](#delete-agent) [`suspend_agent`](#suspend-agent) [`unsuspend_agent`](#unsuspend-agent) [`request_agent_unsuspension`](#request-agent-unsuspension) [`approve_agent`](#approve-agent) | -| **Allowed Domains** | [`add_allowed_domain`](#add-allowed-domain) [`list_allowed_domains`](#list-allowed-domains) [`delete_allowed_domain`](#delete-allowed-domain) | +| **Allowed domains** | [`add_allowed_domain`](#add-allowed-domain) [`list_allowed_domains`](#list-allowed-domains) [`delete_allowed_domain`](#delete-allowed-domain) | | **Auto access** | [`add_auto_access`](#add-auto-access) [`list_auto_access`](#list-auto-access) [`delete_auto_access`](#delete-auto-access) [`update_auto_access`](#update-auto-access) | | **Bots** | [`create_bot_template`](#create-bot-template) [`create_bot`](#create-bot) [`delete_bot_template`](#delete-bot-template) [`delete_bot`](#delete-bot) [`update_bot_template`](#update-bot-template) [`update_bot`](#update-bot) [`list_bot_templates`](#list-bot-templates) [`get_bot`](#get-bot) [`list_bots`](#list-bots) [`issue_bot_token`](#issue-bot-token) [`reset_bot_template_secret`](#reset-bot-template-secret) [`reset_bot_secret`](#reset-bot-secret) | | **Customer bans** | [`list_customer_bans`](#list-customer-bans) [`unban_customer`](#unban-customer) | @@ -837,9 +837,9 @@ curl -X POST \ -# Allowed Domains +# Allowed domains -**Allowed Domains** is a security feature that enables you to restrict which domains can embed your chat widget. By configuring allowed domains, you can prevent unauthorized websites from using your LiveChat license. Only domains explicitly added to the allowed list will be able to display and use your chat widget. +**Allowed domains** is a security feature that enables you to restrict which domains can embed your chat widget. By configuring allowed domains, you can prevent unauthorized websites from using your LiveChat license. Only domains explicitly added to the allowed list will be able to display and use your chat widget. ## Methods @@ -861,7 +861,7 @@ Adds a new domain to the allowed domains list. | Parameter | Required | Data type | Notes | | --------- | -------- | --------- | ------------------------------------------------- | -| `domain` | Yes | `string` | Domain name to allow (max 255 characters) | +| `domain` | Yes | `string` | Domain name (max 255 characters) | @@ -961,7 +961,7 @@ Removes a domain from the allowed domains list. | Parameter | Required | Data type | Notes | | --------- | -------- | --------- | -------------------------------- | -| `domain` | Yes | `string` | Domain name to remove | +| `domain` | Yes | `string` | Domain name | #### Response