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

# Log customer chat event

> Log customer chat events



## OpenAPI

````yaml post /events/chat
openapi: 3.0.1
info:
  title: OpenAPI spec for Swift Customer Data Processing and Risk Score
  description: A specification for Swift's customer data processing and risk score APIs
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: http://sandbox.mintlify.com
security:
  - bearerAuth: []
paths:
  /events/chat:
    post:
      tags:
        - Support Activity
      summary: Log customer chat event
      description: Log customer chat events
      requestBody:
        description: Chat event details
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatEvent'
        required: true
      responses:
        '201':
          description: Chat event logged
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventResponse'
components:
  schemas:
    ChatEvent:
      required:
        - sessionId
        - userId
        - messageType
        - timestamp
      type: object
      properties:
        sessionId:
          description: Unique identifier for the chat session
          type: string
        userId:
          description: ID of the user in the chat
          type: string
        messageType:
          description: Type of chat message
          type: string
          enum:
            - text
            - file
            - system
        content:
          description: Content of the message
          type: string
        timestamp:
          description: When the message was sent
          type: string
          format: date-time
    EventResponse:
      required:
        - eventId
        - status
      type: object
      properties:
        eventId:
          description: Unique identifier for the logged event
          type: string
        status:
          description: Status of the event logging
          type: string
          enum:
            - success
            - failed
        timestamp:
          description: Time when the event was logged
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````