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

# Analyze Transaction

> Analyzes transaction data for potential fraud and returns a detailed fraud report.



## OpenAPI

````yaml POST /fraud-detection
openapi: 3.0.1
info:
  title: InsightAI Fraud Detection API
  description: >-
    APIs for fraud detection, prevention, bulk processing, and initial customer
    data load.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.insightai.in/
security:
  - bearerAuth: []
paths:
  /fraud-detection:
    post:
      description: >-
        Analyzes transaction data for potential fraud and returns a detailed
        fraud report.
      requestBody:
        description: Transaction details to analyze for fraud.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransactionData'
        required: true
      responses:
        '200':
          description: Fraud detection response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FraudDetectionResponse'
        '400':
          description: Invalid transaction data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    TransactionData:
      type: object
      required:
        - transactionId
        - amount
        - timestamp
        - accountDetails
      properties:
        transactionId:
          type: string
          description: Unique identifier for the transaction.
        amount:
          type: number
          format: float
          description: Transaction amount.
        timestamp:
          type: string
          format: date-time
          description: Timestamp of the transaction.
        accountDetails:
          type: object
          properties:
            accountId:
              type: string
              description: ID of the account associated with the transaction.
            accountType:
              type: string
              description: Type of the account (e.g., savings, current).
    FraudDetectionResponse:
      type: object
      properties:
        status:
          type: string
          description: Status of the fraud detection process.
        isFraudulent:
          type: boolean
          description: Indicates whether the transaction is flagged as fraudulent.
        details:
          type: string
          description: Detailed explanation of the fraud detection result.
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
          description: Error code.
        message:
          type: string
          description: Error message describing the issue.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````