Websites
API DocumentationEndpoint
GET
https://dev.usermetric.io/api/websites/
Parameters
| Parameters | Details | Description |
|---|---|---|
search
|
Optional
String
|
The search string. |
search_by
|
Optional
String
|
What field are you searching by. Allowed values are: name, host. |
is_enabled
|
Optional
Integer
|
|
tracking_type
|
Optional
String
|
Allowed values: normal, lightweight |
domain_id
|
Optional
Integer
|
|
datetime_field
|
Optional
String
|
Allowed values: datetime, last_datetime |
datetime_start
|
Optional
String
|
Filter results starting from this datetime. Y-m-d H:i:s format. |
datetime_end
|
Optional
String
|
Filter results up to this datetime. Y-m-d H:i:s format. |
order_by
|
Optional
String
|
What field to order the results by. Allowed values are: website_id, datetime, last_datetime, name, host, current_month_sessions_events. |
order_type
|
Optional
String
|
The ordering of the results. Allowed values are: ASC for ascending ordering, and DESC for descending ordering. |
page
|
Optional
Integer
|
The page number that you want results from. Defaults to 1. |
results_per_page
|
Optional
Integer
|
How many results you want per page. Allowed values are: 10, 25, 50, 100, 250, 500, 1000. Defaults to 25. |
Example
curl --request GET \
--url 'https://dev.usermetric.io/api/websites/' \
--header 'Authorization: Bearer {api_key}' \
Response example
{
"data": [
{
"id": 1,
"user_id": 1,
"pixel_key": "1234567890123456",
"name": "Localhost",
"scheme": "https://",
"host": "example.com",
"path": "/",
"tracking_type": "normal",
"excluded_ips": "",
"outbound_clicks_is_enabled": false,
"events_children_is_enabled": false,
"sessions_replays_is_enabled": false,
"sessions_replays_hide_text_selector": null,
"email_reports_is_enabled": false,
"email_reports_last_date": "2020-06-23 19:01:22",
"bot_exclusion_is_enabled": true,
"query_parameters_tracking_is_enabled": true,
"ip_storage_is_enabled": false,
"public_statistics_is_enabled": false,
"public_statistics_password": false,
"current_month_sessions_events": 1000,
"current_month_sessions_replays": 25,
"is_enabled": true,
"datetime": "2026-09-22 02:53:47",
"last_datetime": null
}
],
"meta": {
"page": 1,
"total_pages": 1,
"results_per_page": 25,
"total_results": 1
},
"links": {
"first": "https://dev.usermetric.io/api/websites?page=1",
"last": "https://dev.usermetric.io/api/websites?page=1",
"next": null,
"prev": null,
"self": "https://dev.usermetric.io/api/websites?page=1"
}
}
Endpoint
GET
https://dev.usermetric.io/api/websites/{website_id}
Example
curl --request GET \
--url 'https://dev.usermetric.io/api/websites/{website_id}' \
--header 'Authorization: Bearer {api_key}' \
Response example
{
"data": {
"id": 1,
"user_id": 1,
"pixel_key": "1234567890123456",
"name": "Localhost",
"scheme": "https://",
"host": "example.com",
"path": "/",
"tracking_type": "normal",
"excluded_ips": "",
"outbound_clicks_is_enabled": false,
"events_children_is_enabled": false,
"sessions_replays_is_enabled": false,
"sessions_replays_hide_text_selector": null,
"email_reports_is_enabled": false,
"email_reports_last_date": "2020-06-23 19:01:22",
"bot_exclusion_is_enabled": true,
"query_parameters_tracking_is_enabled": true,
"ip_storage_is_enabled": false,
"public_statistics_is_enabled": false,
"public_statistics_password": false,
"current_month_sessions_events": 1000,
"current_month_sessions_replays": 25,
"is_enabled": true,
"datetime": "2026-09-22 02:53:47",
"last_datetime": null
}
}
Endpoint
POST
https://dev.usermetric.io/api/websites
Parameters
| Parameters | Details | Description |
|---|---|---|
domain_id
|
Optional
Integer
|
|
name
|
Required
String
|
|
scheme
|
Optional
String
|
Allowed values: http://, https:// |
host
|
Required
String
|
Example: example.com/path. |
tracking_type
|
Optional
String
|
Allowed values: lightweight, normal |
excluded_ips
|
Optional
String
|
Exclude IPs from tracking. Enter comma separated values. |
outbound_clicks_is_enabled
|
Optional
Boolean
|
|
events_children_is_enabled
|
Optional
Boolean
|
Track visitor events (mouse clicks, resizes, scrolls, form submissions). Allowed values are: 0 or 1. Only available for normal tracking type. |
sessions_replays_is_enabled
|
Optional
Boolean
|
Session replays. Allowed values are: 0 or 1. Only available for normal tracking type. |
sessions_replays_hide_text_selector
|
Optional
String
|
|
email_reports_is_enabled
|
Optional
Boolean
|
Email reports. Allowed values are: 0 or 1. |
ip_storage_is_enabled
|
Optional
Boolean
|
Available when: tracking_type = normal |
query_parameters_tracking_is_enabled
|
Optional
Boolean
|
|
bot_exclusion_is_enabled
|
Optional
Boolean
|
|
public_statistics_is_enabled
|
Optional
Boolean
|
|
public_statistics_password
|
Optional
String
|
|
is_enabled
|
Optional
Boolean
|
Example
curl --request POST \
--url 'https://dev.usermetric.io/api/websites' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'host=website.com' \
Response example
{
"data": {
"id": 1
}
}
Endpoint
POST
https://dev.usermetric.io/api/websites/{website_id}
Parameters
| Parameters | Details | Description |
|---|---|---|
domain_id
|
Optional
Integer
|
|
name
|
Optional
String
|
|
scheme
|
Optional
String
|
Allowed values: http://, https:// |
host
|
Optional
String
|
Example: example.com/path. |
excluded_ips
|
Optional
String
|
Exclude IPs from tracking. Enter comma separated values. |
outbound_clicks_is_enabled
|
Optional
Boolean
|
|
events_children_is_enabled
|
Optional
Boolean
|
Track visitor events (mouse clicks, resizes, scrolls, form submissions). Allowed values are: 0 or 1. Only available for normal tracking type. |
sessions_replays_is_enabled
|
Optional
Boolean
|
Session replays. Allowed values are: 0 or 1. Only available for normal tracking type. |
sessions_replays_hide_text_selector
|
Optional
String
|
|
email_reports_is_enabled
|
Optional
Boolean
|
Email reports. Allowed values are: 0 or 1. |
ip_storage_is_enabled
|
Optional
Boolean
|
Available when: tracking_type = normal |
query_parameters_tracking_is_enabled
|
Optional
Boolean
|
|
bot_exclusion_is_enabled
|
Optional
Boolean
|
|
public_statistics_is_enabled
|
Optional
Boolean
|
|
public_statistics_password
|
Optional
String
|
|
is_enabled
|
Optional
Boolean
|
Example
curl --request POST \
--url 'https://dev.usermetric.io/api/websites/{website_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'is_enabled=0' \
Response example
{
"data": {
"id": 1
}
}
Endpoint
DELETE
https://dev.usermetric.io/api/websites/{website_id}
Example
curl --request DELETE \
--url 'https://dev.usermetric.io/api/websites/{website_id}' \
--header 'Authorization: Bearer {api_key}' \