List Documents
Retrieve a paginated list of documents in your account, ordered by most recently updated.
Returns a cursor-paginated list of your documents. Results are ordered by updated_at descending (most recently updated first).
Note
This endpoint does not count toward your monthly API quota.
Endpoint
GET
/v1/documentsList documents in your account with cursor-based pagination.
Parameters
| Parameter | Type | Description |
|---|---|---|
limit | number | Results per page (1-100)Default: 20 |
cursor | string | Pagination cursor (ISO 8601 timestamp from previous response) |
Request
bash
curl "https://api.unmarkdown.com/v1/documents?limit=10" \
-H "Authorization: Bearer um_your_api_key"Response
json
{
"data": [
{
"id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"title": "My Document",
"template_id": "swiss",
"theme_mode": "light",
"is_published": true,
"slug": "my-document",
"page_width": "standard",
"word_count": 1250,
"created_at": "2026-02-15T08:00:00Z",
"updated_at": "2026-02-17T10:30:00Z"
}
],
"has_more": true,
"next_cursor": "2026-02-15T08:00:00Z"
}Error Response
json
{
"error": {
"code": "unauthorized",
"message": "Missing or invalid API key"
}
}Status Codes
| Status | Description |
|---|---|
| 200 | Success |
| 401 | Missing or invalid API key |
| 429 | Rate limit exceeded |
| 500 | Internal server error |
Pagination Example
When has_more is true, pass the next_cursor value as the cursor query parameter to fetch the next page:
javascript
let cursor = null;
let allDocs = [];
do {
const url = new URL("https://api.unmarkdown.com/v1/documents");
url.searchParams.set("limit", "100");
if (cursor) url.searchParams.set("cursor", cursor);
const res = await fetch(url, {
headers: { "Authorization": "Bearer um_your_api_key" },
});
const data = await res.json();
allDocs.push(...data.data);
cursor = data.next_cursor;
} while (cursor);
console.log(`Total documents: ${allDocs.length}`);