Shruwd Connections API

First-party data sources.

GitHub OpenAPI

Operations 1

POST /brands/{brandId}/ingest-token Mint a log-drain token #

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/shruwd-io:shruwd-io-connections-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

shruwd-io-connections-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Shruwd Connections API
  version: '1'
  summary: Measure how a brand appears in AI answers, diagnose why, and prove movement.
  description: 'Shruwd tracks how a brand and its competitors show up in AI-generated answers

    (Google AI Overviews, Google AI Mode, ChatGPT, Gemini and Perplexity), sets that beside first-party AI-crawler

    logs, diagnoses **why** the brand is or is not cited, and re-checks

    whether a fix moved anything.


    **Authentication.** `Authorization: Bearer sh_live_…`. Keys are minted in the

    dashboard and carry scopes: `read` (every GET), `write` (everything else), or

    `default` (both). A dashboard session works too.


    **Tenant.** A key works on the one workspace it was minted for. A dashboard

    session works on the workspace named by the `X-Shruwd-Workspace` header, else

    the caller''s own; a key ignores the header. Within it, the caller reaches the

    brands they have access to: every brand for the workspace''s owner, a

    member''s own brands otherwise. A brand, prompt, entity, suggestion or finding

    that belongs to another workspace, or to a brand the caller cannot reach, is a

    `404`, indistinguishable from one that does not exist.


    **Roles.** Access is per brand. The workspace''s owner has every brand, and

    alone creates and archives brands and handles billing. Everyone else is a

    member of specific brands with a role on each: `viewer`, `editor` or

    `admin`. A request is judged on the caller''s role on the brand it acts on:

    reads need `viewer`, writes `editor`, minting an ingest token `admin`. A key

    reaches its holder''s brands, as they change, and never exceeds their role on

    any of them. Refusals are `403 not_a_member` and `403 insufficient_role`.


    **Errors.** The body is always `{ code, message, retryable, details? }` with the

    HTTP status. `retryable: true` (429, 5xx) may be retried with backoff;

    `Retry-After` is set on 429.


    **Rate limits.** Per key, per minute: 120 GET, 30 for everything else.


    **Metrics.** Every metric is a `DisplayableMetric`: a point estimate with its

    95% interval and `n`, or `insufficient_data` when fewer than ten responses

    exist, or `undefined` when the denominator is zero. `insufficient_data` is

    **not** zero. Do not report it as a number.


    **Measurement is asynchronous.** Creating a brand or a cycle schedules work;

    results arrive over the following hours and are read from `visibility`,

    `crawlers` and `findings`.'
  contact:
    name: Shruwd
    url: https://shruwd.io
  x-logo:
    url: https://shruwd.io/android-chrome-192x192.png
servers:
- url: https://shruwd.io/api/v1
security:
- apiKey: []
tags:
- name: Connections
  description: First-party data sources.
paths:
  /brands/{brandId}/ingest-token:
    parameters:
    - $ref: '#/components/parameters/brandId'
    post:
      operationId: createIngestToken
      tags:
      - Connections
      summary: Mint a log-drain token
      description: 'Returns the token **once**, with the endpoint to send server logs to

        (`POST ` with `Authorization: Bearer `, one log line

        per row). Previous tokens for the brand are revoked. Log ingest is what

        powers the crawler view and the highest-confidence findings.'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                label:
                  type: string
                  maxLength: 80
                  default: Log drain
      responses:
        '201':
          description: The token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IngestToken'
        '403':
          description: '`not_entitled`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          $ref: '#/components/responses/NotFound'
        default:
          $ref: '#/components/responses/Error'
components:
  parameters:
    brandId:
      name: brandId
      in: path
      required: true
      schema:
        type: string
      description: The brand's id, or its `slug` — both name the same brand. Responses carry the id as `brandId`.
  responses:
    NotFound:
      description: '`not_found`: no such resource in this workspace.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Error:
      description: Every failure has this body.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      required:
      - code
      - message
      - retryable
      properties:
        code:
          type: string
          description: Stable, machine-readable. E.g. `not_found`, `plan_limit`, `rate_limited`, `context_terms_required`.
        message:
          type: string
          description: For a person. May change between releases.
        retryable:
          type: boolean
          description: True when the same request may succeed later (429, 5xx).
        details:
          type: object
          additionalProperties: true
    IngestToken:
      type: object
      required:
      - token
      - tokenPrefix
      - label
      - endpoint
      - revokedPrevious
      - setup
      properties:
        token:
          type: string
          description: Shown once. Stored hashed; a lost token is replaced, not recovered.
        tokenPrefix:
          type: string
          description: Enough to recognise the token in settings, never enough to use it.
        label:
          type: string
        endpoint:
          type: string
          format: uri
          description: 'Where to POST log lines, with `Authorization: Bearer <token>`.'
        revokedPrevious:
          type: integer
          description: How many earlier tokens this one replaced.
        setup:
          type: object
          description: The three ways to get logs to the endpoint. Show the one that fits the site.
          required:
          - httpDrain
          - cloudflareLogpush
          - cloudflareWorker
          properties:
            httpDrain:
              type: object
              required:
              - endpoint
              - header
              - contentType
              - note
              properties:
                endpoint:
                  type: string
                  format: uri
                header:
                  type: string
                  const: X-Shruwd-Ingest-Token
                contentType:
                  type: string
                  const: application/x-ndjson
                note:
                  type: string
            cloudflareLogpush:
              type: object
              description: A Logpush job with an HTTP destination (Cloudflare Enterprise zones).
              required:
              - destinationUrl
              - dataset
              - fields
              - filter
              - note
              properties:
                destinationUrl:
                  type: string
                  format: uri
                  description: The endpoint with the token as a `header_Authorization` URL parameter, which Logpush turns into a request header. Contains the token.
                dataset:
                  type: string
                  const: http_requests
                fields:
                  type: array
                  items:
                    type: string
                filter:
                  type: string
                  description: The job's filter as the Logpush API takes it, a JSON string, keeping the job to the brand's domain and its www host.
                note:
                  type: string
            cloudflareWorker:
              type: object
              description: The reference forwarder Worker for any other Cloudflare plan or CDN-served site.
              required:
              - note
              - ingestUrl
              - secretName
              properties:
                note:
                  type: string
                ingestUrl:
                  type: string
                  format: uri
                secretName:
                  type: string
                  const: SHRUWD_INGEST_TOKEN
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: sh_live_…
      description: An API key minted in the dashboard, or a dashboard session.