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

# Events

> Requires Idempotency-Key (1–160 characters). An acknowledged batch is archived and queued; 202 does not mean normalization or scoring has finished. Reusing a key with different content returns 409. Reserved src_ source identities are rejected.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/events
openapi: 3.1.0
info:
  description: >-
    Selected current-source customer operations under preview. Access and
    integrations require workspace enablement; this is not a
    general-availability, onboarding or external-client registration promise.
    Request and query models come from code; many success responses have no
    response model and are intentionally untyped.
  title: Gather customer API — preview
  version: 0.1.0-preview
servers:
  - url: https://workspace.example.com
security: []
tags:
  - name: Governed data
  - name: HubSpot
  - name: Reviewed workflows
  - name: Rules and previews
  - name: Website preview
  - name: Workspace and observations
paths:
  /v1/events:
    post:
      tags:
        - Workspace and observations
      summary: Events
      description: >-
        Requires Idempotency-Key (1–160 characters). An acknowledged batch is
        archived and queued; 202 does not mean normalization or scoring has
        finished. Reusing a key with different content returns 409. Reserved
        src_ source identities are rejected.
      operationId: customer_post_v1_events
      parameters:
        - description: >-
            Required for browser-session mutations. Origin must exactly match
            the workspace; read the CSRF token from GET /v1/me using the browser
            session. A bearer-authenticated /v1/me response has csrf_token=null.
            Not required for bearer-token-only requests.
          in: header
          name: Origin
          required: false
          schema:
            type: string
        - description: >-
            Required for browser-session mutations. Origin must exactly match
            the workspace; read the CSRF token from GET /v1/me using the browser
            session. A bearer-authenticated /v1/me response has csrf_token=null.
            Not required for bearer-token-only requests.
          in: header
          name: X-CSRF-Token
          required: false
          schema:
            type: string
        - description: Stable receipt key; retries must preserve the exact request body.
          in: header
          name: Idempotency-Key
          required: true
          schema:
            maxLength: 160
            minLength: 1
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Batch'
        required: true
      responses:
        '202':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '401':
          description: Missing, expired or invalid workspace authentication.
        '403':
          description: >-
            Missing permission, browser-session requirement or CSRF validation
            failure.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        '423':
          description: Workspace lifecycle currently denies activity.
        '503':
          description: Workspace control or required dependency unavailable.
      security:
        - TenantBearer: []
        - TenantSession: []
components:
  schemas:
    Batch:
      additionalProperties: false
      properties:
        events:
          items:
            $ref: '#/components/schemas/Event'
          maxItems: 1000
          minItems: 1
          title: Events
          type: array
      required:
        - events
      title: Batch
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    Event:
      additionalProperties: false
      properties:
        deleted:
          default: false
          title: Deleted
          type: boolean
        event_id:
          pattern: ^[A-Za-z0-9_.:-]{1,160}$
          title: Event Id
          type: string
        event_type:
          pattern: ^[a-z][a-z0-9_]{0,63}$
          title: Event Type
          type: string
        occurred_at:
          format: date-time
          title: Occurred At
          type: string
        properties:
          additionalProperties: true
          title: Properties
          type: object
        source:
          default: product
          pattern: ^[a-z][a-z0-9_]{0,63}$
          title: Source
          type: string
        source_account_id:
          maxLength: 160
          minLength: 1
          title: Source Account Id
          type: string
        source_revision:
          default: 1
          maximum: 1000000
          minimum: 1
          title: Source Revision
          type: integer
      required:
        - event_id
        - source_account_id
        - event_type
        - occurred_at
      title: Event
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    TenantBearer:
      bearerFormat: JWT
      description: >-
        Organization-bound Auth0 API access token. Required permissions are
        listed per operation; this does not offer API-key or client-registration
        issuance.
      scheme: bearer
      type: http
    TenantSession:
      description: >-
        Production host-only browser session. Read csrf_token from GET /v1/me
        using this session; bearer authentication returns a null CSRF token and
        takes precedence over cookies. Session mutations require exact Origin
        and X-CSRF-Token. Development uses signal_session.
      in: cookie
      name: __Host-signal_session
      type: apiKey

````

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