Slimlytics API tokens API

Expiring, revocable personal API tokens for CLI and agent access.

GitHub OpenAPI

Operations 4

GET /api/account/tokens List active personal API tokens #
POST /api/account/tokens Create a personal API token #
DELETE /api/account/tokens/current Revoke the authenticating personal token #
DELETE /api/account/tokens/{tokenId} Revoke a personal API token by ID #

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/slimlytics-com:slimlytics-com-api-tokens-api"
All apis
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.

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. 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 Specification

slimlytics-com-api-tokens-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Slimlytics API tokens 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: API Tokens
  description: Expiring, revocable personal API tokens for CLI and agent access.
paths:
  /api/account/tokens:
    get:
      tags:
      - API Tokens
      summary: List active personal API tokens
      operationId: listApiTokens
      responses:
        '200':
          description: Active, unexpired token metadata
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ApiTokenSummary'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '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'
      description: Never returns token secrets.
      security:
      - bearerAuth: []
    post:
      tags:
      - API Tokens
      summary: Create a personal API token
      operationId: createApiToken
      responses:
        '201':
          description: Token created; secret is returned exactly once
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiTokenCreated'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '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'
        '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
      description: Requires a short-lived session JWT. A personal API token cannot mint another token.
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiTokenInput'
  /api/account/tokens/current:
    delete:
      tags:
      - API Tokens
      summary: Revoke the authenticating personal token
      operationId: revokeCurrentApiToken
      responses:
        '204':
          description: Current personal API token revoked
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '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'
        '500':
          description: Internal service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      description: Identifies the exact bearer credential. Session JWTs cannot be revoked through this endpoint.
      security:
      - bearerAuth: []
  /api/account/tokens/{tokenId}:
    delete:
      tags:
      - API Tokens
      summary: Revoke a personal API token by ID
      operationId: revokeApiToken
      responses:
        '204':
          description: Token revoked
        '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: tokenId
        in: path
        required: true
        description: Personal API token UUID
        schema:
          type: string
          format: uuid
components:
  schemas:
    ApiTokenCreated:
      allOf:
      - $ref: '#/components/schemas/ApiTokenSummary'
      - type: object
        required:
        - token
        properties:
          token:
            type: string
            pattern: ^slyt_
            description: Shown once; store securely
    ApiTokenSummary:
      type: object
      required:
      - id
      - name
      - tokenPrefix
      - scopes
      - expiresAt
      - createdAt
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        tokenPrefix:
          type: string
          description: Non-secret display prefix
        scopes:
          type: array
          items:
            type: string
        lastUsedAt:
          type:
          - string
          - 'null'
          format: date-time
        expiresAt:
          type: string
          format: date-time
        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
    ApiTokenInput:
      type: object
      required:
      - name
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 100
        expiresInDays:
          type: integer
          minimum: 1
          maximum: 3650
          default: 365
        scopes:
          type: array
          minItems: 1
          maxItems: 6
          uniqueItems: true
          items:
            type: string
            enum:
            - sites:read
            - sites:write
            - analytics:read
            - analytics:write
            - integrations:read
            - integrations:write
          default:
          - sites:read
          - analytics:read
      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