> ## 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 authentication event

> Log authentication events like logins, logouts, and password changes



## OpenAPI

````yaml post /events/auth
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/auth:
    post:
      tags:
        - Account Activity
      summary: Log authentication event
      description: Log authentication events like logins, logouts, and password changes
      requestBody:
        description: Authentication event details
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthEvent'
        required: true
      responses:
        '201':
          description: Auth event logged successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventResponse'
components:
  schemas:
    AuthEvent:
      required:
        - userId
        - eventType
        - timestamp
        - ipAddress
      type: object
      properties:
        userId:
          description: Unique identifier for the user
          type: string
        eventType:
          description: Type of authentication event
          type: string
          enum:
            - login_success
            - login_failure
            - logout
            - password_change
            - mfa_enabled
            - mfa_disabled
        timestamp:
          description: Time when the auth event occurred
          type: string
          format: date-time
        ipAddress:
          description: IP address where the auth event originated
          type: string
        userAgent:
          description: User agent string from the client
          type: string
        location:
          description: Geographic location details
          type: object
          properties:
            country:
              type: string
            city:
              type: string
    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

````