Slimlytics Goals API
Event and path-pattern conversion goals.
Event and path-pattern conversion goals.
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-goals-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 Goals 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: Goals
description: Event and path-pattern conversion goals.
paths:
/api/sites/{siteId}/goals:
get:
tags:
- Goals
summary: List goals
description: Without dates, conversions and conversionRate cover all retained events. With from and to (given together), they cover those site-local inclusive dates, and conversionRate is unique converters as a percent of human visitors in the range.
operationId: listGoals
responses:
'200':
description: Goals
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Goal'
'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'
security:
- bearerAuth: []
parameters:
- name: siteId
in: path
required: true
description: Site UUID
schema:
type: string
format: uuid
- name: from
in: query
required: false
description: Inclusive first date; requires to
schema:
type: string
format: date
- name: to
in: query
required: false
description: Inclusive last date; requires from
schema:
type: string
format: date
post:
tags:
- Goals
summary: Create a goal
description: Event names match exactly. Retained events that already match the new goal are counted immediately.
operationId: createGoal
responses:
'201':
description: Goal created
content:
application/json:
schema:
$ref: '#/components/schemas/Goal'
'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/GoalInput'
parameters:
- name: siteId
in: path
required: true
description: Site UUID
schema:
type: string
format: uuid
/api/sites/{siteId}/goals/{goalId}:
delete:
tags:
- Goals
summary: Delete a goal
operationId: deleteGoal
responses:
'204':
description: Goal deleted
'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'
security:
- bearerAuth: []
parameters:
- name: siteId
in: path
required: true
description: Site UUID
schema:
type: string
format: uuid
- name: goalId
in: path
required: true
description: Goal UUID
schema:
type: string
format: uuid
/api/sites/{siteId}/conversions:
get:
tags:
- Goals
summary: Conversions report
description: Per-goal conversions, unique converters and conversion rate against the preceding period, daily rows, first-touch sources, and the most recent conversions. The MCP conversions_report tool returns the same document.
operationId: conversionsReport
responses:
'200':
description: Conversions report
content:
application/json:
schema:
$ref: '#/components/schemas/ConversionsReport'
'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'
security:
- bearerAuth: []
parameters:
- name: siteId
in: path
required: true
description: Site UUID
schema:
type: string
format: uuid
- name: from
in: query
required: true
schema:
type: string
format: date
description: Inclusive first date
- name: to
in: query
required: true
schema:
type: string
format: date
description: Inclusive last date
- name: goalId
in: query
required: false
description: Only this goal
schema:
type: string
format: uuid
- name: limit
in: query
required: false
description: Most recent conversions to list
schema:
type: integer
minimum: 0
maximum: 500
default: 50
components:
schemas:
Goal:
type: object
required:
- id
- siteId
- name
- eventName
- createdAt
- conversions
- conversionRate
properties:
id:
type: string
format: uuid
siteId:
type: string
format: uuid
name:
type: string
eventName:
type: string
pathPattern:
type:
- string
- 'null'
createdAt:
type: string
format: date-time
conversions:
type: integer
format: int64
minimum: 0
conversionRate:
type: number
minimum: 0
maximum: 100
GoalInput:
type: object
required:
- name
- eventName
properties:
name:
type: string
eventName:
type: string
pathPattern:
type:
- string
- 'null'
description: Optional SQL-LIKE page path pattern
additionalProperties: false
ConversionsReport:
type: object
required:
- siteId
- from
- to
- timezone
- generatedAt
- visitors
- goals
- recentConversions
properties:
siteId:
type: string
format: uuid
from:
type: string
format: date
to:
type: string
format: date
timezone:
type: string
generatedAt:
type: string
format: date-time
dataThrough:
type:
- string
- 'null'
format: date-time
visitors:
$ref: '#/components/schemas/Metric'
goals:
type: array
items:
type: object
required:
- goalId
- name
- eventName
- conversions
- uniqueConverters
- conversionRate
- previousConversionRate
- daily
- topSources
properties:
goalId:
type: string
format: uuid
name:
type: string
eventName:
type: string
pathPattern:
type:
- string
- 'null'
createdAt:
type: string
format: date-time
conversions:
$ref: '#/components/schemas/Metric'
uniqueConverters:
$ref: '#/components/schemas/Metric'
conversionRate:
type: number
minimum: 0
maximum: 100
previousConversionRate:
type: number
minimum: 0
maximum: 100
daily:
type: array
items:
type: object
required:
- date
- conversions
- uniqueConverters
properties:
date:
type: string
format: date
conversions:
type: integer
uniqueConverters:
type: integer
topSources:
type: array
maxItems: 10
items:
type: object
properties:
source:
type: string
medium:
type: string
campaign:
type: string
conversions:
type: integer
uniqueConverters:
type: integer
recentConversions:
type: array
items:
type: object
properties:
goalId:
type: string
format: uuid
goalName:
type: string
occurredAt:
type: string
format: date-time
visitorId:
type: string
page:
type: string
country:
type:
- string
- 'null'
device:
type:
- string
- 'null'
properties:
type: object
source:
type: string
medium:
type: string
campaign:
type: string
definitions:
type: object
evidence:
type: object
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
Metric:
type: object
required:
- current
- previous
- change_percent
properties:
current:
type: integer
previous:
type: integer
change_percent:
type:
- number
- 'null'
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