> ## Documentation Index
> Fetch the complete documentation index at: https://outlit-codex-platform-actions-create-update-cli.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Ingest events

> Send tracking events to Outlit. The public key in the URL path identifies the workspace; no secret bearer token is required for this endpoint.



## OpenAPI

````yaml /openapi.json post /api/i/v1/{publicKey}/events
openapi: 3.1.0
info:
  title: Outlit API
  summary: Public Outlit Platform and Ingest APIs.
  description: >-
    Canonical OpenAPI specification for the public Outlit API surfaces
    documented at docs.outlit.ai.
  version: 1.0.0
servers:
  - url: https://app.outlit.ai
security:
  - bearerAuth: []
tags:
  - name: Platform API
    description: >-
      Authenticated API key routes for customer intelligence tools and
      integration management.
  - name: Ingest API
    description: Public-key event ingestion routes used by Outlit SDKs.
paths:
  /api/i/v1/{publicKey}/events:
    post:
      tags:
        - Ingest API
      summary: Ingest events
      description: >-
        Send tracking events to Outlit. The public key in the URL path
        identifies the workspace; no secret bearer token is required for this
        endpoint.
      operationId: ingestEvents
      parameters:
        - name: publicKey
          in: path
          required: true
          description: Your organization's public key. Starts with pk_.
          schema:
            type: string
            pattern: ^pk_
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IngestEventsRequest'
            example:
              visitorId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
              source: client
              events:
                - type: pageview
                  url: https://example.com/pricing
                  path: /pricing
                  title: Pricing - Example
                  timestamp: 1699999999999
      responses:
        '200':
          description: Events accepted.
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IngestEventsSuccess'
              example:
                success: true
        '400':
          description: Invalid request body or event payload.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IngestEventsError'
        '403':
          description: Invalid public key or unauthorized domain.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IngestEventsError'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IngestEventsError'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IngestEventsError'
      security: []
components:
  schemas:
    IngestEventsRequest:
      type: object
      required:
        - events
      properties:
        visitorId:
          type: string
          format: uuid
          description: Browser visitor identifier. Required for client tracking.
        source:
          type: string
          enum:
            - client
            - server
            - integration
          default: client
        userIdentity:
          $ref: '#/components/schemas/UserIdentity'
        customerIdentity:
          $ref: '#/components/schemas/CustomerIdentity'
        events:
          type: array
          minItems: 1
          maxItems: 100
          items:
            $ref: '#/components/schemas/IngestEvent'
      additionalProperties: false
    IngestEventsSuccess:
      type: object
      required:
        - success
      properties:
        success:
          type: boolean
          const: true
      additionalProperties: true
    IngestEventsError:
      type: object
      required:
        - success
        - message
      properties:
        success:
          type: boolean
          const: false
        message:
          type: string
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssue'
      additionalProperties: true
    UserIdentity:
      type: object
      properties:
        email:
          type: string
          format: email
        userId:
          type: string
        traits:
          $ref: '#/components/schemas/JsonObject'
      additionalProperties: false
    CustomerIdentity:
      type: object
      properties:
        customerId:
          type: string
        customerTraits:
          $ref: '#/components/schemas/JsonObject'
      additionalProperties: false
    IngestEvent:
      oneOf:
        - $ref: '#/components/schemas/PageviewEvent'
        - $ref: '#/components/schemas/CustomEvent'
        - $ref: '#/components/schemas/FormEvent'
        - $ref: '#/components/schemas/IdentifyEvent'
        - $ref: '#/components/schemas/EngagementEvent'
        - $ref: '#/components/schemas/CalendarEvent'
        - $ref: '#/components/schemas/StageEvent'
        - $ref: '#/components/schemas/BillingEvent'
    ValidationIssue:
      type: object
      required:
        - path
        - message
      properties:
        path:
          type: array
          items:
            type:
              - string
              - number
        message:
          type: string
      additionalProperties: false
    JsonObject:
      type: object
      additionalProperties: true
    PageviewEvent:
      allOf:
        - $ref: '#/components/schemas/BaseEventFields'
        - type: object
          required:
            - type
          properties:
            type:
              const: pageview
            title:
              type: string
    CustomEvent:
      allOf:
        - $ref: '#/components/schemas/BaseEventFields'
        - type: object
          required:
            - type
            - eventName
          properties:
            type:
              const: custom
            eventName:
              type: string
            properties:
              $ref: '#/components/schemas/JsonObject'
    FormEvent:
      allOf:
        - $ref: '#/components/schemas/BaseEventFields'
        - type: object
          required:
            - type
          properties:
            type:
              const: form
            formId:
              type: string
            formFields:
              $ref: '#/components/schemas/JsonObject'
    IdentifyEvent:
      allOf:
        - $ref: '#/components/schemas/BaseEventFields'
        - type: object
          required:
            - type
          properties:
            type:
              const: identify
            email:
              type: string
              format: email
            userId:
              type: string
            customerId:
              type: string
            traits:
              $ref: '#/components/schemas/JsonObject'
            customerTraits:
              $ref: '#/components/schemas/JsonObject'
    EngagementEvent:
      allOf:
        - $ref: '#/components/schemas/BaseEventFields'
        - type: object
          required:
            - type
            - activeTimeMs
            - totalTimeMs
            - sessionId
          properties:
            type:
              const: engagement
            activeTimeMs:
              type: number
              minimum: 0
            totalTimeMs:
              type: number
              minimum: 0
            sessionId:
              type: string
              format: uuid
    CalendarEvent:
      allOf:
        - $ref: '#/components/schemas/BaseEventFields'
        - type: object
          required:
            - type
            - provider
          properties:
            type:
              const: calendar
            provider:
              type: string
              enum:
                - cal.com
                - calendly
                - unknown
            eventType:
              type: string
            startTime:
              type: string
              format: date-time
            endTime:
              type: string
              format: date-time
            duration:
              type: number
            isRecurring:
              type: boolean
            inviteeEmail:
              type: string
              format: email
            inviteeName:
              type: string
    StageEvent:
      allOf:
        - $ref: '#/components/schemas/BaseEventFields'
        - type: object
          required:
            - type
            - stage
          properties:
            type:
              const: stage
            stage:
              type: string
              enum:
                - activated
                - engaged
                - inactive
            properties:
              $ref: '#/components/schemas/JsonObject'
    BillingEvent:
      allOf:
        - $ref: '#/components/schemas/BaseEventFields'
        - type: object
          required:
            - type
            - status
          properties:
            type:
              const: billing
            status:
              type: string
              enum:
                - trialing
                - paid
                - churned
            customerId:
              type: string
            stripeCustomerId:
              type: string
            properties:
              $ref: '#/components/schemas/JsonObject'
    BaseEventFields:
      type: object
      required:
        - type
      properties:
        type:
          type: string
        timestamp:
          type: number
          description: Unix timestamp in milliseconds.
        url:
          type: string
          format: uri
        path:
          type: string
        referrer:
          type: string
        utm:
          $ref: '#/components/schemas/UtmParameters'
    UtmParameters:
      type: object
      properties:
        source:
          type: string
        medium:
          type: string
        campaign:
          type: string
        term:
          type: string
        content:
          type: string
      additionalProperties: false
  headers:
    RateLimitLimit:
      description: Maximum requests allowed in the current window.
      schema:
        type: integer
        example: 100
    RateLimitRemaining:
      description: Requests remaining in the current window.
      schema:
        type: integer
        example: 95
    RateLimitReset:
      description: Unix timestamp when the current rate limit window resets.
      schema:
        type: integer
        example: 1699999999
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Outlit API key using the Bearer ok_... format.

````