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

# Upload owner document

> Uploads one beneficial owner's document. Business customers only.

Once the company documents and every owner's documents are uploaded, the business auto-submits and the company and all owners move to review together.



## OpenAPI

````yaml api-reference/endl-onboarding-api.json POST /api/v0/customer/{userId}/ubo/{uboRef}/documents
openapi: 3.1.0
info:
  title: Endl Partner Onboarding API
  version: '0'
  description: >-
    Onboard end customers for identity verification — individuals (KYC) and
    businesses (KYB) — through one uniform REST surface.


    Authentication is API-key only: every request carries a single `API-KEY`
    header. Unlike the Partner API, responses are **flat** — a successful body
    is the data object itself, with no `{ data, code, message, status }`
    envelope.
servers:
  - url: https://qa-api.endl.xyz
    description: QA
security:
  - apiKey: []
tags:
  - name: Customers
    description: Create, read, update and delete onboarding customers.
  - name: Documents
    description: Upload identity, company and beneficial-owner documents.
paths:
  /api/v0/customer/{userId}/ubo/{uboRef}/documents:
    parameters:
      - name: userId
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: The business customer's id.
      - name: uboRef
        in: path
        required: true
        schema:
          type: string
        description: >-
          The owner's `applicantId`, returned per beneficiary by create. Owners
          have no `userId` of their own.
    post:
      tags:
        - Documents
      summary: Upload owner document
      description: >-
        Uploads one beneficial owner's document. Business customers only.


        Once the company documents and every owner's documents are uploaded, the
        business auto-submits and the company and all owners move to review
        together.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - document
                - idDocType
                - country
              properties:
                document:
                  type: string
                  format: binary
                  description: JPEG, PNG or PDF. Maximum 2 MB.
                idDocType:
                  type: string
                  description: >-
                    `PASSPORT`, `ID_CARD`, `DRIVERS_LICENSE`,
                    `RESIDENCE_PERMIT`, `SELFIE`, or `UTILITY_BILL` for proof of
                    address.
                country:
                  type: string
                  description: ISO 3166-1 alpha-3.
                side:
                  type: string
                  description: '`FRONT` or `BACK`, for two-sided documents. Not validated.'
      responses:
        '200':
          description: Accepted.
          content:
            application/json:
              example:
                accepted: true
                status: SUBMITTED
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: >-
            Unknown `uboRef` — not an owner of this company — or unknown
            customer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: '404'
                message: Not found
                name: PartnerOnboardingUboDocUpload failed to process
        '413':
          description: The file is larger than the 2 MB limit.
components:
  responses:
    BadRequest:
      description: >-
        Validation failed. Nothing is written. One problem returns a flat
        object; several return an `errors` array.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorList'
          example:
            errors:
              - code: '400'
                message: firstName is required
                name: PartnerOnboardingCreate failed to process
              - code: '400'
                message: country must be an ISO 3166-1 alpha-3 code (e.g. ARE)
                name: PartnerOnboardingCreate failed to process
    Unauthorized:
      description: Missing or invalid `API-KEY`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: '401'
            message: Authentication Failed!
            name: PartnerOnboarding failed to process
  schemas:
    Error:
      type: object
      description: >-
        A single problem. `code` is the HTTP status, `message` the specific
        reason, and `name` the operation that failed.
      properties:
        code:
          type: string
        message:
          type: string
        name:
          type: string
    ErrorList:
      type: object
      description: >-
        Several problems at once. Returned by validation failures; nothing is
        created or changed.
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: API-KEY
      description: Your partner API key. The key must carry the `onboarding` permission.

````