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

# Log visit

> Forward a visit to the Analytics API

Visits are logged to the Analytics API by making a POST request to the `/visit` endpoint.

The request body should forward the visitor's request HTTP path, method, and headers as described below.


## OpenAPI

````yaml POST /visit
openapi: 3.1.0
info:
  title: Log visit
  description: >-
    API for logging HTTP request information including paths, methods, IPs, and
    headers
  version: 1.0.0
servers:
  - url: https://analytics.usehall.com
security:
  - bearerAuth: []
paths:
  /visit:
    post:
      description: Forward a visit to the Analytics API
      requestBody:
        description: Visitor request to forward to the Analytics API.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RequestLog'
        required: true
      responses:
        '200':
          description: Success.
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    RequestLog:
      required:
        - request_path
        - request_method
      type: object
      properties:
        request_path:
          description: The path of the HTTP request.
          type: string
          example: /blog/becoming-an-ai-engineering-company
        request_method:
          description: The HTTP method used for the request.
          type: string
          enum:
            - GET
            - POST
            - PUT
            - DELETE
            - PATCH
          example: GET
        request_ip:
          description: >-
            The IP address making the request. This is optional, but may effect
            the [availability of some features](/ip-addresses).
          type: string
          example: 172.183.222.128
        request_timestamp:
          description: The UNIX Epoch timestamp when the original request occurred.
          type: integer
          format: int64
          example: 1705315800
        request_headers:
          description: HTTP headers sent with the request.
          type: object
          required:
            - Host
            - User-Agent
          properties:
            Host:
              type: string
              description: The Host header field.
              example: vercel.com
            User-Agent:
              type: string
              description: The User-Agent header field.
              example: >-
                Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible;
                ChatGPT-User/1.0; +https://openai.com/bot
            Referer:
              type: string
              description: The Referer header field.
              example: https://chatgpt.com
          additionalProperties:
            type: string
            description: Any additional HTTP headers.
            example:
              Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
              Accept-Language: en-US,en;q=0.5
              Accept-Encoding: gzip, deflate, br
              Connection: keep-alive
              Content-Length: '1234'
              Content-Type: text/html; charset=utf-8
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````