Skip to content

REST operations

SleekTrack serves these operations under /wp-json. Each is declared, with its description, in the TypeSpec source of contracts/api/sleek-track/openapi.json.

Access

Access_read

GET /sleek-track/v1/access, requires sleek_track_view.

What the current user may do in Track: whether they manage it, and for an administrator the roles that view or manage it and the role choices.

Access_update

PATCH /sleek-track/v1/access, requires manage_options.

Saves the roles that view Track’s dashboards (view) and the roles that manage it (manage); an administrator always has both.

Groups

Groups_create

POST /sleek-track/v1/groups, requires sleek_track_manage.

Creates a site group from a name, an optional color and an order.

Groups_email

GET /sleek-track/v1/groups/{id}/email, requires sleek_track_manage.

The group’s email report: its cadence and recipients.

Groups_emailTest

POST /sleek-track/v1/groups/{id}/email/test, requires sleek_track_manage.

Sends the group’s report for its last closed period now, to its recipients or the given recipients.

Groups_emailUpdate

PATCH /sleek-track/v1/groups/{id}/email, requires sleek_track_manage.

Saves the group’s email report: cadence off, weekly or monthly, and recipients.

Groups_export

GET /sleek-track/v1/groups/{id}/export, requires sleek_track_view.

One report of a group’s sites or every tracked site, in the formats of a site’s export, with a Sites breakdown in the whole view.

Groups_list

GET /sleek-track/v1/groups, requires sleek_track_view.

Lists the site groups.

Groups_remove

DELETE /sleek-track/v1/groups/{id}, requires sleek_track_manage.

Deletes a group; its sites keep their data and become ungrouped.

Groups_stats

GET /sleek-track/v1/groups/{id}/stats, requires sleek_track_view.

Rolled-up totals, the previous period and the timeseries for a group’s sites, or for every tracked site when the id is all.

Groups_statsBreakdown

GET /sleek-track/v1/groups/{id}/stats/breakdown, requires sleek_track_view.

One breakdown, such as pages or sources, across a group’s sites or every tracked site.

Groups_statsRealtime

GET /sleek-track/v1/groups/{id}/stats/realtime, requires sleek_track_view.

Unique visitors in the last five minutes across a group’s sites or every tracked site.

Groups_update

PATCH /sleek-track/v1/groups/{id}, requires sleek_track_manage.

Changes a group’s name, color or order.

Groups_updatePut

PUT /sleek-track/v1/groups/{id}, requires sleek_track_manage.

Changes a group’s name, color or order, like the PATCH form.

Heatmaps

Heatmaps_read

GET /sleek-track/v1/heatmaps/{token}, requires public.

The clicks and scroll reach of the page, viewport size and period a heatmap link names, for the overlay on that page.

Network

Network_settings

GET /sleek-track/v1/network/settings, requires manage_network_options.

The network’s collection settings, each with whether it is enforced on every enabled site.

Network_settingsPost

POST /sleek-track/v1/network/settings, requires manage_network_options.

Saves the network’s collection settings and which of them are enforced on every enabled site.

Network_sites

GET /sleek-track/v1/network/sites, requires manage_network_options.

Every site of the network, whether Track is enabled on it, and the 30-day visitor trend of each enabled site.

Network_sitesDisable

POST /sleek-track/v1/network/sites/disable, requires manage_network_options.

Stops tracking a network site and keeps its tables and history.

Network_sitesEnable

POST /sleek-track/v1/network/sites/enable, requires manage_network_options.

Enables Track on a network site: creates its tables and registers the site to track itself.

Network_sitesStats

GET /sleek-track/v1/network/{blogId}/sites/{id}/stats, requires manage_network_options.

Totals, the previous period and the timeseries of a tracked site on an enabled network site.

Network_sitesStatsBreakdown

GET /sleek-track/v1/network/{blogId}/sites/{id}/stats/breakdown, requires manage_network_options.

One breakdown of a tracked site on an enabled network site.

