Guides

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
curl 'https://api.monument.so/api/v1/projects?limit=20' \
  -H 'X-API-Key: monument_your_api_key'

The same call in JavaScript

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.

List response
{
  "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.

Single response
{
  "data": { "id": "b1f0…", "code": "24-014", "name": "Riverside Pavilion" }
}
The exact fields inside each record depend on the endpoint. Check the domain reference for the shape a given route returns.

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.