分页
列表返回 { 数据,下一个光标 }. Para buscar a próxima página, envie o next_cursor 收到参数中的 cursor. Quando next_cursor vier null, ,他说完了。
limit integer
从 1 到 200。默认值:50。
cursor string
上一页的 next_cursor。
updated_since string (date-time)
仅在此日期之后发生变化的内容进行同步。
status string
按状态过滤。
浏览所有页面
let cursor = null;
do {
const url = new URL("https://www.cyzyra.com/api/v1/leads");
url.searchParams.set("limit", "200");
if (cursor) url.searchParams.set("cursor", cursor);
const res = await fetch(url, { headers: { Authorization: `Bearer ${process.env.CYZYRA_API_KEY}` } });
const page = await res.json();
for (const lead of page.data) console.log(lead.name);
cursor = page.next_cursor;
} while (cursor);