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

# Upload onboarding document

> Upload a PDF document for an entity or one of its representatives created through onboarding.

<Note>
  **IMPORTANT:** This feature is only available after a distribution channel has been created for your organization.

  To request the creation of a distribution channel, contact Trio Support or your Trio Account Manager.
</Note>


## OpenAPI

````yaml api-reference/banking-api/onboarding/openapi.json POST /onboarding/documents
openapi: 3.0.0
info:
  title: Trio Onboarding API
  version: 0.1.0
servers:
  - url: https://api.sandbox.trio.com.br
    variables: {}
  - url: https://api.qa.trio.com.br
    variables: {}
  - url: https://api.trio.com.br
    variables: {}
security:
  - basic: []
tags:
  - name: onboarding
paths:
  /onboarding/documents:
    post:
      tags:
        - onboarding
      summary: Upload onboarding document
      description: >-
        Uploads a single PDF document for an entity or one of its
        representatives created through onboarding.


        The request is authenticated with your organization's API key and must
        use `multipart/form-data`. Each call uploads exactly one document,
        identified by `reference_type` (`entity` or `entity_representative`) and
        the corresponding `reference_id`.


        Typical entity documents are `company_contract`, `power_of_attorney`,
        and `financial_statement`; representative documents are usually
        `identification`. Only PDF files are accepted.
      operationId: TrioFoundationWeb.Onboarding.OnboardController.create_document
      requestBody:
        description: Document parameters and the binary PDF file
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Upload_document_parameters'
            encoding:
              file:
                contentType: application/pdf
      responses:
        '201':
          description: Document uploaded successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Upload_document_response'
        '400':
          description: Bad request — invalid or missing parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '415':
          description: Unsupported media type — the file is not a PDF
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Upload_document_parameters:
      title: Upload document parameters
      type: object
      description: Multipart form parameters for uploading an onboarding document.
      properties:
        reference_type:
          type: string
          description: The kind of record the document belongs to.
          enum:
            - entity
            - entity_representative
        reference_id:
          type: string
          format: uuid
          description: >-
            ID of the entity (`entity_id`) or representative (`id`) the document
            belongs to.
        document_type:
          type: string
          description: >-
            Document classification. Entities use `company_contract`,
            `power_of_attorney`, or `financial_statement`; representatives use
            `identification`.
          enum:
            - power_of_attorney
            - financial_statement
            - identification
            - company_contract
        file:
          type: string
          format: binary
          description: The PDF file to upload.
      required:
        - reference_type
        - reference_id
        - document_type
        - file
    Upload_document_response:
      title: Upload document response
      type: object
      description: Response returned after a document is uploaded during onboarding.
      properties:
        message:
          type: string
          description: Response status message
        data:
          $ref: '#/components/schemas/Document_data'
      example:
        message: Document uploaded successfully
        data:
          id: d9f3b1a2-8c4d-4e5f-a6b7-1c2d3e4f5a6b
          reference_type: entity
          reference_id: 01a06ee8-4973-caa8-eda0-dc64b5aa648e
          document_type: financial_statement
          inserted_at: '2026-09-24T11:25:00.000000Z'
          updated_at: '2026-09-24T11:25:00.000000Z'
    Error:
      title: Error
      type: object
      properties:
        error:
          type: object
          properties:
            error_code:
              type: string
              description: Error code
            error_message:
              type: string
              description: Error message
      example:
        error:
          error_code: UNAUTHORIZED
          error_message: Invalid credentials
    Document_data:
      title: Document data
      type: object
      description: Document data resulting from an onboarding upload.
      properties:
        id:
          type: string
          format: uuid
          description: Document ID
        reference_type:
          type: string
          description: The kind of record the document belongs to.
          enum:
            - entity
            - entity_representative
        reference_id:
          type: string
          format: uuid
          description: ID of the entity or representative the document belongs to.
        s3_key:
          type: string
          description: Storage object key for the uploaded file.
        document_type:
          type: string
          description: Document classification type.
        inserted_at:
          type: string
          format: date-time
          description: Inserted at
        updated_at:
          type: string
          format: date-time
          description: Updated at
  securitySchemes:
    basic:
      type: http
      scheme: basic

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.