Swetrix Organisations API

Manage organisations and member access

Operations 8

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /v1/organisation List the organisations I belong to · List Organisations #
Ask an LLM
“Which organisations am I a member of?”
“Can I see all the Swetrix teams my account belongs to?”
Tell an agent
List every organisation I'm a member of.
Show my organisations.
POST /v1/organisation Create a new organisation · Create Organisation #
Ask an LLM
“How do I set up a new organisation to share analytics projects with a team?”
“What do I need to provide to create an organisation?”
Tell an agent
Create an organisation named {name}.
Set up a new team organisation called {name}.
GET /v1/organisation/{orgId} View details of one organisation · Get Organisation #
Ask an LLM
“What are the details of a specific organisation I belong to?”
“Can I look up a single organisation by its ID?”
Tell an agent
Get the details of organisation {orgId}.
Show me organisation {orgId}.
PATCH /v1/organisation/{orgId} Rename an organisation · Update Organisation #
Ask an LLM
“How do I rename an organisation?”
“Is the organisation name the only thing I can change after creating it?”
Tell an agent
Rename organisation {orgId} to {name}.
Change the name of organisation {orgId} to {name}.
DELETE /v1/organisation/{orgId} Permanently delete an organisation · Delete Organisation #
Ask an LLM
“Who is allowed to permanently delete an organisation?”
“Can I shut down an organisation for good?”
Tell an agent destructive · confirm first
Permanently delete organisation {orgId}.
Remove organisation {orgId} entirely.
POST /v1/organisation/{orgId}/invite Invite someone to an organisation with a role · Invite Organisation Member #
Ask an LLM
“How do I invite a colleague by email to my organisation?”
“Can I choose a role for someone when inviting them to an organisation?”
Tell an agent
Invite {email} to organisation {orgId} as {role}.
Send an invitation to {email} to join organisation {orgId} with the {role} role.
PATCH /v1/organisation/member/{memberId} Change an organisation member's role · Update Member Role #
Ask an LLM
“Can I promote an existing organisation member to a different role?”
“Which call changes the role of someone already in my organisation?”
Tell an agent
Change the role of member {memberId} to {role}.
Set organisation member {memberId}'s role to {role}.
DELETE /v1/organisation/member/{memberId} Remove a member from an organisation · Remove Organisation Member #
Ask an LLM
“What's the way to kick someone out of my organisation?”
“Can I revoke a teammate's organisation membership?”
Tell an agent destructive · confirm first
Remove member {memberId} from the organisation.
Take organisation member {memberId} off the team.

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:swetrix-organisations-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 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. See our Privacy Policy and Terms.

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

OpenAPI Specification

swetrix-organisations-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Swetrix Admin Organisations 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: Organisations
  description: Manage organisations and member access
paths:
  /v1/organisation:
    get:
      operationId: listOrganisations
      summary: List Organisations
      description: Retrieves all organisations the user is a member of.
      tags:
      - Organisations
      responses:
        '200':
          description: Array of organisations
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Organisation'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createOrganisation
      summary: Create Organisation
      description: Creates a new organisation.
      tags:
      - Organisations
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - name
              properties:
                name:
                  type: string
                  maxLength: 50
                  description: Organisation name
      responses:
        '201':
          description: Organisation created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Organisation'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /v1/organisation/{orgId}:
    get:
      operationId: getOrganisation
      summary: Get Organisation
      description: Retrieves details for a specific organisation.
      tags:
      - Organisations
      parameters:
      - $ref: '#/components/parameters/orgId'
      responses:
        '200':
          description: Organisation details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Organisation'
        '401':
          $ref: '#/components/responses/Unauthorized'
    patch:
      operationId: updateOrganisation
      summary: Update Organisation
      description: Updates an organisation's name.
      tags:
      - Organisations
      parameters:
      - $ref: '#/components/parameters/orgId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 50
      responses:
        '200':
          description: Updated organisation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Organisation'
        '401':
          $ref: '#/components/responses/Unauthorized'
    delete:
      operationId: deleteOrganisation
      summary: Delete Organisation
      description: Permanently deletes an organisation. Requires owner permission.
      tags:
      - Organisations
      parameters:
      - $ref: '#/components/parameters/orgId'
      responses:
        '204':
          description: Organisation deleted
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
  /v1/organisation/{orgId}/invite:
    post:
      operationId: inviteOrganisationMember
      summary: Invite Organisation Member
      description: Invites a user to join the organisation with a specified role.
      tags:
      - Organisations
      parameters:
      - $ref: '#/components/parameters/orgId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - email
              - role
              properties:
                email:
                  type: string
                  format: email
                  description: Email address of user to invite
                role:
                  type: string
                  enum:
                  - owner
                  - admin
                  - viewer
                  description: Role to assign to the new member
      responses:
        '201':
          description: Invitation sent
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /v1/organisation/member/{memberId}:
    patch:
      operationId: updateOrganisationMember
      summary: Update Member Role
      description: Updates the role of an existing organisation member.
      tags:
      - Organisations
      parameters:
      - name: memberId
        in: path
        required: true
        schema:
          type: string
        description: Member ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - role
              properties:
                role:
                  type: string
                  enum:
                  - owner
                  - admin
                  - viewer
      responses:
        '200':
          description: Member role updated
        '401':
          $ref: '#/components/responses/Unauthorized'
    delete:
      operationId: removeOrganisationMember
      summary: Remove Organisation Member
      description: Removes a member from the organisation.
      tags:
      - Organisations
      parameters:
      - name: memberId
        in: path
        required: true
        schema:
          type: string
        description: Member ID
      responses:
        '204':
          description: Member removed
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  responses:
    BadRequest:
      description: Bad request - malformed body or missing required fields
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
    Unauthorized:
      description: Unauthorized - missing or invalid API key
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
    Forbidden:
      description: Forbidden - insufficient permissions
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
  parameters:
    orgId:
      name: orgId
      in: path
      required: true
      schema:
        type: string
      description: Organisation ID
  schemas:
    Organisation:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        role:
          type: string
          enum:
          - owner
          - admin
          - viewer
        members:
          type: array
          items:
            type: object
  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