Skip to content

Commit 12592c2

Browse files
authored
feat(docs): add domain allowlist methods
1 parent 662118e commit 12592c2

File tree

4 files changed

+248
-0
lines changed

4 files changed

+248
-0
lines changed

src/pages/data-reporting/changelog/index.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ The developer preview version provides a preview of the upcoming changes to the
1919

2020
</Warning>
2121

22+
## [v3.7] - Developer Preview
23+
24+
### Stats
25+
26+
- 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.
27+
2228
## [v3.6] - 2025-08-07
2329

2430
- 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.

src/pages/data-reporting/reports-api/v3.7/index.mdx

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ You can authorize your calls to the Reports API using one of the following metho
5959
| **Agents** | [`availability`](#availability) [`performance`](#performance) |
6060
| **Customers** | [`unique_visitors`](#unique-visitors) [`queued_visitors`](#queued-visitors) [`queued_visitors_left`](#queued-visitors-left) |
6161
| **Tags** | [`chat_usage`](#chat-usage) |
62+
| **Stats** | [`visitor_domains`](#visitor-domains) |
6263

6364
## Available parameters and filters
6465

@@ -1202,6 +1203,87 @@ https://api.livechatinc.com/v3.7/reports/tags/chat_usage \
12021203
</Code>
12031204
</Section>
12041205

1206+
## Stats
1207+
1208+
<Section>
1209+
<Text>
1210+
1211+
### Visitor Domains
1212+
1213+
Returns up to 100 domains from which visitors access your website, ranked by page view count.
1214+
1215+
#### Specifics
1216+
1217+
| | |
1218+
| ------------------- | ------------------------------------------------------------------ |
1219+
| **Method URL** | `https://api.livechatinc.com/v3.7/reports/stats/visitor_domains` |
1220+
| **HTTP method** | POST, GET |
1221+
| **Required scopes** | `reports_read` |
1222+
1223+
#### Request
1224+
1225+
| Parameter | Required | Data type | Notes |
1226+
| -------------- | -------- | --------- | ----------------------------------------------------------------------------------------------------- |
1227+
| `filters` | No | `object` | If none provided, your report will span last seven days. |
1228+
| `filters.from` | No | `string` | Filters visits within specified time range. See [format reference](#available-parameters-and-filters). |
1229+
| `filters.to` | No | `string` | Filters visits within specified time range. See [format reference](#available-parameters-and-filters). |
1230+
1231+
#### Response
1232+
1233+
| Field | Notes |
1234+
| -------------------------- | ---------------------------------------------------------- |
1235+
| `name` | Report name: `visitor-domains-report`. |
1236+
| `summary` | Map of domain names with their page view counts. |
1237+
| `summary.<domain>` | Number of page views from the specified domain. |
1238+
1239+
1240+
1241+
</Text>
1242+
<Code>
1243+
1244+
<CodeSample path={'REQUEST'}>
1245+
1246+
<Sample>
1247+
1248+
```shell
1249+
curl -X POST \
1250+
https://api.livechatinc.com/v3.7/reports/stats/visitor_domains \
1251+
-H 'Content-Type: application/json' \
1252+
-H 'Authorization: Bearer <your_access_token>' \
1253+
-d '{
1254+
"filters": {
1255+
"from": "2024-10-01T00:00:00-00:00",
1256+
"to": "2024-10-07T23:59:59-00:00"
1257+
}
1258+
}'
1259+
```
1260+
1261+
</Sample>
1262+
</CodeSample>
1263+
1264+
<CodeSample path={'RESPONSE'}>
1265+
1266+
<Sample>
1267+
1268+
```json
1269+
{
1270+
"name": "visitor-domains-report",
1271+
"summary": {
1272+
"example.com": 1523,
1273+
"another-site.org": 847,
1274+
"customer-portal.net": 612,
1275+
"shop.example.com": 458,
1276+
"blog.example.com": 234
1277+
}
1278+
}
1279+
```
1280+
1281+
</Sample>
1282+
</CodeSample>
1283+
1284+
</Code>
1285+
</Section>
1286+
12051287
# Contact us
12061288

12071289
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)

src/pages/management/changelog/index.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ The developer preview version provides a preview of the upcoming changes to the
2222

2323
## [v3.7] - Developer preview
2424

25+
### Allowed Domains
26+
27+
- Added allowed domains management methods:
28+
- [**Add Allowed Domain**](/management/configuration-api/v3.7#add-allowed-domain)
29+
- [**List Allowed Domains**](/management/configuration-api/v3.7#list-allowed-domains)
30+
- [**Delete Allowed Domain**](/management/configuration-api/v3.7#delete-allowed-domain)
31+
2532
### Canned responses
2633

2734
- Added canned response management methods:

src/pages/management/configuration-api/v3.7/index.mdx

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ All configurations set by this API will have action in system after max 2 minute
3535
| | |
3636
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
3737
| **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) |
38+
| **Allowed domains** | [`add_allowed_domain`](#add-allowed-domain) [`list_allowed_domains`](#list-allowed-domains) [`delete_allowed_domain`](#delete-allowed-domain) |
3839
| **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) |
3940
| **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) |
4041
| **Customer bans** | [`list_customer_bans`](#list-customer-bans) [`unban_customer`](#unban-customer) |
@@ -836,6 +837,158 @@ curl -X POST \
836837

837838
</Section>
838839

840+
# Allowed domains
841+
842+
**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.
843+
844+
## Methods
845+
846+
<Section>
847+
848+
<Text>
849+
850+
### Add Allowed Domain
851+
852+
Adds a new domain to the allowed domains list.
853+
854+
#### Specifics
855+
856+
| | |
857+
| -------------------------------- | ---------------------------------------------------------------------------- |
858+
| Method URL | `https://api.livechatinc.com/v3.7/configuration/action/add_allowed_domain` |
859+
| Required scopes | `domain_manage` |
860+
| [Batch support](#batch-requests) | No |
861+
862+
| Parameter | Required | Data type | Notes |
863+
| --------- | -------- | --------- | ------------------------------------------------- |
864+
| `domain` | Yes | `string` | Domain name (max 255 characters) |
865+
866+
</Text>
867+
868+
<Code>
869+
870+
<CodeSample path={'REQUEST'}>
871+
872+
```shell
873+
curl -X POST \
874+
https://api.livechatinc.com/v3.7/configuration/action/add_allowed_domain \
875+
-H 'Content-Type: application/json' \
876+
-H 'Authorization: Bearer <your_access_token>' \
877+
-d '{
878+
"domain": "example.com"
879+
}'
880+
```
881+
882+
</CodeSample>
883+
884+
<CodeResponse>
885+
886+
```json
887+
{}
888+
```
889+
890+
</CodeResponse>
891+
892+
</Code>
893+
894+
</Section>
895+
896+
<Section>
897+
898+
<Text>
899+
900+
### List Allowed Domains
901+
902+
Returns all domains currently allowed to embed your chat widget.
903+
904+
#### Specifics
905+
906+
| | |
907+
| -------------------------------- | ------------------------------------------------------------------------------ |
908+
| Method URL | `https://api.livechatinc.com/v3.7/configuration/action/list_allowed_domains` |
909+
| Required scopes | `domain_manage` |
910+
| [Batch support](#batch-requests) | No |
911+
912+
</Text>
913+
914+
<Code>
915+
916+
<CodeSample path={'REQUEST'}>
917+
918+
```shell
919+
curl -X POST \
920+
https://api.livechatinc.com/v3.7/configuration/action/list_allowed_domains \
921+
-H 'Content-Type: application/json' \
922+
-H 'Authorization: Bearer <your_access_token>' \
923+
-d '{}'
924+
```
925+
926+
</CodeSample>
927+
928+
<CodeResponse>
929+
930+
```json
931+
{
932+
"domains": [
933+
"example.com",
934+
"subdomain.example.com",
935+
"another-domain.com"
936+
]
937+
}
938+
```
939+
940+
</CodeResponse>
941+
942+
</Code>
943+
944+
</Section>
945+
946+
<Section>
947+
948+
<Text>
949+
950+
### Delete Allowed Domain
951+
952+
Removes a domain from the allowed domains list.
953+
954+
#### Specifics
955+
956+
| | |
957+
| -------------------------------- | ------------------------------------------------------------------------------- |
958+
| Method URL | `https://api.livechatinc.com/v3.7/configuration/action/delete_allowed_domain` |
959+
| Required scopes | `domain_manage` |
960+
| [Batch support](#batch-requests) | No |
961+
962+
| Parameter | Required | Data type | Notes |
963+
| --------- | -------- | --------- | -------------------------------- |
964+
| `domain` | Yes | `string` | Domain name |
965+
966+
#### Response
967+
968+
No response payload (`200 OK`).
969+
970+
</Text>
971+
972+
<Code>
973+
974+
<CodeSample path={'REQUEST'}>
975+
976+
```shell
977+
curl -X POST \
978+
https://api.livechatinc.com/v3.7/configuration/action/delete_allowed_domain \
979+
-H 'Content-Type: application/json' \
980+
-H 'Authorization: Bearer <your_access_token>' \
981+
-d '{
982+
"domain": "example.com"
983+
}'
984+
```
985+
986+
</CodeSample>
987+
988+
</Code>
989+
990+
</Section>
991+
839992
# Auto access
840993

841994
**Auto access** allows you to assign groups to a thread that will be created when a customer starts a chat. Those groups are

0 commit comments

Comments
 (0)