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

# List Documents

> Lists documents uploaded for the account's application.

Lists documents uploaded to an account's application. Optionally filter by `documentType`.

## Example Request

```bash theme={null}
curl -X GET "https://api.rolla.xyz/api/v1/external/accounts/eec3cbed-79d8-4370-87a0-b6be9e287337/documents" \
  -H "X-API-Key: your_api_key_here"
```

## Example Response

```json theme={null}
{
  "success": true,
  "message": "Documents retrieved successfully",
  "data": [
    {
      "id": "0c95b2a1-7a93-4a3a-9a52-2a1f0b9b3c11",
      "kyb_application_id": "fbb45236-881a-4c58-8954-22759499eab4",
      "document_type": "certificate_of_incorporation",
      "file_name": "certificate.pdf",
      "file_size": 248301,
      "mime_type": "application/pdf"
    },
    {
      "id": "1d06c3b2-8ba4-4b4b-8b63-3b201c0c4d22",
      "kyb_application_id": "fbb45236-881a-4c58-8954-22759499eab4",
      "document_type": "proof_of_address",
      "file_name": "utility_bill.pdf",
      "file_size": 102844,
      "mime_type": "application/pdf"
    }
  ]
}
```


## OpenAPI

````yaml GET /accounts/{accountId}/documents
openapi: 3.1.0
info:
  title: Rolla Developer API
  description: >-
    API for programmatic transaction management on the Rolla platform. Monetary
    `amount` fields use the smallest unit of the referenced currency unless an
    endpoint says otherwise (e.g. NGN = kobo, USD = cents, where **100 cents =
    USD 1.00**).
  version: 1.0.0
servers:
  - url: https://api.rolla.xyz/api/v1/external
    description: Production server
security:
  - apiKeyAuth: []
paths:
  /accounts/{accountId}/documents:
    get:
      summary: List Documents
      description: Lists documents uploaded for the account's application.
      operationId: getAccountDocuments
      parameters:
        - name: accountId
          in: path
          required: true
          description: >-
            Identifier of an account owned by the same user as your API key's
            business
          schema:
            type: string
            format: uuid
        - name: documentType
          in: query
          schema:
            type: string
            enum:
              - certificate_of_incorporation
              - articles_of_association
              - proof_of_address
              - director_register
              - shareholder_register
              - proof_of_tax_id
              - bank_statement
              - wolfsberg_questionnaire
              - msb_flow_form
              - flow_of_funds_diagram
              - aml_policy_procedures
              - ach_procedures
              - wire_procedures
              - customer_complaint_procedures
              - prohibited_jurisdictions_industries
      responses:
        '200':
          description: Documents retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Documents retrieved successfully
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/KybDocument'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Account not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    KybDocument:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Document identifier
        applicationId:
          type: string
          description: Associated KYB application ID
        documentType:
          type: string
          description: Type of document
          enum:
            - certificate_of_incorporation
            - articles_of_association
            - proof_of_address
            - director_register
            - shareholder_register
        fileName:
          type: string
          description: Uploaded file name
        fileUrl:
          type: string
          format: uri
          description: Document download URL
        relatedPersonKey:
          type: string
          description: Associated related person
        created_at:
          type: string
          format: date-time
          description: Upload timestamp
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your Rolla API key

````