Your first request
Make your first authenticated call to the Monument REST API with cURL and JavaScript, and read the response envelope.
The base URL is https://api.monument.so/api/v1. This guide lists the projects your key can see. You need a key already; if you do not have one, start with Getting an API key.
List projects with cURL
curl 'https://api.monument.so/api/v1/projects?limit=20' \
-H 'X-API-Key: monument_your_api_key'The same call in JavaScript
const res = await fetch(
'https://api.monument.so/api/v1/projects?limit=20',
{ headers: { 'X-API-Key': 'monument_your_api_key' } },
);
if (!res.ok) {
throw new Error(`Request failed: ${res.status}`);
}
const { data, pagination } = await res.json();
console.log(`${data.length} of ${pagination.total} projects`);The response envelope
List endpoints return two top-level keys: data, an array of records, and pagination, describing the current page.
{
"data": [
{ "id": "b1f0…", "code": "24-014", "name": "Riverside Pavilion", "versionId": "9ac3…" }
],
"pagination": { "total": 128, "limit": 20, "offset": 0 }
}Endpoints that return a single record wrap it in the same data key, without pagination.
{
"data": { "id": "b1f0…", "code": "24-014", "name": "Riverside Pavilion" }
}Page through results
List endpoints accept limit (1 to 100, default 50) and offset (default 0). Read pagination.total to know how many records exist, then increase offset by your limit until you have fetched them all. The Errors, pagination, and rate limits guide has a full paging loop.