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

# Report chat timing



## OpenAPI

````yaml /api-reference/openapi.json post /api/mcp/chat/timing
openapi: 3.1.0
info:
  title: Waniwani API
  version: 1.0.0
  description: >-
    The HTTP routes the Waniwani SDK and chat widget call. Use them from any
    language. Server routes take a secret `wwk_` API key; chat routes take a
    channel's `wwp_` public key, which is meant to ship in a web page.
servers:
  - url: https://app.waniwani.ai
    description: US region
  - url: https://eu.app.waniwani.ai
    description: EU region
security: []
tags:
  - name: Server API
    description: Called from your server with a secret `wwk_` API key.
  - name: Chat API
    description: Called from a web page with a channel's `wwp_` public key.
paths:
  /api/mcp/chat/timing:
    post:
      tags:
        - Chat API
      summary: Report chat timing
      operationId: timingChat
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                kind:
                  type: string
                  enum:
                    - boot
                    - turn
                    - widget
                sdkVersion:
                  type: string
                  minLength: 1
                  maxLength: 40
                channelId:
                  type: string
                  format: uuid
                sessionId:
                  type: string
                  minLength: 1
                  maxLength: 128
                visitorId:
                  type: string
                  minLength: 1
                  maxLength: 256
                pageHost:
                  type: string
                  minLength: 1
                  maxLength: 253
                connection:
                  type: object
                  properties:
                    effectiveType:
                      type: string
                      minLength: 1
                      maxLength: 16
                    rtt:
                      type: number
                    downlink:
                      type: number
                    saveData:
                      type: boolean
                tags:
                  type: object
                  propertyNames:
                    pattern: ^[a-zA-Z][a-zA-Z0-9]{0,39}$
                  additionalProperties:
                    anyOf:
                      - type: string
                        minLength: 1
                        maxLength: 200
                      - type: boolean
                metrics:
                  type: object
                  propertyNames:
                    pattern: ^[a-zA-Z][a-zA-Z0-9]{0,39}$
                  additionalProperties:
                    type: number
                    minimum: 0
                    maximum: 600000
              required:
                - kind
                - sdkVersion
                - visitorId
                - pageHost
                - metrics
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      ok:
                        type: boolean
                        enum:
                          - true
                    required:
                      - ok
                  error:
                    type: string
                  code:
                    type: string
                required:
                  - success
                  - message
                  - data
      security:
        - publicKeyAuth: []
components:
  securitySchemes:
    publicKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: WaniwaniPublicKey
      description: >-
        Waniwani public key passed as `Authorization: Bearer wwp_<key>`. A
        channel's public key is meant to ship in a web page.

````

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