> ## Documentation Index
> Fetch the complete documentation index at: https://www.usenotra.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get the install snippets

> The endpoint and framework snippets needed to send AI traffic to Notra, plus, when web analytics is enabled for the workspace, the notra.js install: the public web key, the script tag and the pinned script URLs with their Subresource Integrity values. Web keys always belong to one project: pass `projectId` for that project's key, or omit it for the organization's oldest project. The snippets read the tracking token from an environment variable; the token itself is issued by `POST /geo/ingest/token`, which requires a write scope.



## OpenAPI

````yaml https://api.usenotra.com/openapi.json get /v1/geo/ingest/setup
openapi: 3.1.1
info:
  title: Notra API
  version: 1.0.0
  description: >-
    OpenAPI schema for Notra content endpoints. Use GET /v1/status for public
    reachability. Error responses include recovery guidance. Breaking changes
    ship under a new major path; deprecated operations send Deprecation and
    Sunset headers at least 90 days before removal.
servers:
  - url: https://api.usenotra.com
    description: Production
  - url: https://demo-api.usenotra.com
    description: >-
      Sandbox with sample data. Get a free sandbox key at demo.usenotra.com, no
      signup needed
security:
  - BearerAuth: []
tags:
  - name: Webhooks
    description: Manage outbound webhook subscriptions and delivery history.
  - name: Discovery
    description: Public API status and authenticated workspace discovery.
  - name: Content
    description: >-
      Manage posts, brand identities, and GitHub or Linear integrations, and
      queue content generation. Organization is inferred from the API key
      (identity.externalId).
  - name: Schedules
    description: >-
      Manage scheduled content generation. Organization is inferred from the API
      key (identity.externalId).
  - name: Event Triggers
    description: >-
      Manage event-based content generation triggered by GitHub webhooks.
      Organization is inferred from the API key (identity.externalId).
  - name: Chats
    description: >-
      Manage chat sessions. Organization is inferred from the API key
      (identity.externalId).
  - name: Skills
    description: >-
      Manage reusable writing skills. Organization is inferred from the API key
      (identity.externalId).
  - name: Feedback
    description: >-
      Collect and triage feedback submitted by AI agents. Agents post to the
      organization's feedback URL without credentials; reading and triage
      require an API key with feedback.read or feedback.write.
  - name: GEO
    description: >-
      Manage generative engine optimization: projects, tracking settings,
      prompts, prompt sequences, competitors, scans, visibility reads, content
      gaps and briefs, agent readiness and AI traffic. Project-scoped endpoints
      require the GEO plan entitlement in addition to their scope;
      organization-level ingest endpoints require only the traffic scope.
  - name: Sites
    description: >-
      Notra Sites are hosted blogs and changelogs built from a GitHub
      repository. Read Sites and their deployments, start builds, preview posts
      on a Site, open pull requests that publish posts to it, and manage
      blog.json authors and the author page through staged Design changes.
      Domains, settings, rollbacks and deletion stay in the dashboard.
externalDocs:
  description: Notra API versioning and deprecation policy
  url: https://www.usenotra.com/docs/api/versioning
