Umami Collection API

The Collection API from Umami — 3 operation(s) for collection.

Operations 3

POST /api/batch Send a batch of tracking requests #
POST /api/record Send session recordings or heatmap data #
POST /api/send Send tracking data #

Documentation

Specifications

Schemas & Data

📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/json-schema/umami-website-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/json-schema/umami-website-pageviews-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/json-schema/umami-create-website-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/json-schema/umami-website-page-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/json-schema/umami-website-stats-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/json-schema/umami-website-session-page-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/json-schema/umami-website-list-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/json-schema/umami-website-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/json-schema/umami-pageview-data-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/json-schema/umami-metric-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/json-schema/umami-active-visitors-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/json-schema/umami-session-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/json-schema/umami-session-list-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/json-schema/umami-session-stats-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/json-schema/umami-user-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/json-schema/umami-user-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/json-schema/umami-team-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/json-schema/umami-team-list-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/json-schema/umami-team-member-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/json-schema/umami-team-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/json-schema/umami-login-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/json-schema/umami-login-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/json-schema/umami-ok-response-schema.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/json-structure/umami-website-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/json-structure/umami-website-list-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/json-structure/umami-website-stats-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/json-structure/umami-session-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/json-structure/umami-session-list-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/json-structure/umami-metric-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/json-structure/umami-user-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/json-structure/umami-team-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/json-structure/umami-team-member-structure.json

Other Resources

🔗
Postman
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/postman/umami-events-api.postman_collection.json
🔗
OpenCollection
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/collections/umami-events-api.opencollection.json
🔗
APIDocumentation
https://docs.umami.is/docs/api
🔗
GitHubOrg
https://github.com/umami-software/umami
🔗
JSONLDContext
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/json-ld/umami-context.jsonld
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/examples/umami-website-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/examples/umami-website-stats-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/examples/umami-pageview-data-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/examples/umami-metric-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/examples/umami-session-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/examples/umami-session-stats-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/examples/umami-user-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/examples/umami-team-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/examples/umami-active-visitors-example.json
🔗
Postman
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/postman/umami-sessions-api.postman_collection.json
🔗
OpenCollection
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/collections/umami-sessions-api.opencollection.json
🔗
Postman
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/postman/umami-website-statistics-api.postman_collection.json
🔗
OpenCollection
https://raw.githubusercontent.com/api-evangelist/umami/refs/heads/main/collections/umami-website-statistics-api.opencollection.json

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/umami:umami-collection-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

umami-collection-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Umami Collection API
  version: 3.3.1
  license:
    identifier: MIT
    name: MIT
  x-refined-note:
  - x-source differs across the merged source definitions and was not carried
  description: 'Operations tagged Collection across 2 of this provider''s published API definitions: umami-openapi.json, umami-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://{instance}
  description: Self-hosted Umami instance (paths begin with /api). Umami Cloud serves the same API at https://api.umami.is/v1 per docs.umami.is/docs/api.
  variables:
    instance:
      default: your-umami-instance.example.com
