Websites

GET https://basicwebstats.com/api/websites/
curl --request GET \
--url 'https://basicwebstats.com/api/websites/' \
--header 'Authorization: Bearer {api_key}' \
Parameters Details Beschrijving
search Optioneel String De zoekterm.
search_by Optioneel String Het veld waarin je zoekt. Toegestane waarden: name, host.
is_enabled Optioneel Geheel getal
tracking_type Optioneel String Toegestane waarden: advanced, lightweight
domain_id Optioneel Geheel getal
datetime_field Optioneel String Toegestane waarden: datetime, last_datetime
datetime_start Optioneel String Filter results starting from this datetime. Y-m-d H:i:s format.
datetime_end Optioneel String Filter results up to this datetime. Y-m-d H:i:s format.
order_by Optioneel String Het veld waarop je de resultaten sorteert. Toegestane waarden: website_id, datetime, last_datetime, name, host, current_month_sessions_events, last_24_hours_pageviews, last_7_days_pageviews.
order_type Optioneel String De sorteervolgorde. Gebruik ASC voor oplopend en DESC voor aflopend.
page Optioneel Geheel getal Het paginanummer waarvan je resultaten wilt. Standaardwaarde: 1.
results_per_page Optioneel Geheel getal Het aantal resultaten per pagina. Toegestane waarden: 10, 25, 50, 100, 250, 500, 1000. Standaardwaarde: 25.
{
    "data": [
        {
            "id": 1,
            "user_id": 1,
            "pixel_key": "1234567890123456",
            "name": "Localhost",
            "currency": "EUR",
            "scheme": "https://",
            "host": "example.com",
            "path": "/",
            "tracking_type": "advanced",
            "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": 0,
            "last_24_hours_pageviews": 0,
            "last_7_days_pageviews": 0,
            "pageviews_stats_last_datetime": null,
            "current_month_sessions_replays": 0,
            "is_enabled": true,
            "last_datetime": null,
            "datetime": "2026-10-29 14:20:52"
        }
    ],
    "meta": {
        "page": 1,
        "total_pages": 1,
        "results_per_page": 25,
        "total_results": 1
    },
    "links": {
        "first": "https://basicwebstats.com/api/websites?page=1",
        "last": "https://basicwebstats.com/api/websites?page=1",
        "next": null,
        "prev": null,
        "self": "https://basicwebstats.com/api/websites?page=1"
    }
}
GET https://basicwebstats.com/api/websites/{website_id}
curl --request GET \
--url 'https://basicwebstats.com/api/websites/{website_id}' \
--header 'Authorization: Bearer {api_key}' \
{
    "data": {
        "id": 1,
        "user_id": 1,
        "pixel_key": "1234567890123456",
        "name": "Localhost",
        "currency": "EUR",
        "scheme": "https://",
        "host": "example.com",
        "path": "/",
        "tracking_type": "advanced",
        "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": 0,
        "last_24_hours_pageviews": 0,
        "last_7_days_pageviews": 0,
        "pageviews_stats_last_datetime": null,
        "current_month_sessions_replays": 0,
        "is_enabled": true,
        "last_datetime": null,
        "datetime": "2026-10-29 14:20:52"
    }
}
POST https://basicwebstats.com/api/websites
Parameters Details Beschrijving
domain_id Optioneel Geheel getal -
name Verplicht String -
currency Optioneel String Optional three-letter currency code, such as EUR or USD, used to display goal values. Submit an empty value to clear it. When omitted on update, the current currency is kept.
scheme Optioneel String Toegestane waarden: http://, https://
host Verplicht String Het adres en pad van de website. Voorbeeld: https://example.com/pad.
pixel_key Optioneel String Custom pixel key. Leave empty on create to generate a random key.
tracking_type Optioneel String Toegestane waarden: lightweight, advanced
excluded_ips Optioneel String IP-adressen die je niet wilt meetellen. Scheid meerdere adressen met een komma.
outbound_clicks_is_enabled Optioneel Booleaanse waarde
events_children_is_enabled Optioneel Booleaanse waarde Bezoekersgebeurtenissen bijhouden: muisklikken, schermwijzigingen, scrollen en verstuurde formulieren. Toegestane waarden: 0 of 1. Alleen beschikbaar bij het trackingtype normal.
sessions_replays_is_enabled Optioneel Booleaanse waarde Sessie-opnames. Toegestane waarden: 0 of 1. Alleen beschikbaar bij het trackingtype normal.
sessions_replays_hide_text_selector Optioneel String
email_reports_is_enabled Optioneel Booleaanse waarde E-mailrapporten. Toegestane waarden: 0 of 1.
query_parameters_tracking_is_enabled Optioneel Booleaanse waarde -
bot_exclusion_is_enabled Optioneel Booleaanse waarde -
public_statistics_is_enabled Optioneel Booleaanse waarde -
public_statistics_password Optioneel String -
is_enabled Optioneel Booleaanse waarde -
curl --request POST \
--url 'https://basicwebstats.com/api/websites' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'host=website.com' \
--form 'pixel_key=website_demo' \
--form 'name=Example' \
--form 'currency=EUR' \
{
    "data": {
        "id": 1,
        "user_id": 1,
        "pixel_key": "website_demo",
        "name": "Example",
        "currency": "EUR",
        "scheme": "https://",
        "host": "website.com",
        "path": null,
        "tracking_type": "lightweight",
        "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": "2026-10-29 14:20:52",
        "bot_exclusion_is_enabled": false,
        "query_parameters_tracking_is_enabled": false,
        "ip_storage_is_enabled": false,
        "public_statistics_is_enabled": false,
        "public_statistics_password": false,
        "current_month_sessions_events": 0,
        "last_24_hours_pageviews": 0,
        "last_7_days_pageviews": 0,
        "pageviews_stats_last_datetime": null,
        "current_month_sessions_replays": 0,
        "is_enabled": true,
        "last_datetime": null,
        "datetime": "2026-10-29 14:20:52"
    }
}
POST https://basicwebstats.com/api/websites/{website_id}
Parameters Details Beschrijving
domain_id Optioneel Geheel getal -
name Optioneel String -
currency Optioneel String Optional three-letter currency code, such as EUR or USD, used to display goal values. Submit an empty value to clear it. When omitted on update, the current currency is kept.
scheme Optioneel String Toegestane waarden: http://, https://
host Optioneel String Het adres en pad van de website. Voorbeeld: https://example.com/pad.
pixel_key Optioneel String Custom pixel key. Leave empty on create to generate a random key.
excluded_ips Optioneel String IP-adressen die je niet wilt meetellen. Scheid meerdere adressen met een komma.
outbound_clicks_is_enabled Optioneel Booleaanse waarde
events_children_is_enabled Optioneel Booleaanse waarde Bezoekersgebeurtenissen bijhouden: muisklikken, schermwijzigingen, scrollen en verstuurde formulieren. Toegestane waarden: 0 of 1. Alleen beschikbaar bij het trackingtype normal.
sessions_replays_is_enabled Optioneel Booleaanse waarde Sessie-opnames. Toegestane waarden: 0 of 1. Alleen beschikbaar bij het trackingtype normal.
sessions_replays_hide_text_selector Optioneel String
email_reports_is_enabled Optioneel Booleaanse waarde E-mailrapporten. Toegestane waarden: 0 of 1.
query_parameters_tracking_is_enabled Optioneel Booleaanse waarde -
bot_exclusion_is_enabled Optioneel Booleaanse waarde -
public_statistics_is_enabled Optioneel Booleaanse waarde -
public_statistics_password Optioneel String -
is_enabled Optioneel Booleaanse waarde -
curl --request POST \
--url 'https://basicwebstats.com/api/websites/{website_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'currency=EUR' \
--form 'pixel_key=website_live' \
--form 'is_enabled=0' \
{
    "data": {
        "id": 1,
        "user_id": 1,
        "pixel_key": "website_live",
        "name": "Example",
        "currency": "EUR",
        "scheme": "https://",
        "host": "example.com",
        "path": "/",
        "tracking_type": "advanced",
        "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": 0,
        "last_24_hours_pageviews": 0,
        "last_7_days_pageviews": 0,
        "pageviews_stats_last_datetime": null,
        "current_month_sessions_replays": 0,
        "is_enabled": false,
        "last_datetime": "2026-10-29 14:20:52",
        "datetime": "2026-10-29 14:20:52"
    }
}
DELETE https://basicwebstats.com/api/websites/{website_id}
curl --request DELETE \
--url 'https://basicwebstats.com/api/websites/{website_id}' \
--header 'Authorization: Bearer {api_key}' \