paths:
  /v1/geo/ingest/setup:
    get:
      tags:
        - GEO
      summary: Get the install snippets
      description: >-
        The endpoint and framework snippets needed to send AI traffic to Notra,
        plus, when web analytics is enabled for the workspace, the notra.js
        install: the public web key, the script tag and the pinned script URLs
        with their Subresource Integrity values. Web keys always belong to one
        project: pass `projectId` for that project's key, or omit it for the
        organization's oldest project. The snippets read the tracking token from
        an environment variable; the token itself is issued by `POST
        /geo/ingest/token`, which requires a write scope.
      operationId: getGeoIngestSetup
      parameters:
        - schema:
            type: string
            minLength: 1
            pattern: ^[A-Za-z0-9_-]{1,100}$
            description: >-
              Return the web key for one project. Omit for the oldest project's
              web key.
          required: false
          description: >-
            Return the web key for one project. Omit for the oldest project's
            web key.
          name: projectId
          in: query
      responses:
        '200':
          description: Setup fetched successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeoIngestSetupResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '402':
          description: GEO plan or available AI credits required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Organization, project or resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Authentication or billing service unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    GeoIngestSetupResponse:
      type: object
      properties:
        ingestUrl:
          type: string
          description: Endpoint the tracking snippet posts events to.
        snippet:
          type: string
          description: Install snippet for the default framework (Next.js).
        snippets:
          type: object
          properties:
            next:
              type: string
            nuxt:
              type: string
            netlify:
              type: string
            tanstack:
              type: string
            astro:
              type: string
            sveltekit:
              type: string
            reactRouter:
              type: string
          required:
            - next
            - nuxt
            - netlify
            - tanstack
            - astro
            - sveltekit
            - reactRouter
        drainUrls:
          type: object
          properties:
            vercel:
              type: string
            cloudflare:
              type: string
          required:
            - vercel
            - cloudflare
          description: >-
            Endpoints a Vercel log drain or Cloudflare Logpush job posts request
            logs to, authenticated with the tracking token.
        organization:
          type: object
          properties:
            id:
              type: string
            slug:
              type: string
            name:
              type: string
            logo:
              type:
                - string
                - 'null'
          required:
            - id
            - slug
            - name
            - logo
        webKey:
          type: string
          description: >-
            Public key for the notra.js browser script, bound to one project.
            Safe to put in page HTML; it only records human page views on that
            project's tracked domains and survives token rotation. Only present
            when web analytics is enabled for the workspace and it has a
            project.
        webSnippet:
          type: string
          description: >-
            Script tag that installs notra.js with the public key, pinned to the
            current build with its Subresource Integrity hash and
            crossorigin="anonymous". Build an auto-updating tag from
            webScript.url instead if you want new builds without copying the tag
            again. Only present when web analytics is enabled for the workspace.
        webScript:
          type: object
          properties:
            url:
              type: string
              description: Always serves the latest build.
            pinnedUrl:
              type: string
              description: Serves exactly this build forever; it never updates.
            integrity:
              type: string
              description: >-
                Subresource Integrity value for pinnedUrl (sha384). Use it with
                crossorigin="anonymous".
            collectUrl:
              type: string
              description: >-
                Where page views go when the script loads from Notra's script
                host; set it as the tag's data-api.
          required:
            - url
            - pinnedUrl
            - integrity
          description: >-
            notra.js: the auto-updating URL and the current build pinned with
            Subresource Integrity. Only present when web analytics is enabled
            for the workspace.
        webPlusScript:
          type: object
          properties:
            url:
              type: string
              description: Always serves the latest build.
            pinnedUrl:
              type: string
              description: Serves exactly this build forever; it never updates.
            integrity:
              type: string
              description: >-
                Subresource Integrity value for pinnedUrl (sha384). Use it with
                crossorigin="anonymous".
            collectUrl:
              type: string
              description: >-
                Where page views go when the script loads from Notra's script
                host; set it as the tag's data-api.
          required:
            - url
            - pinnedUrl
            - integrity
          description: >-
            notra.plus.js (notra.js with JavaScript error reporting),
            auto-updating and pinned. Only present when web analytics is enabled
            for the workspace.
      required:
        - ingestUrl
        - snippet
        - snippets
        - drainUrls
        - organization
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
        recovery:
          type: string
      required:
        - error
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        Send your API key in the Authorization header as Bearer API_KEY. Account
        API keys work in every workspace you belong to: send
        X-Notra-Organization-Id with the workspace id or slug to choose one.
        Workspace endpoints require it when you belong to more than one
        workspace; GET /v1/me/workspaces works without it. Organization keys
        only accept their own workspace there.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.