Network_sitesStatsRealtime

GET /sleek-track/v1/network/{blogId}/sites/{id}/stats/realtime, requires manage_network_options.

Unique visitors in the last five minutes on a tracked site of an enabled network site.

Settings

Settings_read

GET /sleek-track/v1/settings, requires sleek_track_manage.

The site’s collection settings, each with its effective value and where that value comes from.

Settings_save

POST /sleek-track/v1/settings, requires sleek_track_manage.

Saves the site’s collection settings and which of them override the plugin default.

Shares

Shares_stats

GET /sleek-track/v1/shares/{token}/stats, requires public.

Totals, the previous period and the timeseries behind a share link, checked against its password.

Shares_statsBreakdown

GET /sleek-track/v1/shares/{token}/stats/breakdown, requires public.

One breakdown behind a share link, limited to the cards the link shows.

Shares_statsRealtime

GET /sleek-track/v1/shares/{token}/stats/realtime, requires public.

Unique visitors in the last five minutes behind a share link.

Sites

Sites_annotations

GET /sleek-track/v1/sites/{id}/annotations, requires sleek_track_view.

The site’s chart annotations, by date.

Sites_annotationsPost

POST /sleek-track/v1/sites/{id}/annotations, requires sleek_track_manage.

Adds a dated note to the site’s visitors chart.

Sites_create

POST /sleek-track/v1/sites, requires sleek_track_manage.

Adds a site to track by its domain, with an optional name and group.

Sites_current

GET /sleek-track/v1/sites/current, requires sleek_track_manage.

This install’s domain and name, and its tracked site when it has one.

Sites_currentPost

POST /sleek-track/v1/sites/current, requires sleek_track_manage.

Tracks this install, adding the tracking code to its pages automatically.

Sites_email

GET /sleek-track/v1/sites/{id}/email, requires sleek_track_manage.

The site’s email report and spike alert: cadence, recipients, threshold and alert recipients.

Sites_emailTest

POST /sleek-track/v1/sites/{id}/email/test, requires sleek_track_manage.

Sends the site’s report for its last closed period now, to its recipients or the given recipients.

Sites_emailUpdate

PATCH /sleek-track/v1/sites/{id}/email, requires sleek_track_manage.

Saves the site’s email report (cadence off, weekly or monthly, and recipients) and spike alert (threshold, 0 for none, and alert_recipients).

Sites_embeds

GET /sleek-track/v1/sites/{id}/embeds, requires sleek_track_manage.

The dashboards the site’s shortcodes and blocks embed, with the posts that embed each.

Sites_events

GET /sleek-track/v1/sites/{id}/events, requires sleek_track_manage.

The site’s raw events, newest first.

Sites_export

GET /sleek-track/v1/sites/{id}/export, requires sleek_track_view.

One report of the site for a period and filters: the timeseries or a breakdown as CSV, or with type json or zip the whole view, its metrics, timeseries and every breakdown, as JSON or as a base64 ZIP of CSV files.

Sites_funnels

GET /sleek-track/v1/sites/{id}/funnels, requires sleek_track_view.

The site’s funnels.

Sites_funnelsPost

POST /sleek-track/v1/sites/{id}/funnels, requires sleek_track_manage.

Creates a funnel of two to eight path or event steps.

Sites_funnelsStats

GET /sleek-track/v1/sites/{id}/funnels/{funnelId}/stats, requires sleek_track_view.

How many sessions reach each step of a funnel in a period, counting only the sessions the dashboard’s filters keep.

Sites_goals

GET /sleek-track/v1/sites/{id}/goals, requires sleek_track_view.

The site’s pageview goals.

Sites_goalsPost

POST /sleek-track/v1/sites/{id}/goals, requires sleek_track_manage.

Adds a pageview goal: a name and a path pattern starting with a slash.

Sites_health

GET /sleek-track/v1/sites/{id}/health, requires sleek_track_manage.

Whether the site’s tracking code and collector are in place, checking the public home page when asked to verify.

