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

# Run Forensic Analysis

> Triggers forensic analysis for a tenant.

### Automatic Forensic Handling
In most cases, forensic analysis is **automatically managed by SKOR** once
all required prerequisites (such as document upload and KYC completion)
are satisfied.

### Asynchronous Operation

This endpoint initiates an **asynchronous process**. The API response
immediately returns the current forensic processing status for the tenant
and indicates whether the tenant has been added to the forensic queue.
Forensic analysis itself is performed in the background.
Completion of forensic analysis is communicated via webhook events and
later can be inferred from the **Get API** response.

This endpoint does **not** wait for forensic analysis to complete.
Completion of forensic analysis is communicated separately via webhook
events.

This endpoint attempts to add the tenant to the forensic processing queue.
Depending on the tenant’s current state, the request may **not** be queued
and will instead return a status explaining why.

**Possible statuses returned:**

- **PENDING**
  The tenant is already in the forensic queue and is waiting for their turn
  to be picked up by the processor.

- **PROCESSING**
  Forensic analysis is currently running for the tenant.
  Skor Lite is actively processing the job.

- **DOCUMENTS_ANALYSIS_NOT_FOUND**
  No documents are available for analysis and no document analysis
  has been performed yet.

- **KYC_PENDING**
  Identity verification (KYC) has not been completed yet.

- **QUEUED**
  The tenant has been successfully added to the forensic processing queue
  and will be processed shortly.

**Queue behavior:**
- If the status is **PENDING** or **PROCESSING**, the tenant is already
  in the queue or being processed.
- If the status is **DOCUMENTS_ANALYSIS_NOT_FOUND** or **KYC_PENDING**,
  the tenant is **not added to the queue**.
- In all other valid cases, the tenant is added to the forensic queue
  for processing.

**Forensic completion webhook:**
When forensic analysis from Skor Lite is completed successfully, a webhook event
`FORENSIC_ANALYSIS_DATA` is sent.

**The webhook payload contains:**
- `event`: Event name (`FORENSIC_ANALYSIS_DATA`)
- `data`: Forensic analysis result data

The configured webhook endpoint **must accept POST requests**.




## OpenAPI

````yaml /api-reference/openapi.yaml get /tenants/run-forensic/{tenantId}
openapi: 3.1.0
info:
  title: SKOR Modular API
  version: 1.0.0
  description: >
    ## Overview

    This is the SKOR Modular API v1. It provides access to tenant

    workflows, API keys, webhooks, document processing, identity

    verification, banking connectivity, and forensic analysis.


    ## Error Statuses


    The API uses standard HTTP status codes to indicate the success

    or failure of requests. Each error response provides guidance

    to help identify the issue and take corrective action.


    ### Success — `200 OK`

    The request was processed successfully and the expected response

    data is returned.


    ### Validation Error — `400 Bad Request`

    The request is invalid due to missing, malformed, or incorrect

    parameters.


    **Common causes:**

    - Required fields are missing from the request.

    - Invalid data formats or unsupported values are provided.

    - File size or payload limits are exceeded.


    **How to resolve:**

    - Verify all required parameters are present.

    - Ensure the request payload matches the documented schema.

    - Validate data formats and constraints before retrying.


    ### Unauthorized — `401 Unauthorized`

    Authentication failed or the provided token is missing or invalid.


    **Common causes:**

    - The `Authorization` header is missing.

    - An invalid or expired bearer token is provided.


    **How to resolve:**

    - Ensure the token is included in the request as an `Authorization: Bearer
    <token>` header.

    - Verify the token is valid and has not expired.

    - Generate a new token if required.


    ### Not Found — `404 Not Found`

    The requested resource does not exist or is not accessible.


    **Common causes:**

    - An invalid or non-existent resource identifier.

    - The resource has not been created or has been deleted.


    **How to resolve:**

    - Confirm the resource identifier is correct.

    - Ensure the resource exists before accessing it.


    ### Server Error — `500 Internal Server Error`

    An unexpected error occurred on the server while processing the request.


    **How to resolve:**

    - Retry the request after a short delay.

    - If the issue persists, **[contact us](mailto:info@skortorent.com)** with
    relevant request details.


    ### Need Help?

    If you encounter unexpected behavior,

    please **[contact us](mailto:info@skortorent.com)** for assistance.
