Matomo Sites Manager API

The SitesManager API gives you full control on Websites in Matomo (create, update and delete), and many methods to retrieve websites based on various attributes. This API lets you create websites via "addSite", update existing websites via "updateSite" and delete websites via "deleteSite". When creating websites, it can be useful to access internal codes used by Matomo for currencies via "getCurrencyList", or timezones via "getTimezonesList". There are also many ways to request a list of websites: from the website ID via "getSiteFromId" or the site URL via "getSitesIdFromSiteUrl". Often, the most useful technique is to list all websites that are known to a current user, based on the token_auth, via "getSitesWithAdminAccess", "getSitesWithViewAccess" or "getSitesWithAtLeastViewAccess" (which returns both). Some methods will affect all websites globally: "setGlobalExcludedIps" will set the list of IPs to be excluded on all websites, "setGlobalExcludedQueryParameters" will set the list of URL parameters to remove from URLs for all websites. The existing values can be fetched via "getExcludedIpsGlobal" and "getExcludedQueryParametersGlobal". See also the documentation about Managing Websites in Matomo.

Operations 53

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /index.php?module=API&method=SitesManager.getJavascriptTag Get the JavaScript tracking tag for a website · Sites manager get javascript tag #
Ask an LLM
“Where do I get the JavaScript tracking snippet to paste into my website?”
“Can the generated tracking code disable cookies or respect Do Not Track?”
Tell an agent
Give me the JavaScript tracking code for site {idSite}.
Generate the tracking snippet for site {idSite} with cookies disabled set to {disableCookies}.
GET /index.php?module=API&method=SitesManager.getImageTrackingCode Get image pixel tracking code for a website · Sites manager get image tracking code #
Ask an LLM
“How can I track visits on pages where JavaScript can't run, like in an email?”
“Can an image tracking pixel record a goal conversion with revenue?”
Tell an agent
Generate the image tracking pixel for site {idSite}.
Create an image tracking link for site {idSite} that records goal {idGoal} with revenue {revenue}.
GET /index.php?module=API&method=SitesManager.getSitesFromGroup List the websites in a site group · Sites manager get sites from group #
Ask an LLM
“Which of my tracked websites belong to a particular group?”
“Can I see every site that's been filed under one website group?”
Tell an agent
List all websites in the group {group}.
Show me the sites assigned to the {group} website group.
GET /index.php?module=API&method=SitesManager.getSitesGroups List website group names · Sites manager get sites groups #
Ask an LLM
“What website groups exist in my Matomo instance?”
“Which group names are my sites organised under, including ungrouped ones?”
Tell an agent
List all website group names.
Show me every site group currently in use, including the empty group.
GET /index.php?module=API&method=SitesManager.getSiteFromId Get the details of one website · Sites manager get site from id #
Ask an LLM
“What timezone and currency is a specific tracked website configured with?”
“How do I look up the name and main URL of a website by its ID?”
Tell an agent
Get the details of site {idSite}.
Show me the name, main URL, timezone and currency for website {idSite}.
GET /index.php?module=API&method=SitesManager.getSiteUrlsFromId List all URLs registered for a website · Sites manager get site urls from id #
Ask an LLM
“Which alias URLs are registered on a website besides its main URL?”
“What domains count as part of one tracked site?”
Tell an agent
List every URL registered for site {idSite}, main and aliases.
Show me the main URL plus alias domains of website {idSite}.
GET /index.php?module=API&method=SitesManager.getAllSites List all websites with their details · Sites manager get all sites #
Ask an LLM
“How do I get a full list of every website tracked in Matomo with its settings?”
“Can I export all my websites' records in one call?”
Tell an agent
List all websites in the instance with their full details.
Fetch the complete record for every tracked website.
GET /index.php?module=API&method=SitesManager.getAllSitesId List the IDs of all websites · Sites manager get all sites id #
Ask an LLM
“What are the numeric IDs of all the websites registered?”
“Can I get just the site IDs without the rest of the site details?”
Tell an agent
Give me the IDs of every registered website.
Return only the site ID numbers for all websites.
GET /index.php?module=API&method=SitesManager.getSitesWithAdminAccess List websites I have admin access to · Sites manager get sites with admin access #
Ask an LLM
“Which websites can I administer with my current account?”
“Can I filter the sites I'm an admin of by a name pattern?”
Tell an agent
List the websites where I have admin access.
Show up to {limit} sites I administer whose name matches {pattern}.
GET /index.php?module=API&method=SitesManager.getSitesWithMinimumAccess List websites at or above a permission level · Sites manager get sites with minimum access #
Ask an LLM
“Which sites do I have at least write permission on?”
“Can I list websites by the minimum access level my user holds on them?”
Tell an agent
List the websites where I have at least {permission} access.
Find sites matching {pattern} where my access is {permission} or higher.
GET /index.php?module=API&method=SitesManager.getSitesWithViewAccess List websites I have view-only access to · Sites manager get sites with view access #
Ask an LLM
“Which websites am I only allowed to view, not manage?”
“What sites have I been granted view access on?”
Tell an agent
List the websites where my access is view only.
Show the full site records I can view but not administer.
GET /index.php?module=API&method=SitesManager.getSitesWithAtLeastViewAccess List all websites I can at least view · Sites manager get sites with at least view access #
Ask an LLM
“What is every website I can see reports for, whether as viewer or admin?”
“Can I cap the number of sites returned when listing everything I can access?”
Tell an agent
List every website I can view or administer.
Show the first {limit} sites I have view or admin access on.
GET /index.php?module=API&method=SitesManager.getSitesIdWithAdminAccess List IDs of websites I administer · Sites manager get sites id with admin access #
Ask an LLM
“What are the site IDs of the websites where I'm an admin?”
“Can I get only the IDs of my admin-access sites?”
Tell an agent
Return the site IDs where I hold admin access.
Give me just the ID numbers of websites I administer.
GET /index.php?module=API&method=SitesManager.getSitesIdWithViewAccess List IDs of websites I can only view · Sites manager get sites id with view access #
Ask an LLM
“Which site IDs do I have view-level access to?”
“Can I get the IDs of the sites shared with me as read-only?”
Tell an agent
Return the IDs of sites where I have view access.
List the website ID numbers shared with me read-only.
GET /index.php?module=API&method=SitesManager.getSitesIdWithWriteAccess List IDs of websites I have write access to · Sites manager get sites id with write access #
Ask an LLM
“Which site IDs am I allowed to write to?”
“What websites does my user have write permission on, by ID?”
Tell an agent
Return the IDs of sites where I have write access.
List website ID numbers I can edit with write permission.
GET /index.php?module=API&method=SitesManager.getSitesIdWithAtLeastViewAccess List IDs of every website I can access · Sites manager get sites id with at least view access #
Ask an LLM
“What are the IDs of all sites I can see, as viewer or admin combined?”
“Can I get one ID list covering both view and admin access?”
Tell an agent
Return all site IDs I have view or admin access on.
Give me a single ID list of every website I'm able to open.
GET /index.php?module=API&method=SitesManager.getSitesIdFromSiteUrl Find website IDs by URL · Sites manager get sites id from site url #
Ask an LLM
“Which tracked site does a given URL belong to?”
“How do I find the site ID for a domain I already track?”
Tell an agent
Find the site IDs registered for the URL {url}.
Look up which website ID owns {url}.
GET /index.php?module=API&method=SitesManager.addSite Add a new website to track · Sites manager add site #
Ask an LLM
“How do I start tracking a new website in Matomo?”
“Can I set the timezone, currency and ecommerce option when creating a site?”
Tell an agent
Add a new website called {siteName} with URL {urls}.
Create site {siteName} in timezone {timezone} using currency {currency} with ecommerce set to {ecommerce}.
GET /index.php?module=API&method=SitesManager.getSiteSettings Get a website's editable settings metadata · Sites manager get site settings #
Ask an LLM
“Which settings can be edited on a particular website?”
“What measurable settings does a site expose for configuration?”
Tell an agent
Show the editable settings metadata for site {idSite}.
List the configurable measurable settings of website {idSite}.
GET /index.php?module=API&method=SitesManager.deleteSite Delete a website · Sites manager delete site #
Ask an LLM
“How do I permanently remove a website from Matomo?”
“Does deleting a site require confirming my password?”
Tell an agent destructive · confirm first
Delete website {idSite}.
Remove site {idSite} from the database, confirming with password {passwordConfirmation}.
GET /index.php?module=API&method=SitesManager.addSiteAliasUrls Add alias URLs to a website · Sites manager add site alias urls #
Ask an LLM
“How can I add another domain to an existing site without removing the current ones?”
“Can I append extra alias URLs to a website?”
Tell an agent
Add the alias URLs {urls} to site {idSite}.
Append {urls} as additional domains on website {idSite}, keeping existing aliases.
GET /index.php?module=API&method=SitesManager.setSiteAliasUrls Replace a website's alias URLs · Sites manager set site alias urls #
Ask an LLM
“How do I overwrite the whole list of alias domains for a site?”
“Can I clear out old alias URLs and set a fresh list?”
Tell an agent
Replace the alias URLs of site {idSite} with {urls}.
Reset website {idSite} so its only alias domains are {urls}.
GET /index.php?module=API&method=SitesManager.getIpsForRange Get start and end IPs for an IP range · Sites manager get ips for range #
Ask an LLM
“What are the first and last addresses in an IP range I want to exclude?”
“Can I check how a CIDR or wildcard range expands into IP bounds?”
Tell an agent
Give me the start and end IP addresses of the range {ipRange}.
Expand {ipRange} into its lowest and highest IP.
GET /index.php?module=API&method=SitesManager.setGlobalExcludedIps Set IPs excluded from tracking on all sites · Sites manager set global excluded ips #
Ask an LLM
“How do I stop my office IPs from being tracked on every website at once?”
“Can globally excluded IP addresses use wildcards?”
Tell an agent
Exclude the IPs {excludedIps} from tracking on all websites.
Set the global IP exclusion list to {excludedIps}.
GET /index.php?module=API&method=SitesManager.setGlobalSearchParameters Set global site search parameter names · Sites manager set global search parameters #
Ask an LLM
“How do I tell Matomo which URL parameters hold my internal search keyword and category?”
“Can I set default site search parameters for sites that haven't defined their own?”
Tell an agent
Set the global site search keyword parameters to {searchKeywordParameters} and category parameters to {searchCategoryParameters}.
Use {searchKeywordParameters} as the default search keyword param and {searchCategoryParameters} for category everywhere.
GET /index.php?module=API&method=SitesManager.getSearchKeywordParametersGlobal Get global site search keyword parameters · Sites manager get search keyword parameters global #
Ask an LLM
“Which URL parameters are treated as the search keyword by default across sites?”
“What global keyword parameter names is site search using?”
Tell an agent
Show the global site search keyword parameter names.
List the default query parameters read as internal search keywords.
GET /index.php?module=API&method=SitesManager.getSearchCategoryParametersGlobal Get global site search category parameters · Sites manager get search category parameters global #
Ask an LLM
“Which URL parameters are read as the search category by default?”
“What global category parameter names does site search use?”
Tell an agent
Show the global site search category parameter names.
List the default query parameters read as internal search categories.
GET /index.php?module=API&method=SitesManager.getExcludedQueryParameters List URL parameters excluded for one website · Sites manager get excluded query parameters #
Ask an LLM
“Which query string parameters are stripped from page URLs on a specific site?”
“What URL parameters does one website ignore when recording pageviews?”
Tell an agent
List the excluded URL query parameters for site {idSite}.
Show which query string params website {idSite} strips from tracked URLs.
GET /index.php?module=API&method=SitesManager.getExcludedQueryParametersGlobal List URL parameters excluded on all websites · Sites manager get excluded query parameters global #
Ask an LLM
“Which query parameters are excluded globally from every site's URLs?”
“What is the instance-wide list of ignored URL parameters?”
Tell an agent
List the URL query parameters excluded from all websites.
Show the global query parameter exclusions, in the context of site {idSite}.
GET /index.php?module=API&method=SitesManager.getExcludedUserAgentsGlobal List user agents excluded on all websites · Sites manager get excluded user agents global #
Ask an LLM
“Which user agent strings cause visits to be ignored across all sites?”
“What bots or user agents are currently excluded globally?”
Tell an agent
Show the global list of excluded user agent substrings.
List the user agents whose visits are dropped on every site.
GET /index.php?module=API&method=SitesManager.setGlobalExcludedUserAgents Set user agents excluded on all websites · Sites manager set global excluded user agents #
Ask an LLM
“How do I exclude visits from a specific crawler's user agent across every site?”
“Can I replace the global user agent exclusion list?”
Tell an agent
Exclude visits whose user agent contains {excludedUserAgents} on all sites.
Set the global excluded user agents to {excludedUserAgents}.
GET /index.php?module=API&method=SitesManager.getExcludedReferrers List referrers ignored for one website · Sites manager get excluded referrers #
Ask an LLM
“Which hosts are ignored as referrers on a particular website?”
“What referring domains does one site not count as traffic sources?”
Tell an agent
List the excluded referrers for site {idSite}.
Show the hosts website {idSite} ignores when detecting referrers.
GET /index.php?module=API&method=SitesManager.getExcludedReferrersGlobal List referrers ignored on all websites · Sites manager get excluded referrers global #
Ask an LLM
“Which referrer hosts are ignored globally across every site?”
“What is the instance-wide excluded referrer list?”
Tell an agent
Show the global list of excluded referrer hosts.
List referring URLs ignored across all websites.
GET /index.php?module=API&method=SitesManager.setGlobalExcludedReferrers Set referrers ignored on all websites · Sites manager set global excluded referrers #
Ask an LLM
“How do I stop a payment gateway domain from showing up as a referrer on every site?”
“Can I set one excluded referrer list for the whole instance?”
Tell an agent
Ignore {excludedReferrers} as referrers on all websites.
Set the global excluded referrer list to {excludedReferrers}.
GET /index.php?module=API&method=SitesManager.getKeepURLFragmentsGlobal Check whether URL fragments are kept by default · Sites manager get keep URL fragments global #
Ask an LLM
“Does Matomo keep the hash fragment of URLs by default when tracking?”
“Is the global keep-URL-fragments setting turned on?”
Tell an agent
Check whether URL fragments are kept by default.
Tell me the global setting for keeping #fragments in tracked URLs.
GET /index.php?module=API&method=SitesManager.setKeepURLFragmentsGlobal Set whether URL fragments are kept by default · Sites manager set keep URL fragments global #
Ask an LLM
“How do I make tracking keep the part of the URL after the hash for all sites?”
“Can I turn off keeping URL fragments globally?”
Tell an agent
Set keeping URL fragments by default to {enabled}.
Turn the global keep-#fragment behaviour {enabled}.
GET /index.php?module=API&method=SitesManager.getExcludedIpsGlobal List IPs excluded on all websites · Sites manager get excluded ips global #
Ask an LLM
“Which IP addresses are excluded from tracking across every website?”
“What is the current global IP exclusion list?”
Tell an agent
Show the IPs excluded from all websites.
List the global IP address exclusions.
GET /index.php?module=API&method=SitesManager.getDefaultCurrency Get the default currency for new websites · Sites manager get default currency #
Ask an LLM
“What currency do newly created sites get by default?”
“Which default currency is applied when adding a website through the API?”
Tell an agent
Show the default currency for new websites.
Tell me which currency new sites are created with.
GET /index.php?module=API&method=SitesManager.setDefaultCurrency Set the default currency for new websites · Sites manager set default currency #
Ask an LLM
“How do I change the currency new websites start with?”
“Can I make euros the default currency for sites I create later?”
Tell an agent
Set the default currency for new websites to {defaultCurrency}.
Make {defaultCurrency} the currency future sites are created with.
GET /index.php?module=API&method=SitesManager.getDefaultTimezone Get the default timezone for new websites · Sites manager get default timezone #
Ask an LLM
“What timezone do newly created sites get by default?”
“Which default timezone is applied when adding a website through the API?”
Tell an agent
Show the default timezone for new websites.
Tell me which timezone new sites are created in.
GET /index.php?module=API&method=SitesManager.setDefaultTimezone Set the default timezone for new websites · Sites manager set default timezone #
Ask an LLM
“How do I change the timezone new websites start with?”
“Can I make UTC the default timezone for sites I add later?”
Tell an agent
Set the default timezone for new websites to {defaultTimezone}.
Make {defaultTimezone} the timezone future sites are created in.
GET /index.php?module=API&method=SitesManager.setGlobalQueryParamExclusion Set the global URL parameter exclusion mode · Sites manager set global query param exclusion #
Ask an LLM
“How do I choose whether common tracking parameters are stripped from URLs on all sites?”
“Can I switch the global query parameter exclusion type and add my own parameters?”
Tell an agent
Set the global query parameter exclusion type to {exclusionType}.
Use exclusion type {exclusionType} globally and strip the parameters {queryParamsToExclude}.
GET /index.php?module=API&method=SitesManager.getExclusionTypeForQueryParams Get the URL parameter exclusion mode · Sites manager get exclusion type for query params #
Ask an LLM
“Which query parameter exclusion type is currently in effect?”
“Is my instance using a custom URL parameter exclusion mode?”
Tell an agent
Tell me the current query parameter exclusion type.
Show which URL parameter exclusion mode applies, considering site {idSite}.
GET /index.php?module=API&method=SitesManager.updateSite Update an existing website's settings · Sites manager update site #
Ask an LLM
“How do I rename a tracked website or change its main URL?”
“Can I turn on ecommerce tracking for a site that already exists?”
Tell an agent
Rename existing site {idSite} to {siteName}.
Change the timezone of site {idSite} to {timezone} and its currency to {currency}.
GET /index.php?module=API&method=SitesManager.getCurrencyList List supported currencies · Sites manager get currency list #
Ask an LLM
“Which currencies can a website be configured to report revenue in?”
“What currency codes does Matomo support?”
Tell an agent
List all supported currencies.
Show the currency codes and names I can assign to a site.
GET /index.php?module=API&method=SitesManager.getCurrencySymbols List currency symbols · Sites manager get currency symbols #
Ask an LLM
“What symbol is shown for each currency in reports?”
“Can I get the mapping of currency codes to symbols?”
Tell an agent
List the currency symbols.
Show the symbol used for each currency code.
GET /index.php?module=API&method=SitesManager.isTimezoneSupportEnabled Check if timezone support is enabled · Sites manager is timezone support enabled #
Ask an LLM
“Does the server support setting per-site timezones?”
“Is timezone support enabled on this Matomo server?”
Tell an agent
Check whether timezone support is enabled on the server.
Confirm if this server can handle city-based timezones.
GET /index.php?module=API&method=SitesManager.getTimezonesList List supported timezones by continent · Sites manager get timezones list #
Ask an LLM
“Which timezones can I choose from when configuring a site?”
“Can I see the available timezones grouped by continent?”
Tell an agent
List the supported timezones grouped by continent.
Show every timezone I could assign to a website.
GET /index.php?module=API&method=SitesManager.getTimezoneName Get a readable label for a timezone · Sites manager get timezone name #
Ask an LLM
“How is a timezone identifier displayed as a friendly name?”
“Can a timezone label include the country when a country has several zones?”
Tell an agent
Give me a user-friendly label for the timezone {timezone}.
Name timezone {timezone} for country {countryCode}.
GET /index.php?module=API&method=SitesManager.getUniqueSiteTimezones List timezones used by configured sites · Sites manager get unique site timezones #
Ask an LLM
“Which distinct timezones are my websites actually set to?”
“What unique timezones appear across all configured sites?”
Tell an agent
List the unique timezones used across my websites.
Show the distinct timezones my sites are configured in.
GET /index.php?module=API&method=SitesManager.renameGroup Rename a website group · Sites manager rename group #
Ask an LLM
“How do I rename a website group on every site that uses it?”
“Can I change a group's name without editing each site one by one?”
Tell an agent
Rename the website group {oldGroupName} to {newGroupName}.
Move all sites in group {oldGroupName} under the new group name {newGroupName}.
GET /index.php?module=API&method=SitesManager.getPatternMatchSites Search websites by name or URL pattern · Sites manager get pattern match sites #
Ask an LLM
“How do I find a website by typing part of its name or URL?”
“Can I search my sites by a pattern and exclude certain ones from the results?”
Tell an agent
Search my websites for those matching {pattern}.
Find up to {limit} sites matching {pattern}, excluding {sitesToExclude}.
GET /index.php?module=API&method=SitesManager.getNumWebsitesToDisplayPerPage Get how many websites show per page · Sites manager get num websites to display per page #
Ask an LLM
“How many websites are displayed per page in site lists?”
“What page size is used when listing websites?”
Tell an agent
Tell me how many websites are shown per page.
Get the site list page size setting.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/matomo:matomo-sitesmanager-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

matomo-sitesmanager-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Matomo Reporting API for plugin Sites Manager API
  version: 1.0.0
  description: The SitesManager API gives you full control on Websites in Matomo (create, update and delete), and many methods to retrieve websites based on various attributes.
servers:
- url: https://demo-proxy.innocraft.cloud/
  description: Current Matomo instance
security:
- MatomoToken: []
tags:


# --- truncated at 32 KB (84 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/matomo/refs/heads/main/openapi/matomo-sitesmanager-api-openapi.yml