squirrelscan Organizations API

Read organization details and membership.

GitHub OpenAPI

Operations 4

GET /v1/organizations/{id} Get an organization #

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/squirrelscan-com:squirrelscan-com-organizations-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

squirrelscan-com-organizations-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: squirrelscan Public Organizations API
  version: 1.0.0
  summary: Programmatic website-audit API for external clients, agents, and MCP integrations.
  description: 'The public `/v1` REST surface of squirrelscan.


    This document covers the **external-client-facing** routes only — internal

    server-to-server callbacks (`/v1/*/internal/*`), webhook receivers

    (`/v1/webhooks`, `/v1/github`), and admin-only routes (`/v1/admin/*`,

    `/v1/stats`, `/v1/users`) are intentionally out of scope and NOT part of the

    public contract.


    All error responses use a stable typed envelope:

    `{ "error": { "code": string, "message": string, "requestId"?: string } }`.


    Authentication is via a bearer token in the `Authorization` header.

    Organization API keys with an `sq_` prefix (`sq_dev_` in development) are the

    primary mechanism for automated clients and agents; set one as the

    `SQUIRRELSCAN_API_KEY` environment variable and the CLI and this REST API both

    pick it up. CLI login tokens (`sqcli_`) and Clerk dashboard JWTs are also

    accepted. MCP clients can reach these same audit tools over the hosted MCP

    server at https://mcp.squirrelscan.com/mcp.'
  contact:
    name: squirrelscan support
    url: https://squirrelscan.com
  license:
    name: Proprietary
servers:
- url: https://api.squirrelscan.com
  description: Production
security:
- bearerAuth: []
tags:
- name: Organizations
  description: Read organization details and membership.
