Skip to content

Examples

Each example assumes your token is in the MEETOR_TOKEN environment variable. See Authentication.

Terminal window
curl "https://api.meetor.co/v1/public/meetings?limit=20" \
-H "Authorization: Bearer $MEETOR_TOKEN"

from and to are epoch milliseconds in UTC.

Terminal window
curl "https://api.meetor.co/v1/public/reports/summary?from=1788220800000&to=1790812800000" \
-H "Authorization: Bearer $MEETOR_TOKEN"
const API = 'https://api.meetor.co';
async function meetor(path) {
const res = await fetch(`${API}${path}`, {
headers: { Authorization: `Bearer ${process.env.MEETOR_TOKEN}` },
});
const body = await res.json();
if (!res.ok) {
// Every error has the same shape: { error: { code, message, details? } }
throw new Error(`${body.error.code}: ${body.error.message}`);
}
return body;
}
const { meetings } = await meetor('/v1/public/meetings?limit=20');
for (const m of meetings) {
console.log(m.title ?? 'Untitled', m.totalMinor, m.currency);
}

Amounts are integers in minor units. Divide by the currency’s minor unit before you show them.

function formatMoney(minor, currency) {
const fmt = new Intl.NumberFormat('en-US', { style: 'currency', currency });
const digits = fmt.resolvedOptions().maximumFractionDigits;
return fmt.format(minor / 10 ** digits);
}
formatMoney(10156, 'USD'); // "$101.56"

When there are more results, the response includes a cursor. Pass it back to get the next page.

let cursor;
do {
const qs = new URLSearchParams({ limit: '100', ...(cursor ? { cursor } : {}) });
const page = await meetor(`/v1/public/meetings?${qs}`);
for (const m of page.meetings) console.log(m.id, m.totalMinor);
cursor = page.nextCursor;
} while (cursor);

Check the API reference for the exact fields of each response.