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

Request

Path Parameters

id
string
required
Document UUID returned by GET /v1/documents.

Query Parameters

download
boolean
default:"true"
When true (default), the response includes a signed URL valid for 15 minutes. Set to false for a lightweight metadata-only fetch.

Headers

Authorization: Bearer wbk_your_api_key_here

Response

data
object
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/doc_01HY1 \
  -H "Authorization: Bearer wbk_your_api_key_here"

Example Response

{
  "data": {
    "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"],
    "linked_entities": [
      { "entity_type": "contact", "entity_id": "123e4567-e89b-12d3-a456-426614174000" }
    ],
    "download_url": "https://storage.leadlex.com/signed/...",
    "download_url_expires_at": "2026-04-17T11:00:00Z",
    "created_by": "usr_01HW0",
    "created_at": "2026-04-17T09:00:00Z",
    "updated_at": "2026-04-17T09:00:00Z"
  }
}

Errors

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