paths:
  /v1/organizations/{id}:
    get:
      tags:
      - Organizations
      summary: Get an organization
      description: Read an organization the caller belongs to (an API key reads its own organization), with its plan limits. A signed-in member also gets the member list. An API key gets neither the member list nor the organization's billing fields, and keeps working after the member who made it leaves.
      operationId: getOrganization
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Organization detail.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationDetail'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
  /v1/organizations/{id}/logo:
    get:
      tags:
      - Organizations
      summary: Get an organization logo
      description: Public and unauthenticated — streams the organization's logo image (PNG/JPEG/WebP) with its stored content type, or 404 when no logo is set. This is the stable URL that `organizations.avatarUrl` points to.
      operationId: getOrganizationLogo
      security: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: The logo image.
          content:
            image/png:
              schema:
                type: string
                format: binary
            image/jpeg:
              schema:
                type: string
                format: binary
            image/webp:
              schema:
                type: string
                format: binary
        '404':
          $ref: '#/components/responses/NotFound'
    post:
      tags:
      - Organizations
      summary: Upload an organization logo
      description: Owner/admin only. Multipart upload with a `file` field. Accepts PNG/JPEG/WebP validated by magic bytes (SVG and non-images are rejected regardless of declared content type), max 1MB. Stores the image and persists its public URL on `organizations.avatarUrl`.
      operationId: uploadOrganizationLogo
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
              - file
              properties:
                file:
                  type: string
                  format: binary
                  description: PNG, JPEG, or WebP image, max 1MB.
      responses:
        '200':
          description: Logo stored; returns the served URL.
          content:
            application/json:
              schema:
                type: object
                required:
                - avatarUrl
                properties:
                  avatarUrl:
                    type: string
                    format: uri
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '415':
          description: The bytes are not a PNG/JPEG/WebP image (e.g. SVG). Typed envelope with code `UNSUPPORTED_MEDIA_TYPE`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: UNSUPPORTED_MEDIA_TYPE
                  message: Logo must be a PNG, JPEG, or WebP image
    delete:
      tags:
      - Organizations
      summary: Remove an organization logo
      description: Owner/admin only. Deletes the stored logo and clears `organizations.avatarUrl`.
      operationId: deleteOrganizationLogo
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Logo removed; `avatarUrl` is now null.
          content:
            application/json:
              schema:
                type: object
                required:
                - avatarUrl
                properties:
                  avatarUrl:
                    type: 'null'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  responses:
    Unauthorized:
      description: 'Missing or invalid credentials (including the shared auth middleware: no/invalid bearer token). Typed envelope with code `UNAUTHORIZED`. Branch on the `401` status, not the message.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: UNAUTHORIZED
              message: Authentication required
    NotFound:
      description: Resource not found (or hidden from the caller).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: NOT_FOUND
              message: Report not found
    Forbidden:
      description: Authenticated but not permitted (e.g. not a member of the requested organization). Typed envelope; code `FORBIDDEN`, or `NO_ORG` when no active organization is resolved on credit/org-scoped routes. Branch on the `403` status.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            noOrg:
              summary: No active organization resolved
              value:
                error:
                  code: NO_ORG
                  message: No active organization
            forbidden:
              summary: Not permitted (e.g. API key scoped to a different org)
              value:
                error:
                  code: FORBIDDEN
                  message: API key is not scoped to this organization
    ValidationError:
      description: 'Request body or query failed validation. `error.issues` lists up to 10 failed fields (`{ path, message }`); when more failed, `error.truncated: true` and `error.totalIssues` indicate the full count.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: VALIDATION_ERROR
              message: Request failed validation
              issues:
              - path: url
                message: Invalid url
    PayloadTooLarge:
      description: The request body exceeds the maximum allowed size.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: PAYLOAD_TOO_LARGE
              message: Report exceeds maximum size
  schemas:
    OrganizationDetail:
      type: object
      required:
      - organization
      - plan
      - role
      properties:
        organization:
          type: object
          required:
          - id
          - name
          - slug
          - planId
          properties:
            id:
              type: string
            name:
              type: string
            slug:
              type: string
            planId:
              type: string
            createdAt:
              type:
              - string
              - 'null'
              format: date-time
            updatedAt:
              type:
              - string
              - 'null'
              format: date-time
          additionalProperties: true
        members:
          type: array
          description: 'Members of the organization. Returned only to a signed-in caller who is a member (others get 404). Omitted for API keys: a key acts for the organization, not as one of its people, and can outlive the member who made it.'
          items:
            type: object
            properties:
              id:
                type: string
              userId:
                type: string
              role:
                type: string
                enum:
                - owner
                - admin
                - editor
                - viewer
                - billing
              createdAt:
                type: string
                format: date-time
              userName:
                type:
                - string
                - 'null'
              userEmail:
                type:
                - string
                - 'null'
                format: email
                description: 'PII — a fellow member''s email address. Intentionally exposed so org members can see their teammates (the dashboard team view renders it); access is gated by the membership check above. Treat as sensitive: do not log, cache publicly, or surface outside an authenticated org-member context.'
              userAvatarUrl:
                type:
                - string
                - 'null'
        plan:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
            maxMembers:
              type: integer
            monthlyCredits:
              type: integer
            signupGrantCredits:
              type: integer
        role:
          type: string
          enum:
          - owner
          - admin
          - editor
          - viewer
          - billing
          description: The caller's role in the organization. An API key reports admin; what it may do is set by its scopes.
    Error:
      type: object
      description: Stable error envelope returned by all public routes.
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          properties:
            code:
              type: string
              description: Stable machine-readable error code (SCREAMING_SNAKE_CASE). Treat unknown codes as opaque.
            message:
              type: string
              description: Human-readable description. May change; do not match on it.
            requestId:
              type: string
              description: Correlation id for support / log lookups, when available.
          additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Bearer token in the `Authorization` header: `Authorization: Bearer <token>`.


        Programmatic API keys are prefixed `sq_` (issue #154; bearer auth lands in #156). The same scheme today also accepts CLI tokens (`sqcli_` prefix) and Clerk dashboard JWTs.'