Swetrix Projects API

Manage analytics projects

Operations 7

GET /v1/project List Projects #
POST /v1/project Create Project #
GET /v1/project/{id} Get Project #
PUT /v1/project/{id} Update Project #
DELETE /v1/project/{id} Delete Project #
POST /v1/project/{id}/pin Pin Project #
DELETE /v1/project/{id}/pin Unpin Project #

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/swetrix-projects-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 email required.

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

OpenAPI Specification

swetrix-projects-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Swetrix Admin Annotations Projects API
  description: The Swetrix Admin API manages analytics projects, funnels, annotations, project views (segments), and organisations. Supports full CRUD operations for all Swetrix account resources. All requests require authentication via the X-Api-Key header. Rate limit is 600 requests/hour.
  version: '1.0'
  contact:
    name: Swetrix Support
    url: https://swetrix.com/contact
  termsOfService: https://swetrix.com/privacy
  license:
    name: AGPL-3.0
    url: https://github.com/Swetrix/swetrix-api/blob/main/LICENSE
servers:
- url: https://api.swetrix.com
  description: Swetrix Production API
security:
- ApiKeyAuth: []
tags:
- name: Projects
  description: Manage analytics projects
paths:
  /v1/project:
    get:
      operationId: listProjects
      summary: List Projects
      description: Retrieves all analytics projects for the authenticated user.
      tags:
      - Projects
      responses:
        '200':
          description: Array of project objects
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Project'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createProject
      summary: Create Project
      description: Creates a new analytics project. Returns 201 with the project object.
      tags:
      - Projects
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateProjectRequest'
            example:
              name: My Website
              isCaptcha: false
              isPasswordProtected: false
      responses:
        '201':
          description: Project created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /v1/project/{id}:
    get:
      operationId: getProject
      summary: Get Project
      description: Retrieves details for a specific analytics project.
      tags:
      - Projects
      parameters:
      - $ref: '#/components/parameters/projectId'
      responses:
        '200':
          description: Project object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    put:
      operationId: updateProject
      summary: Update Project
      description: Modifies settings for an existing project including name, active status, public visibility, allowed origins, IP blocklist, and bot protection level.
      tags:
      - Projects
      parameters:
      - $ref: '#/components/parameters/projectId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateProjectRequest'
      responses:
        '200':
          description: Updated project
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: deleteProject
      summary: Delete Project
      description: Permanently removes a project and all its data.
      tags:
      - Projects
      parameters:
      - $ref: '#/components/parameters/projectId'
      responses:
        '204':
          description: Project deleted
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /v1/project/{id}/pin:
    post:
      operationId: pinProject
      summary: Pin Project
      description: Pins a project to the top of the dashboard.
      tags:
      - Projects
      parameters:
      - $ref: '#/components/parameters/projectId'
      responses:
        '200':
          description: Project pinned
        '401':
          $ref: '#/components/responses/Unauthorized'
    delete:
      operationId: unpinProject
      summary: Unpin Project
      description: Removes a project from the pinned section.
      tags:
      - Projects
      parameters:
      - $ref: '#/components/parameters/projectId'
      responses:
        '200':
          description: Project unpinned
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  parameters:
    projectId:
      name: id
      in: path
      required: true
      schema:
        type: string
      description: Project ID
  responses:
    Unauthorized:
      description: Unauthorized - missing or invalid API key
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
    BadRequest:
      description: Bad request - malformed body or missing required fields
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
  schemas:
    UpdateProjectRequest:
      type: object
      properties:
        name:
          type: string
          maxLength: 50
        active:
          type: boolean
        public:
          type: boolean
        origins:
          type: array
          items:
            type: string
        ipBlacklist:
          type: array
          items:
            type: string
        botsProtectionLevel:
          type: string
          enum:
          - 'off'
          - basic
    CreateProjectRequest:
      type: object
      required:
      - name
      properties:
        name:
          type: string
          maxLength: 50
          description: Project display name
        isCaptcha:
          type: boolean
          default: false
          description: Enable CAPTCHA analytics tracking
        isPasswordProtected:
          type: boolean
          default: false
          description: Require password to view dashboard
        password:
          type: string
          description: Dashboard password (required if isPasswordProtected is true)
        organisationId:
          type: string
          description: Organisation to assign project to
    Project:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        active:
          type: boolean
          description: Whether traffic collection is enabled
        public:
          type: boolean
          description: Whether the dashboard is publicly visible
        origins:
          type: array
          items:
            type: string
          description: Allowed domain origins
        ipBlacklist:
          type: array
          items:
            type: string
          description: Blocked IP addresses
        botsProtectionLevel:
          type: string
          enum:
          - 'off'
          - basic
        organisationId:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key
      description: API key from Swetrix account settings (https://swetrix.com/user-settings)
externalDocs:
  description: Swetrix Admin API Documentation
  url: https://swetrix.com/docs/admin-api