Slimlytics Tracking setup API
First-party JavaScript and reverse-proxy configuration.
First-party JavaScript and reverse-proxy configuration.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/slimlytics-com:slimlytics-com-tracking-setup-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a 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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Slimlytics Tracking setup API
version: 1.0.0
description: 'Account, personal API token, site configuration, privacy-preserving collection, reporting, goals, export, and real-time APIs for Slimlytics.
Use a short-lived session JWT for creating personal API tokens. Use a `slyt_…` personal API token for durable CLI and agent access. Both use `Authorization: Bearer `. Collection write keys authorize ingestion only.'
license:
name: MIT
identifier: MIT
servers:
- url: https://slimlytics.com
description: Slimlytics Cloud
security:
- bearerAuth: []
tags:
- name: Tracking setup
description: First-party JavaScript and reverse-proxy configuration.
paths:
/api/sites/{siteId}/anti-adblock:
put:
tags:
- Tracking setup
summary: Configure first-party tracking paths
operationId: updateAntiAdblock
responses:
'200':
description: Updated site
content:
application/json:
schema:
$ref: '#/components/schemas/Site'
'400':
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
text/plain:
schema:
type: string
example: Failed to deserialize path parameters
'401':
description: Authentication required or invalid/expired credential
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Credential lacks permission
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal service error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'415':
description: Request Content-Type is not application/json
content:
text/plain:
schema:
type: string
'422':
description: JSON body could not be deserialized
content:
text/plain:
schema:
type: string
security:
- bearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AntiAdblockInput'
parameters:
- name: siteId
in: path
required: true
description: Site UUID
schema:
type: string
format: uuid
/api/sites/{siteId}/collection-health:
get:
tags:
- Tracking setup
summary: Get collection health
description: Returns accepted and rejected collection counters plus the most recent tracker activity for operational and agent diagnostics.
operationId: getCollectionHealth
responses:
'200':
description: Collection health
content:
application/json:
schema:
$ref: '#/components/schemas/CollectionHealth'
'400':
description: Invalid request
content:
text/plain:
schema:
type: string
'401':
description: Authentication required or invalid/expired credential
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Credential lacks permission
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal service error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
security:
- bearerAuth: []
parameters:
- name: siteId
in: path
required: true
description: Site UUID
schema:
type: string
format: uuid
/p/{writeKey}/{beaconName}:
get:
tags:
- Tracking setup
summary: Load the first-party tracker bootstrap
operationId: getFirstPartyTracker
description: Returns the tracker bundle plus initialization targeting the requested same-origin beacon path. The route validates the write-key UUID and beacon path syntax; it does not look up site configuration.
security: []
parameters:
- name: writeKey
in: path
required: true
schema:
type: string
format: uuid
- name: beaconName
in: path
required: true
schema:
type: string
description: Requested beacon path without the leading slash
responses:
'200':
description: Executable JavaScript tracker bootstrap
content:
text/javascript:
schema:
type: string
'304':
description: Cached bootstrap is still current
headers:
ETag:
schema:
type: string
'400':
description: Invalid write key or path
content:
text/plain:
schema:
type: string
example: Invalid first-party tracker path.
components:
schemas:
CollectionHealth:
type: object
additionalProperties: false
required:
- acceptedTotal
- rejectedTotal
- lastAcceptedAt
- lastRejectedAt
- lastRejectionCode
- lastTrackerVersion
properties:
acceptedTotal:
type: integer
format: int64
minimum: 0
rejectedTotal:
type: integer
format: int64
minimum: 0
lastAcceptedAt:
type:
- string
- 'null'
format: date-time
lastRejectedAt:
type:
- string
- 'null'
format: date-time
lastRejectionCode:
type:
- string
- 'null'
lastTrackerVersion:
type:
- string
- 'null'
Site:
type: object
required:
- id
- name
- domain
- timezone
- allowedOrigins
- retentionDays
- writeKey
- serverWriteKey
- proxyKey
- antiAdblockServer
- antiAdblockJsPath
- antiAdblockBeaconPath
- iconMode
- iconBackground
- iconBackgroundEnd
- iconForeground
- iconUpdatedAt
- createdAt
properties:
id:
type: string
format: uuid
name:
type: string
domain:
type: string
timezone:
type: string
allowedOrigins:
type: array
items:
type: string
format: uri
retentionDays:
type: integer
writeKey:
type: string
format: uuid
description: Collection-only key; not an account credential
serverWriteKey:
type: string
format: uuid
description: Rotatable collection-only secret for trusted server request batches
proxyKey:
type: string
format: uuid
description: Server-side secret sent by the site's first-party proxy as X-Slimlytics-Proxy-Key with X-Slimlytics-Client-IP so locations and visitor IDs use the real visitor IP. Keep it out of public repositories; rotate with POST /api/sites/{siteId}/rotate-proxy-key if exposed
antiAdblockServer:
type: string
enum:
- caddy
- nginx
- apache
antiAdblockJsPath:
type: string
antiAdblockBeaconPath:
type: string
iconMode:
type: string
enum:
- initials
- favicon
description: 'Dashboard avatar: initials on a colored tile, or the website''s favicon'
iconBackground:
type:
- string
- 'null'
pattern: ^#[0-9a-f]{6}$
description: Tile gradient start; null uses an automatic per-domain hue
iconBackgroundEnd:
type:
- string
- 'null'
pattern: ^#[0-9a-f]{6}$
description: Tile gradient end; null keeps the background solid
iconForeground:
type:
- string
- 'null'
pattern: ^#[0-9a-f]{6}$
description: Initials color; null uses white
iconUpdatedAt:
type:
- string
- 'null'
format: date-time
description: When the stored favicon last changed; add it to the GET /api/sites/{siteId}/icon URL to bust caches
createdAt:
type: string
format: date-time
Error:
type: object
required:
- error
properties:
error:
type: object
required:
- code
- message
properties:
code:
type: string
enum:
- unauthorized
- forbidden
- not_found
- bad_request
- rate_limited
- internal_error
message:
type: string
AntiAdblockInput:
type: object
required:
- serverType
- jsPath
- beaconPath
properties:
serverType:
type: string
enum:
- caddy
- nginx
- apache
jsPath:
type: string
pattern: ^/[^/]+\.js$
beaconPath:
type: string
pattern: ^/[^/]+$
additionalProperties: false
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT or slyt_ personal API token
description: Session JWT or personal API token. Token creation specifically requires a session JWT.
sessionQuery:
type: apiKey
in: query
name: token
description: Short-lived session JWT for native EventSource clients. Never put personal API tokens in URLs.
serverWriteKey:
type: apiKey
in: header
name: X-Slimlytics-Server-Key
description: Rotatable site secret accepted only by server request ingestion.
externalDocs:
description: Complete Slimlytics CLI installation and command reference
url: https://slimlytics.com/docs/cli