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

> Uploads a PDF document the onboarding asked for, of the entity or of one of its representatives

> [!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.


## OpenAPI

````yaml v2/api-reference/openapi.json POST /v2/onboarding/documents
openapi: 3.0.0
info:
  title: Trio API v2
  version: 2026-10-19.v2
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: []
tags: []
paths:
  /v2/onboarding/documents:
    parameters:
      - description: >-
          Version of the v2 contract the client is written against. Each
          breaking change publishes a new version.
        example: 2026-10-19.v2
        in: header
        name: Trio-Version
        required: true
        schema:
          enum:
            - 2026-10-19.v2
          type: string
          x-struct: null
          x-validate: null
      - description: >-
          ID of another org to act on instead of the API key's own org. The
          key's org must have been granted access to it, and the request is
          refused with 403 FORBIDDEN otherwise. When that access or the API key
          is read-only, only GET and HEAD requests may carry it. When the target
          org requires mTLS, so does the request. Leave it out to act on the
          key's own org.
        in: header
        name: Trio-Target-Org-Id
        required: false
        schema:
          format: uuid
          type: string
          x-struct: null
          x-validate: null
    post:
      tags:
        - Onboarding
      summary: Upload onboarding document
      description: >-
        Uploads a PDF document the onboarding asked for, of the entity or of one
        of its representatives
      operationId: TrioFoundationWeb.V2.Onboarding.OnboardController.create_document
      parameters: []
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/V2_onboarding_document_upload_params'
        description: Document parameters and binary file
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2_onboarding_document_upload_response'
          description: Document uploaded successfully
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2_error'
          description: >-
            Malformed request: a body that is not valid JSON
            (MALFORMED_REQUEST), or a Trio-Version header that is missing or not
            the current one (INVALID_TRIO_VERSION).
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2_error'
          description: Missing or invalid API key credentials (INVALID_CREDENTIALS).
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2_error'
          description: >-
            The API key may not do this (FORBIDDEN): for instance
            Trio-Target-Org-Id names an org it has no access to, or writes
            through a read-only access.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2_error'
          description: >-
            Invalid input (INVALID_PARAMETER, REQUIRED_PARAMETER, or the code of
            the rule the request breaks). A request outside the operation's
            schema lists the offending fields in `errors`.
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2_error'
          description: >-
            A service needed to answer is unavailable
            (TRIO_SERVICE_UNAVAILABLE).
      callbacks: {}
      security:
        - authorization: []
components:
  schemas:
    V2_onboarding_document_upload_params:
      description: Multipart form params to upload an onboarding document
      example:
        document_type: financial_statement
        file: ''
        reference_id: 01a0ee9f-7418-625f-e4b2-624b4ad4959f
        reference_type: entity
      properties:
        document_type:
          description: Document type, among the required_documents the onboarding asked for
          enum:
            - power_of_attorney
            - financial_statement
            - identification
            - company_contract
          type: string
          x-struct: null
          x-validate: null
        file:
          description: The PDF file
          format: binary
          type: string
          x-struct: null
          x-validate: null
        reference_id:
          description: >-
            The entity_id, or the representative id, the POST /v2/onboarding
            response published
          format: uuid
          type: string
          x-struct: null
          x-validate: null
        reference_type:
          description: Whether the document is the entity's or a representative's
          enum:
            - entity
            - entity_representative
          type: string
          x-struct: null
          x-validate: null
      required:
        - reference_type
        - reference_id
        - document_type
        - file
      title: V2 onboarding document upload params
      type: object
      x-struct: >-
        Elixir.TrioFoundationWeb.Schemas.Onboarding.V2.Document.UploadDocumentParams
      x-validate: null
    V2_onboarding_document_upload_response:
      description: The onboarding document uploaded
      example:
        data:
          document_type: financial_statement
          id: 01a0ee9f-4ff4-e363-41fe-8ced18a18eef
          inserted_at: '2026-09-29T19:23:33.236814Z'
          reference_id: 01a0ee9f-7418-625f-e4b2-624b4ad4959f
          reference_type: entity
          updated_at: '2026-09-29T19:23:33.236814Z'
      properties:
        data:
          properties:
            document_type:
              description: Document type
              enum:
                - power_of_attorney
                - financial_statement
                - identification
                - company_contract
              type: string
              x-struct: null
              x-validate: null
            id:
              description: Document ID
              format: uuid
              type: string
              x-struct: null
              x-validate: null
            inserted_at:
              description: When the document was uploaded
              format: date-time
              type: string
              x-struct: null
              x-validate: null
            reference_id:
              description: The entity or representative the document belongs to
              format: uuid
              type: string
              x-struct: null
              x-validate: null
            reference_type:
              description: Whether the document is the entity's or a representative's
              enum:
                - entity
                - entity_representative
              type: string
              x-struct: null
              x-validate: null
            updated_at:
              description: When the document was last updated
              format: date-time
              type: string
              x-struct: null
              x-validate: null
          required:
            - id
            - reference_type
            - reference_id
            - document_type
            - inserted_at
            - updated_at
          type: object
          x-struct: null
          x-validate: null
      required:
        - data
      title: V2 onboarding document upload response
      type: object
      x-struct: >-
        Elixir.TrioFoundationWeb.Schemas.Onboarding.V2.Document.UploadDocumentResponse
      x-validate: null
    V2_error:
      example:
        error:
          error_code: INVALID_PARAMETER
          error_message: 'Invalid parameters: /amount: Invalid integer. Got: string'
          errors:
            - field: /amount
              message: 'Invalid integer. Got: string'
      properties:
        error:
          properties:
            error_code:
              description: >-
                Stable UPPER_SNAKE identifier of the error, for programs and
                logs. Branch on this, not on the message.
              type: string
              x-struct: null
              x-validate: null
            error_message:
              description: Human readable explanation of the error.
              type: string
              x-struct: null
              x-validate: null
            errors:
              description: >-
                Only on INVALID_PARAMETER for a request outside the operation's
                schema: one entry per offending field.
              items:
                properties:
                  field:
                    description: JSON pointer to the field, e.g. /amount.
                    type: string
                    x-struct: null
                    x-validate: null
                  message:
                    description: What is wrong with it.
                    type: string
                    x-struct: null
                    x-validate: null
                required:
                  - field
                  - message
                type: object
                x-struct: null
                x-validate: null
              type: array
              x-struct: null
              x-validate: null
          required:
            - error_code
            - error_message
          type: object
          x-struct: null
          x-validate: null
      required:
        - error
      title: V2 error
      type: object
      x-struct: Elixir.TrioFoundationWeb.Schemas.HTTP.V2Error
      x-validate: null
  securitySchemes:
    authorization:
      scheme: basic
      type: http

````

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