Knotch Events API

Server-side conversion event ingestion. Accepts batches of up to 100 events over HTTPS with Bearer authentication, so conversions that happen off-site (CRM milestones such as ClosedWon, BecameSQL or Renewal, data-warehouse or marketing-automation outcomes) can be measured and attributed alongside on-site conversions in Knotch One, where they surface as "API Conversions". A simulate=true query parameter validates a payload without storing data. A Segment Webhook destination endpoint is also supported and is the only path present in the published OpenAPI.

Documentation

Specifications

Other Resources

OpenAPI Specification

knotch-events-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Knotch Events API
  description: Knotch Events API — send server-side conversion events from CRMs, data warehouses, or analytics
    tools directly into Knotch, where they are measured and attributed alongside Site Conversions in Knotch
    One. Harvested verbatim from https://events.knotch.it/openapi.json (published there as 'Custom Events
    API'). servers[] added by API Evangelist from the host the spec was served from, which is also the
    host Knotch's own Events API documentation names as the base URL.
  version: 0.1.0
paths:
  /conversion_events/segment/{account_id}:
    post:
      tags:
      - events
      summary: Get Events
      operationId: get_events_conversion_events_segment__account_id__post
      security:
      - HTTPBearer: []
      parameters:
      - name: account_id
        in: path
        required: true
        schema:
          type: string
          title: Account Id
      - name: simulate
        in: query
        required: false
        schema:
          type: boolean
          default: false
          title: Simulate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomEvents'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /health:
    get:
      summary: Health Check
      description: Health check endpoint.
      operationId: health_check_health_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
components:
  schemas:
    ClickId:
      properties:
        value:
          type: string
          title: Value
      type: object
      required:
      - value
      title: ClickId
    ClickIds:
      properties:
        msclkid:
          anyOf:
          - $ref: '#/components/schemas/ClickId'
          - type: 'null'
        fbclid:
          anyOf:
          - $ref: '#/components/schemas/ClickId'
          - type: 'null'
        ttclid:
          anyOf:
          - $ref: '#/components/schemas/ClickId'
          - type: 'null'
        li_fat_id:
          anyOf:
          - $ref: '#/components/schemas/ClickId'
          - type: 'null'
      type: object
      title: ClickIds
    CustomEvent:
      properties:
        event:
          $ref: '#/components/schemas/EventData'
        identity:
          $ref: '#/components/schemas/Identity'
        value:
          anyOf:
          - $ref: '#/components/schemas/Value'
          - type: 'null'
        event_source:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Event Source
        click_ids:
          anyOf:
          - $ref: '#/components/schemas/ClickIds'
          - type: 'null'
      type: object
      required:
      - event
      - identity
      title: CustomEvent
    CustomEvents:
      properties:
        events:
          items:
            $ref: '#/components/schemas/CustomEvent'
          type: array
          title: Events
      type: object
      required:
      - events
      title: CustomEvents
    EventData:
      properties:
        event_name:
          type: string
          title: Event Name
        timestamp:
          type: integer
          title: Timestamp
        event_id:
          type: string
          title: Event Id
      type: object
      required:
      - event_name
      - timestamp
      - event_id
      title: EventData
    Gclid:
      properties:
        value:
          anyOf:
          - type: string
          - type: 'null'
          title: Value
        first_seen:
          anyOf:
          - type: integer
          - type: 'null'
          title: First Seen
        last_seen:
          anyOf:
          - type: integer
          - type: 'null'
          title: Last Seen
      type: object
      title: Gclid
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Identity:
      properties:
        kn_cs_visitor_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Kn Cs Visitor Id
        gclid:
          anyOf:
          - $ref: '#/components/schemas/Gclid'
          - type: 'null'
        ecid:
          anyOf:
          - type: string
          - type: 'null'
          title: Ecid
        ga_client_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Ga Client Id
        marketo_lead_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Marketo Lead Id
      type: object
      title: Identity
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    Value:
      properties:
        value:
          anyOf:
          - type: number
          - type: 'null'
          title: Value
      type: object
      title: Value
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
servers:
- url: https://events.knotch.it
  description: Knotch Events API production host