Sites_heatmap

GET /sleek-track/v1/sites/{id}/heatmap, requires sleek_track_view.

A heatmap link for a page of the site (path), a viewport size (device: desktop, tablet or mobile) and a period: the page’s URL with a signed token its overlay reads for an hour.

Sites_import

POST /sleek-track/v1/sites/{id}/import, requires sleek_track_manage.

Imports daily visitor totals for past days into the site’s daily trends.

Sites_list

GET /sleek-track/v1/sites, requires sleek_track_view.

Lists the tracked sites.

Sites_overview

GET /sleek-track/v1/sites/overview, requires sleek_track_view.

Every tracked site with its 30-day visitor trend and revenue, and the groups that section them.

Sites_read

GET /sleek-track/v1/sites/{id}, requires sleek_track_view.

One tracked site.

Sites_remove

DELETE /sleek-track/v1/sites/{id}, requires sleek_track_manage.

Deletes a tracked site with its events and daily totals.

Sites_removeAnnotations

DELETE /sleek-track/v1/sites/{id}/annotations/{annotationId}, requires sleek_track_manage.

Deletes a chart annotation.

Sites_removeEmbeds

DELETE /sleek-track/v1/sites/{id}/embeds/{embedId}, requires sleek_track_manage.

Revokes an embedded dashboard; its posts show it again, under a new token, only once one is saved.

Sites_removeFunnels

DELETE /sleek-track/v1/sites/{id}/funnels/{funnelId}, requires sleek_track_manage.

Deletes a funnel.

Sites_removeGoals

DELETE /sleek-track/v1/sites/{id}/goals/{goalId}, requires sleek_track_manage.

Deletes a pageview goal.

Sites_removeShares

DELETE /sleek-track/v1/sites/{id}/shares/{shareId}, requires sleek_track_manage.

Revokes a share link.

Sites_script

GET /sleek-track/v1/sites/{id}/script, requires sleek_track_manage.

The site’s tracking snippet and collection endpoints.

Sites_shares

GET /sleek-track/v1/sites/{id}/shares, requires sleek_track_manage.

The site’s share links.

Sites_sharesPost

POST /sleek-track/v1/sites/{id}/shares, requires sleek_track_manage.

Creates a share link with a name, the cards it shows, an optional password, white-label mode, and preset filters and period (with from, to and period_fixed).

Sites_stats

GET /sleek-track/v1/sites/{id}/stats, requires sleek_track_view.

The site’s totals, the previous period and the timeseries for a period and filters.

Sites_statsBreakdown

GET /sleek-track/v1/sites/{id}/stats/breakdown, requires sleek_track_view.

One breakdown of the site, such as pages, sources or goals.

Sites_statsRealtime

GET /sleek-track/v1/sites/{id}/stats/realtime, requires sleek_track_view.

Unique visitors on the site in the last five minutes.

Sites_terms

GET /sleek-track/v1/sites/{id}/terms, requires sleek_track_view.

The public taxonomies and their terms in use, for filtering by the posts of a term; empty for any site but the install’s own.

Sites_update

PATCH /sleek-track/v1/sites/{id}, requires sleek_track_manage.

Changes a site’s name, domain, group, activity, subdomain handling or goal webhook.

Sites_updatePut

PUT /sleek-track/v1/sites/{id}, requires sleek_track_manage.

Changes a site’s name, domain, group, activity, subdomain handling or goal webhook, like the PATCH form.

Views

Views_create

POST /sleek-track/v1/views, requires sleek_track_manage.

Saves a dashboard’s period and filters under a name.

Views_list

GET /sleek-track/v1/views, requires sleek_track_view.

Lists the saved dashboard views.

Views_remove

DELETE /sleek-track/v1/views/{id}, requires sleek_track_manage.

Deletes a saved view.

Stay in the Loop!  

Be the first to hear about new updates, special offers, and helpful tips, delivered straight to your inbox.

We respect your inbox (and your privacy). Read our privacy policy.