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

# Document Analyze

> Begin a Document Analysis



## OpenAPI

````yaml /specs/fc-kyb-exp-bundled_generated.yaml post /v2/organizations/documents/analyze
openapi: 3.0.3
info:
  title: KYB V2 API - Experimental
  version: 1.0.0
  description: >
    The KYB Experimental API provides endpoints for analyzing and confirming
    documents for organizations.

    These APIs are undergoing heavy active development and are subject to change
    without notice as the product is refined.
  license:
    name: Frankieone
    url: https://apidocs.frankiefinancial.com/
servers:
  - url: https://api.kycaml.frankiefinancial.io/experimental
    description: Production API Base URL
  - url: https://api.kycaml.uat.frankiefinancial.io/experimental
    description: UAT Environment API Base URL
security:
  - jwt: []
paths:
  /v2/organizations/documents/analyze:
    parameters:
      - $ref: '#/components/parameters/X-Frankie-CustomerID'
      - $ref: '#/components/parameters/X-Frankie-CustomerChildID'
      - $ref: '#/components/parameters/X-Frankie-Channel'
      - $ref: '#/components/parameters/Api-Key'
    post:
      tags:
        - Organization
      summary: Document Analyze
      description: Begin a Document Analysis
      operationId: documentAnalyze
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Document-Analysis-Request'
              type: object
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Document-Analysis-Response'
                type: object
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - jwt:
            - document-analysis.write
components:
  parameters:
    X-Frankie-CustomerID:
      name: X-Frankie-CustomerID
      in: header
      required: true
      schema:
        type: string
        example: 12345678-1234-1234-1234-123456789012
      description: Your Customer ID provided by FrankieOne
    X-Frankie-CustomerChildID:
      name: X-Frankie-CustomerChildID
      in: header
      required: false
      schema:
        type: string
        example: 87654321-4321-4321-4321-210987654321
      description: Your Customer Child ID provided by FrankieOne
    X-Frankie-Channel:
      name: X-Frankie-Channel
      in: header
      required: false
      schema:
        type: string
      description: >-
        Open string that can be used to define the "channel" the request comes
        in from. It can potentially be used in routing and risk calculations
        upon request. Default values that can be used are:  api portal smartui
        Any alphanumeric string is supported though. Anything over 64 characters
        will be truncated.
    Api-Key:
      name: api_key
      in: header
      schema:
        type: string
        example: 245c765b124a098d09ef8765....
      description: Your API key provided by FrankieOne
      required: true
  schemas:
    Document-Analysis-Request:
      type: object
      properties:
        entityId:
          $ref: '#/components/schemas/Entity-ID-Writeable'
        documentId:
          $ref: '#/components/schemas/Document-ID'
        analysisType:
          $ref: '#/components/schemas/Document-Analysis-Type'
        supplementaryInformation:
          $ref: '#/components/schemas/Supplementary-Information'
    Document-Analysis-Response:
      type: object
      properties:
        entityId:
          $ref: '#/components/schemas/Entity-ID'
        analysis:
          $ref: '#/components/schemas/Document-Analysis-Information-With-Type'
        requestId:
          $ref: '#/components/schemas/Request-ID'
    Error:
      type: object
      x-examples:
        '400':
          requestId: 0123456789ABCDEFGHIJKLMNOP
          errorCode: API-0400
          errorMsg: Parsing credentials from "<invalid>" failed, because invalid.
          httpStatusCode: 400
        '401':
          requestId: 0123456789ABCDEFGHIJKLMNOP
          errorCode: API-0401
          errorMsg: Unauthenticated due to invalid credentials.
          httpStatusCode: 401
        '409':
          requestId: 0123456789ABCDEFGHIJKLMNOP
          errorCode: API-0409
          errorMsg: Conflict.
          httpStatusCode: 409
      allOf:
        - $ref: '#/components/schemas/Error-Base'
        - type: object
          properties:
            requestId:
              $ref: '#/components/schemas/Request-ID'
    Entity-ID-Writeable:
      type: string
      description: >-
        Entity's are assigned an auto-generated UUID to ensure global
        uniqueness, represented as an entityId. The entityId allows for precise
        modification when required. 

        To modify an entity, set the entityId of the entity you wish to update
        in an update request call.
      example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
    Document-ID:
      type: string
      format: uuid
      description: >-
        As documents are added to an entity, they are assigned a unique
        identifier to assist with modification and reference.

        To modify a document, include the documentId in an update request.
      example: 92de15f64-5717-4562-b3fc-2c963f6665a7
      x-oapi-codegen-extra-tags:
        audit: keep
    Document-Analysis-Type:
      type: string
      description: The type of document analysis to perform
      enum:
        - TRUST_DOCUMENT
    Supplementary-Information:
      type: object
      nullable: true
      properties:
        trust:
          $ref: '#/components/schemas/Supplementary-Trust-Information'
    Entity-ID:
      type: string
      description: >-
        Entities are assigned a FrankieOne auto-generated UUID to ensure global
        uniqueness, represented as entityId. The entityId allows for precise
        modification when required.

        To modify an entity, set the entityId of the entity you wish to update
        in an update request.
      example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
      readOnly: true
      x-oapi-codegen-extra-tags:
        audit: keep
    Document-Analysis-Information-With-Type:
      type: object
      allOf:
        - $ref: '#/components/schemas/Document-Analysis-Information'
        - type: object
          properties:
            type:
              $ref: '#/components/schemas/Document-Analysis-Type'
    Request-ID:
      type: string
      example: 01HN9XHZN6MGXM9JXG50K59Q85
      description: The unique request identifier for the API call made.
    Error-Base:
      type: object
      properties:
        errorCode:
          type: string
        errorMsg:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/Issue'
    Supplementary-Trust-Information:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/Trust-Type-Supported-Enum'
    Document-Analysis-Information:
      type: object
      description: Information about the document analysis operation itself.
      properties:
        documentId:
          $ref: '#/components/schemas/Document-ID'
        status:
          $ref: '#/components/schemas/Analysis-Status'
        analysisId:
          $ref: '#/components/schemas/Analysis-ID'
    Issue:
      type: object
      properties:
        issue:
          type: string
          description: Description of the issue.
        issueLocation:
          type: string
          description: The location or context where the issue was identified.
        issueType:
          type: string
          description: The type or category of the issue.
    Trust-Type-Supported-Enum:
      type: string
      description: The supported types of trusts.
      enum:
        - DISCRETIONARY
        - UNIT
        - SELF_MANAGED_SUPER_FUND
    Analysis-Status:
      description: >-
        The current state of the analysis. Simplified enum so machines can rely
        on these to make decisions.
      type: string
      enum:
        - PROCESSING
        - FAILED
        - COMPLETE
        - CONFIRMED
    Analysis-ID:
      type: string
      description: An identifier to uniquely identify a specific instance of analysis.
      example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
  securitySchemes:
    jwt:
      type: http
      scheme: bearer
      bearerFormat: JWT

````