tags:
- name: Collection
paths:
  /api/batch:
    post:
      description: Processes up to 500 tracking payloads and returns processed and failed counts, individual error details, and a tracking cache token.
      operationId: batch
      requestBody:
        content:
          application/json:
            schema:
              items:
                additionalProperties: true
                type: object
              maxItems: 500
              type: array
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  cache: {}
                  details:
                    items: {}
                    type: array
                  errors:
                    type: number
                  processed:
                    type: number
                  size: {}
                required:
                - size
                - processed
                - errors
                - details
                - cache
                type: object
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              example:
                error:
                  code: bad-request
                  message: Bad request.
                  status: 400
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Bad request.
        '500':
          content:
            application/json:
              example:
                error:
                  code: server-error
                  message: Server error.
                  status: 500
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Server error.
      security: []
      summary: Send a batch of tracking requests
      tags:
      - Collection
      x-umami-audience: collect
      x-umami-contract: explicit
      x-umami-source: src/app/api/batch/contract.generated.ts
  /api/record:
    post:
      description: Stores session replay events or heatmap clicks and scrolls for a website, using a valid tracking cache token to identify the session and visit.
      operationId: record
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
              - properties:
                  payload:
                    properties:
                      events:
                        items: {}
                        maxItems: 200
                        type: array
                      timestamp:
                        type: integer
                      website:
                        format: uuid
                        type: string
                    required:
                    - website
                    - events
                    type: object
                  type:
                    const: record
                required:
                - type
                - payload
                type: object
              - properties:
                  payload:
                    properties:
                      events:
                        items:
                          anyOf:
                          - properties:
                              pageH:
                                description: Page height in pixels.
                                type: number
                              pageW:
                                description: Page width in pixels.
                                type: number
                              pageX:
                                description: Horizontal position on the page in pixels.
                                type: number
                              pageY:
                                description: Vertical position on the page in pixels.
                                type: number
                              timestamp:
                                type: integer
                              type:
                                const: click
                              url:
                                description: URL associated with the resource.
                                type: string
                              viewportH:
                                description: Viewport height in pixels.
                                type: number
                              viewportW:
                                description: Viewport width in pixels.
                                type: number
                              x:
                                type: number
                              y:
                                type: number
                            required:
                            - type
                            - url
                            type: object
                          - properties:
                              pageH:
                                description: Page height in pixels.
                                type: number
                              pageW:
                                description: Page width in pixels.
                                type: number
                              scrollPct:
                                type: number
                              timestamp:
                                type: integer
                              type:
                                const: scroll
                              url:
                                description: URL associated with the resource.
                                type: string
                              viewportH:
                                description: Viewport height in pixels.
                                type: number
                              viewportW:
                                description: Viewport width in pixels.
                                type: number
                            required:
                            - type
                            - url
                            type: object
                        maxItems: 200
                        type: array
                      timestamp:
                        type: integer
                      website:
                        format: uuid
                        type: string
                    required:
                    - website
                    - events
                    type: object
                  type:
                    const: heatmap
                required:
                - type
                - payload
                type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                anyOf:
                - properties:
                    ok:
                      description: Whether the operation succeeded.
                      type: boolean
                  required:
                  - ok
                  type: object
                - properties:
                    ok:
                      description: Whether the operation succeeded.
                      type: boolean
                    reason:
                      type: string
                  required:
                  - ok
                  - reason
                  type: object
                - properties:
                    beep:
                      type: string
                  required:
                  - beep
                  type: object
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              example:
                error:
                  code: bad-request
                  message: Bad request.
                  status: 400
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Bad request.
        '403':
          content:
            application/json:
              example:
                error:
                  code: forbidden
                  message: Forbidden.
                  status: 403
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Forbidden.
        '413':
          content:
            application/json:
              example:
                error:
                  code: payload-too-large
                  message: Payload too large.
                  status: 413
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Payload too large.
        '500':
          content:
            application/json:
              example:
                error:
                  code: server-error
                  message: Server error.
                  status: 500
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Server error.
      security: []
      summary: Send session recordings or heatmap data
      tags:
      - Collection
      x-umami-audience: collect
      x-umami-contract: explicit
      x-umami-source: src/app/api/record/contract.generated.ts
  /api/send:
    post:
      description: Collects a pageview, custom event, visitor identification, or performance payload and returns session information and a tracking cache token when accepted.
      operationId: send
      requestBody:
        content:
          application/json:
            schema:
              properties:
                payload:
                  properties:
                    browser:
                      description: Browser used by the visitor.
                      type: string
                    cls:
                      maximum: 100
                      minimum: 0
                      type: number
                    data:
                      additionalProperties: true
                      description: Custom event data.
                      type: object
                    device:
                      description: Device category used by the visitor.
                      type: string
                    fcp:
                      maximum: 60000
                      minimum: 0
                      type: number
                    hostname:
                      description: Hostname on which the activity occurred.
                      type: string
                    id:
                      description: Distinct ID of the visitor.
                      type: string
                    inp:
                      maximum: 60000
                      minimum: 0
                      type: number
                    ip:
                      type: string
                    language:
                      description: Preferred language reported by the visitor browser.
                      type: string
                    lcp:
                      maximum: 60000
                      minimum: 0
                      type: number
                    link:
                      format: uuid
                      type: string
                    name:
                      description: Name of the custom event.
                      type: string
                    os:
                      description: Operating system used by the visitor.
                      type: string
                    pixel:
                      format: uuid
                      type: string
                    referrer:
                      description: URL of the referring page.
                      type: string
                    screen:
                      description: Screen resolution of the visitor device.
                      type: string
                    tag:
                      description: Tag attached to the tracked activity.
                      type: string
                    timestamp:
                      type: integer
                    title:
                      description: Title of the page.
                      type: string
                    ttfb:
                      maximum: 60000
                      minimum: 0
                      type: number
                    url:
                      description: URL of the page.
                      type: string
                    userAgent:
                      type: string
                    website:
                      format: uuid
                      type: string
                  type: object
                type:
                  enum:
                  - event
                  - identify
                  - performance
                  type: string
              required:
              - type
              - payload
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                anyOf:
                - properties:
                    beep:
                      type: string
                  required:
                  - beep
                  type: object
                - properties:
                    cache: {}
                    sessionId:
                      description: ID of the visitor session.
                    visitId:
                      description: ID of the visit.
                  required:
                  - cache
                  - sessionId
                  - visitId
                  type: object
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              example:
                error:
                  code: bad-request
                  message: Bad request.
                  status: 400
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Bad request.
        '403':
          content:
            application/json:
              example:
                error:
                  code: forbidden
                  message: Forbidden.
                  status: 403
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Forbidden.
        '500':
          content:
            application/json:
              example:
                error:
                  code: server-error
                  message: Server error.
                  status: 500
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Server error.
      security: []
      summary: Send tracking data
      tags:
      - Collection
      x-umami-audience: collect
      x-umami-contract: explicit
      x-umami-source: src/app/api/send/contract.generated.ts
components:
  schemas:
    ApiError:
      additionalProperties: false
      description: Standard Umami API error response.
      properties:
        error:
          additionalProperties: {}
          description: Error details returned when the operation fails.
          properties:
            code:
              type: string
            message:
              description: Human-readable explanation of the result.
              type: string
            status:
              maximum: 9007199254740991
              minimum: -9007199254740991
              type: integer
          required:
          - message
          - code
          - status
          type: object
      required:
      - error
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      description: Token returned by POST /api/auth/login, or an API key (`umami_…`) created under Settings → API keys (self-hosted only).
      scheme: bearer
      type: http
    shareContext:
      description: Required context header when authenticating with a share token.
      in: header
      name: x-umami-share-context
      type: apiKey
    shareToken:
      description: Signed token returned by a share endpoint.
      in: header
      name: x-umami-share-token
      type: apiKey
externalDocs:
  description: Umami API documentation
  url: https://docs.umami.is/docs/api
x-refined-from:
- umami-openapi.json
- umami-openapi.yml