Skip to main content
GET
/
v1
/
documents
List Documents
curl --request GET \
  --url https://api.example.com/v1/documents
{
  "data": {
    "documents": [
      {
        "id": "<string>",
        "name": "<string>",
        "description": "<string>",
        "mime_type": "<string>",
        "size_bytes": 123,
        "storage_path": "<string>",
        "folder": "<string>",
        "tags": [
          {}
        ],
        "created_by": "<string>",
        "created_at": "<string>",
        "updated_at": "<string>"
      }
    ]
  },
  "meta": {}
}

Request

Query Parameters

page
integer
default:"1"
Page number.
per_page
integer
default:"25"
Results per page. Maximum 100.
folder
string
Filter to documents in a specific folder path (e.g. /clients/acme/ndas).
tag
string
Filter to documents with the given tag. Repeat the parameter to require multiple tags.
mime_type
string
Filter to a MIME type (e.g. application/pdf).
Search against name and description.
created_after
string
ISO 8601 lower bound on created_at.

Headers

Authorization: Bearer wbk_your_api_key_here

Response

data
object
meta
object
Pagination metadata: page, per_page, total.
Responses include X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, and X-Request-ID.
curl "https://data.leadlex.com/functions/v1/api-gateway/v1/documents?folder=/clients/acme&per_page=50" \
  -H "Authorization: Bearer wbk_your_api_key_here"

Example Response

{
  "data": {
    "documents": [
      {
        "id": "doc_01HY1",
        "name": "Acme-NDA-2026.pdf",
        "description": "Mutual NDA with Acme Corp",
        "mime_type": "application/pdf",
        "size_bytes": 183204,
        "storage_path": "workspaces/ws_123/documents/doc_01HY1.pdf",
        "folder": "/clients/acme/ndas",
        "tags": ["nda", "confidentiality"],
        "created_by": "usr_01HW0",
        "created_at": "2026-04-17T09:00:00Z",
        "updated_at": "2026-04-17T09:00:00Z"
      }
    ]
  },
  "meta": { "page": 1, "per_page": 50, "total": 12 }
}

Errors

StatusCodeDescription
401invalid_keyInvalid or expired API key
403insufficient_permissionsMissing read:documents permission
429rate_limitedRate limit exceeded