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

# Upload Identity Document

> Uploads one page of the holder's identity document — an RG, a CNH or a passport — to be referenced by a later kyc account request. The document belongs to the authenticated partner: it is addressed under the account the token resolved, so one partner cannot reference another's. There is no single-use control — the same id may be referenced more than once. Accepts PDF, JPEG and PNG up to 10 MB; the type is detected from the file bytes, not from the declared content type. Requires the manage-holders capability.



## OpenAPI

````yaml POST /api/v1/accounts/documents
openapi: 3.1.0
info:
  title: Crown API & Webhooks
  version: 1.0.0
  description: >-
    Open API 3 docs for Crown API


    Webhook events that Crown will POST to your configured endpoint URL. All
    webhooks expect a 200 OK response. Payloads use kebab-case for all keys to
    match the Crown API conventions.
servers:
  - url: https://app.crown-brlv.com
    description: Production server
security: []
paths:
  /api/v1/accounts/documents:
    post:
      summary: Upload an identity document
      description: >-
        Uploads one page of the holder's identity document — an RG, a CNH or a
        passport — to be referenced by a later kyc account request. The document
        belongs to the authenticated partner: it is addressed under the account
        the token resolved, so one partner cannot reference another's. There is
        no single-use control — the same id may be referenced more than once.
        Accepts PDF, JPEG and PNG up to 10 MB; the type is detected from the
        file bytes, not from the declared content type. Requires the
        manage-holders capability.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
              properties:
                file:
                  type: string
                  format: binary
                  description: PDF, JPEG or PNG, up to 10 MB
      responses:
        '201':
          description: Document stored
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                required:
                  - document
                properties:
                  document:
                    type: object
                    additionalProperties: false
                    required:
                      - id
                      - filename
                      - size
                      - created-at
                    properties:
                      id:
                        type: string
                        pattern: ^ev_[A-Z0-9]+$
                        description: Identifier a later account request references
                        example: ev_019712CFC86D703F85B8BDAA4FC8D254
                      filename:
                        type: string
                        example: rg-frente.jpg
                      size:
                        type: integer
                        description: Size in bytes
                        example: 184320
                      created-at:
                        type: string
                        format: date-time
        '400':
          description: Bad request - Invalid input parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      message:
                        type: string
                      code:
                        type: string
                    additionalProperties: false
                    required:
                      - type
                      - message
                      - code
                    description: Bad request error details
                additionalProperties: false
                required:
                  - error
        '403':
          description: Forbidden - Access denied
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      message:
                        type: string
                      code:
                        type: string
                    additionalProperties: false
                    required:
                      - type
                      - message
                      - code
                    description: Forbidden access error details
                additionalProperties: false
                required:
                  - error

````