List Contact Documents
curl --request GET \
--url https://api.example.com/v1/contacts/{id}/documentsimport requests
url = "https://api.example.com/v1/contacts/{id}/documents"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/contacts/{id}/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/contacts/{id}/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/contacts/{id}/documents"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/contacts/{id}/documents")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/contacts/{id}/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"documents": [
{
"id": "<string>",
"name": "<string>",
"mime_type": "<string>",
"size_bytes": 123,
"folder": "<string>",
"tags": [
{}
],
"role": "<string>",
"linked_at": "<string>",
"created_at": "<string>"
}
]
},
"meta": {}
}Documents
List Contact Documents
Return every document linked to the specified contact
GET
/
v1
/
contacts
/
{id}
/
documents
List Contact Documents
curl --request GET \
--url https://api.example.com/v1/contacts/{id}/documentsimport requests
url = "https://api.example.com/v1/contacts/{id}/documents"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/contacts/{id}/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/contacts/{id}/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/contacts/{id}/documents"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/contacts/{id}/documents")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/contacts/{id}/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"documents": [
{
"id": "<string>",
"name": "<string>",
"mime_type": "<string>",
"size_bytes": 123,
"folder": "<string>",
"tags": [
{}
],
"role": "<string>",
"linked_at": "<string>",
"created_at": "<string>"
}
]
},
"meta": {}
}Request
Path Parameters
string
required
Contact UUID.
Query Parameters
integer
default:"1"
Page number.
integer
default:"25"
Results per page. Maximum 100.
string
Filter to documents linked with a specific relationship role (e.g.
signed).Headers
Authorization: Bearer wbk_your_api_key_here
Response
object
object
Pagination metadata:
page, per_page, total.X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, and X-Request-ID.
curl "https://data.leadlex.com/functions/v1/api-gateway/v1/contacts/123e4567-e89b-12d3-a456-426614174000/documents" \
-H "Authorization: Bearer wbk_your_api_key_here"
import requests
API_KEY = "wbk_your_api_key_here"
contact_id = "123e4567-e89b-12d3-a456-426614174000"
r = requests.get(
f"https://data.leadlex.com/functions/v1/api-gateway/v1/contacts/{contact_id}/documents",
headers={"Authorization": f"Bearer {API_KEY}"},
)
for d in r.json()["data"]["documents"]:
print(d["name"], d.get("role"))
const id = '123e4567-e89b-12d3-a456-426614174000';
const res = await fetch(
`https://data.leadlex.com/functions/v1/api-gateway/v1/contacts/${id}/documents`,
{ headers: { Authorization: 'Bearer wbk_your_api_key_here' } },
);
const { data } = await res.json();
console.log(data.documents.length);
Example Response
{
"data": {
"documents": [
{
"id": "doc_01HY1",
"name": "Acme-NDA-2026.pdf",
"mime_type": "application/pdf",
"size_bytes": 183204,
"folder": "/clients/acme/ndas",
"tags": ["nda"],
"role": "signed",
"linked_at": "2026-04-17T09:00:00Z",
"created_at": "2026-04-17T09:00:00Z"
}
]
},
"meta": { "page": 1, "per_page": 25, "total": 1 }
}
Errors
| Status | Code | Description |
|---|---|---|
| 401 | invalid_key | Invalid or expired API key |
| 403 | insufficient_permissions | Missing read:documents permission |
| 404 | not_found | Contact not found |
| 429 | rate_limited | Rate limit exceeded |