servers:
  - url: https://api.skortorent.com/api/v1
    description: Live
  - url: https://dev-api.skortorent.com/api/v1
    description: Sandbox
security:
  - BearerAuth: []
paths:
  /tenants/run-forensic/{tenantId}:
    get:
      tags:
        - Tenants
      summary: Run Forensic Analysis
      description: >
        Triggers forensic analysis for a tenant.


        ### Automatic Forensic Handling

        In most cases, forensic analysis is **automatically managed by SKOR**
        once

        all required prerequisites (such as document upload and KYC completion)

        are satisfied.


        ### Asynchronous Operation


        This endpoint initiates an **asynchronous process**. The API response

        immediately returns the current forensic processing status for the
        tenant

        and indicates whether the tenant has been added to the forensic queue.

        Forensic analysis itself is performed in the background.

        Completion of forensic analysis is communicated via webhook events and

        later can be inferred from the **Get API** response.


        This endpoint does **not** wait for forensic analysis to complete.

        Completion of forensic analysis is communicated separately via webhook

        events.


        This endpoint attempts to add the tenant to the forensic processing
        queue.

        Depending on the tenant’s current state, the request may **not** be
        queued

        and will instead return a status explaining why.


        **Possible statuses returned:**


        - **PENDING**
          The tenant is already in the forensic queue and is waiting for their turn
          to be picked up by the processor.

        - **PROCESSING**
          Forensic analysis is currently running for the tenant.
          Skor Lite is actively processing the job.

        - **DOCUMENTS_ANALYSIS_NOT_FOUND**
          No documents are available for analysis and no document analysis
          has been performed yet.

        - **KYC_PENDING**
          Identity verification (KYC) has not been completed yet.

        - **QUEUED**
          The tenant has been successfully added to the forensic processing queue
          and will be processed shortly.

        **Queue behavior:**

        - If the status is **PENDING** or **PROCESSING**, the tenant is already
          in the queue or being processed.
        - If the status is **DOCUMENTS_ANALYSIS_NOT_FOUND** or **KYC_PENDING**,
          the tenant is **not added to the queue**.
        - In all other valid cases, the tenant is added to the forensic queue
          for processing.

        **Forensic completion webhook:**

        When forensic analysis from Skor Lite is completed successfully, a
        webhook event

        `FORENSIC_ANALYSIS_DATA` is sent.


        **The webhook payload contains:**

        - `event`: Event name (`FORENSIC_ANALYSIS_DATA`)

        - `data`: Forensic analysis result data


        The configured webhook endpoint **must accept POST requests**.
      parameters:
        - $ref: '#/components/parameters/TenantIdParam'
      responses:
        '200':
          $ref: '#/components/responses/SuccessResponse'
          description: Forensic analysis status returned successfully
        '400':
          $ref: '#/components/responses/ErrorResponse'
          description: Invalid request or tenant state
        '401':
          $ref: '#/components/responses/ErrorResponse'
          description: Unauthorized request
        '500':
          $ref: '#/components/responses/ErrorResponse'
          description: Internal server error
components:
  parameters:
    TenantIdParam:
      name: tenantId
      in: path
      required: true
      schema:
        type: string
  responses:
    SuccessResponse:
      description: Successful response
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - success
              message:
                type: string
              data:
                type: object
    ErrorResponse:
      description: Error response
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              message:
                type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |
        HTTP Bearer Authentication. Pass the token generated via
        `/keys/generate-token` as `Authorization: Bearer <token>`.

````