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

# Upload a document for user

Please reach out to our compliance team for more information.


## OpenAPI

````yaml POST /api/users/{id}/documents
openapi: 3.0.0
info:
  version: v1.0.0
  title: Users API
  description: API for managing users in the Rio platform
servers:
  - url: https://app.sandbox.rio.trade
security:
  - apiKeyAuth: []
paths:
  /api/users/{id}/documents:
    post:
      summary: Upload a document for user
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/userIdPathParameter'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                document:
                  type: string
                  format: binary
                  description: Document file (PDF, JPG, PNG, max 10 MB)
                documentType:
                  type: string
                  description: Type of document being uploaded
              required:
                - document
                - documentType
      responses:
        '200':
          description: Document uploaded successfully
          content:
            text/plain:
              schema:
                type: string
                example: OK
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unauthorizedSchema'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFoundErrorSchema'
          description: Not Found
components:
  parameters:
    userIdPathParameter:
      name: id
      in: path
      required: true
      description: ID of the user.
      schema:
        type: string
        format: mongoId
        example: 66562bc04fe8bf83c577c178
  schemas:
    unauthorizedSchema:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: number
                example: 19
              message:
                type: string
                example: Not authorized
    notFoundErrorSchema:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: integer
                example: 1
              message:
                type: string
                example: User not found
            required:
              - code
              - message
      required:
        - errors
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````