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

# Record Event

> Record one funnel touchpoint. Never fails the caller's flow.

Returns 200 with ``recorded: false`` when the write did not land — the
browser fires this as a fire-and-forget beacon beside a real user action,
and a 5xx here would surface as a console error on a page that is
otherwise working.



## OpenAPI

````yaml /openapi.json post /api/v1/visitors/events
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/visitors/events:
    post:
      tags:
        - Visitors
      summary: Record Event
      description: >-
        Record one funnel touchpoint. Never fails the caller's flow.


        Returns 200 with ``recorded: false`` when the write did not land — the

        browser fires this as a fire-and-forget beacon beside a real user
        action,

        and a 5xx here would surface as a console error on a page that is

        otherwise working.
      operationId: record_event_api_v1_visitors_events_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VisitorEventRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VisitorEventResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    VisitorEventRequest:
      properties:
        event_type:
          type: string
          enum:
            - audit_intent
            - account_linked
          title: Event Type
        session_token:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Session Token
        context:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Context
      type: object
      required:
        - event_type
      title: VisitorEventRequest
    VisitorEventResponse:
      properties:
        recorded:
          type: boolean
          title: Recorded
        linked_events:
          type: integer
          title: Linked Events
          default: 0
      type: object
      required:
        - recorded
      title: VisitorEventResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````