Developers Dashboard

Lists answer items and a cursor. Pass the cursor back for the next page.

Lists answer the same way everywhere:

JSON
{ "items": [ … ], "cursor": "eyJ0IjoiMjAyNi0xMS0yMFQwODowMDowMFoifQ", "total": 214 }

When cursor isn't null, pass it back as ?cursor= for the next page. limit sets the page size. Some lists add total.

async function* contacts(siteId) {
  let cursor = null;
  do {
    const url = new URL(`https://api.unvop.com/v1/sites/${siteId}/contacts`);
    url.searchParams.set('limit', '100');
    if (cursor) url.searchParams.set('cursor', cursor);
    const page = await (await fetch(url, { headers })).json();
    yield* page.items;
    cursor = page.cursor;
  } while (cursor);
}

for await (const contact of contacts('site_…')) console.log(contact.email);

Treat a cursor as opaque: don't build or change one, just send it back.

Short lists

Workflows, tools, forms, plugins and connections come whole, with cursor: null, so one request is enough. Media and payments answer the newest 500. Collection entries also accept offset for older clients, but cursor is the way to page them.