[{"data":1,"prerenderedAt":595},["ShallowReactive",2],{"navigation":3,"page:\u002Fpagination":45},{"title":4,"links":5},"API reference",[6,9,12,15,18,21,24,27,30,33,36,39,42],{"title":7,"href":8},"Accounts","\u002Freference\u002Faccounts",{"title":10,"href":11},"Connect","\u002Freference\u002Fconnect",{"title":13,"href":14},"Calendars","\u002Freference\u002Fcalendars",{"title":16,"href":17},"Events","\u002Freference\u002Fevents",{"title":19,"href":20},"Availability","\u002Freference\u002Favailability",{"title":22,"href":23},"Meetings","\u002Freference\u002Fmeetings",{"title":25,"href":26},"Invitations","\u002Freference\u002Finvitations",{"title":28,"href":29},"Webhooks","\u002Freference\u002Fwebhooks",{"title":31,"href":32},"Metadata","\u002Freference\u002Fmetadata",{"title":34,"href":35},"Keys","\u002Freference\u002Fkeys",{"title":37,"href":38},"Sandbox","\u002Freference\u002Fsandbox",{"title":40,"href":41},"Usage","\u002Freference\u002Fusage",{"title":43,"href":44},"Logs","\u002Freference\u002Flogs",{"kind":46,"title":47,"description":48,"sections":49,"doc":56},"guide","Pagination","List endpoints return results one page at a time with a cursor, and the SDK can iterate through every page for you.",[50,53],{"id":51,"title":52},"rules","Rules",{"id":54,"title":55},"order","Order",{"id":57,"title":47,"body":58,"description":48,"extension":587,"hero":588,"meta":589,"navigation":308,"path":590,"rawbody":591,"sections":592,"seo":593,"stem":64,"v1":592,"__hash__":594},"docs\u002Fpagination.md",{"type":59,"value":60,"toc":583},"minimark",[61,65,93,221,434,437,466,541,551,553,556,571,579],[62,63,47],"h1",{"id":64},"pagination",[66,67,68],"lead",{},[69,70,71,72,76,77,80,81,84,85,88,89,92],"p",{},"Every list endpoint returns one page of results in ",[73,74,75],"code",{},"data",". When more results are available, the response also includes a cursor in ",[73,78,79],{},"meta.nextCursor",". To get the next page, send that value as the ",[73,82,83],{},"cursor"," parameter. On the last page, ",[73,86,87],{},"nextCursor"," is ",[73,90,91],{},"null",".",[94,95,100],"pre",{"className":96,"code":97,"language":98,"meta":99,"style":99},"language-json shiki shiki-themes css-variables","{\n  \"success\": true,\n  \"data\": [ { \"id\": \"...\" }, { \"id\": \"...\" } ],\n  \"meta\": { \"nextCursor\": \"cur_4f2a9c1e7b3d4a6f8e0c2b1d5a7c9e3f\" },\n  \"provider\": \"google\",\n  \"traceId\": \"trc_...\"\n}\n","json","",[73,101,102,111,129,169,191,204,215],{"__ignoreMap":99},[103,104,107],"span",{"class":105,"line":106},"line",1,[103,108,110],{"class":109},"sqSWz","{\n",[103,112,114,118,122,126],{"class":105,"line":113},2,[103,115,117],{"class":116},"sag7P","  \"success\"",[103,119,121],{"class":120},"sEEt9",":",[103,123,125],{"class":124},"sXULy"," true",[103,127,128],{"class":120},",\n",[103,130,132,135,137,140,143,145,149,152,155,158,160,162,164,167],{"class":105,"line":131},3,[103,133,134],{"class":116},"  \"data\"",[103,136,121],{"class":120},[103,138,139],{"class":109}," [ { ",[103,141,142],{"class":116},"\"id\"",[103,144,121],{"class":120},[103,146,148],{"class":147},"sk1Au"," \"...\"",[103,150,151],{"class":109}," }",[103,153,154],{"class":120},",",[103,156,157],{"class":109}," { ",[103,159,142],{"class":116},[103,161,121],{"class":120},[103,163,148],{"class":147},[103,165,166],{"class":109}," } ]",[103,168,128],{"class":120},[103,170,172,175,177,179,182,184,187,189],{"class":105,"line":171},4,[103,173,174],{"class":116},"  \"meta\"",[103,176,121],{"class":120},[103,178,157],{"class":109},[103,180,181],{"class":116},"\"nextCursor\"",[103,183,121],{"class":120},[103,185,186],{"class":147}," \"cur_4f2a9c1e7b3d4a6f8e0c2b1d5a7c9e3f\"",[103,188,151],{"class":109},[103,190,128],{"class":120},[103,192,194,197,199,202],{"class":105,"line":193},5,[103,195,196],{"class":116},"  \"provider\"",[103,198,121],{"class":120},[103,200,201],{"class":147}," \"google\"",[103,203,128],{"class":120},[103,205,207,210,212],{"class":105,"line":206},6,[103,208,209],{"class":116},"  \"traceId\"",[103,211,121],{"class":120},[103,213,214],{"class":147}," \"trc_...\"\n",[103,216,218],{"class":105,"line":217},7,[103,219,220],{"class":109},"}\n",[222,223,224,382],"code-group",{},[94,225,230],{"className":226,"code":227,"filename":228,"language":229,"meta":99,"style":99},"language-js shiki shiki-themes css-variables","\u002F\u002F Every event in the window, across every page:\nfor await (const event of pyas.events.list({ accountId, from, to })) {\n  console.log(event.title)\n}\n\n\u002F\u002F Or one page at a time:\nconst page = await pyas.events.list({ accountId, from, to, limit: 50 })\nconst next = await page.next() \u002F\u002F null after the last page\n","Node.js","js",[73,231,232,238,283,300,304,310,315,359],{"__ignoreMap":99},[103,233,234],{"class":105,"line":106},[103,235,237],{"class":236},"ssgCD","\u002F\u002F Every event in the window, across every page:\n",[103,239,240,243,246,249,252,255,258,261,264,267,270,273,275,278,280],{"class":105,"line":113},[103,241,242],{"class":116},"for",[103,244,245],{"class":116}," await",[103,247,248],{"class":109}," (",[103,250,251],{"class":116},"const",[103,253,254],{"class":124}," event",[103,256,257],{"class":116}," of",[103,259,260],{"class":124}," pyas",[103,262,92],{"class":263},"s1IGz",[103,265,266],{"class":124},"events",[103,268,269],{"class":263},".list",[103,271,272],{"class":109},"({ accountId",[103,274,154],{"class":120},[103,276,277],{"class":109}," from",[103,279,154],{"class":120},[103,281,282],{"class":109}," to })) {\n",[103,284,285,288,291,294,297],{"class":105,"line":131},[103,286,287],{"class":124},"  console",[103,289,290],{"class":263},".log",[103,292,293],{"class":109},"(",[103,295,296],{"class":124},"event",[103,298,299],{"class":109},".title)\n",[103,301,302],{"class":105,"line":171},[103,303,220],{"class":109},[103,305,306],{"class":105,"line":193},[103,307,309],{"emptyLinePlaceholder":308},true,"\n",[103,311,312],{"class":105,"line":206},[103,313,314],{"class":236},"\u002F\u002F Or one page at a time:\n",[103,316,317,319,322,325,327,329,331,333,335,337,339,341,343,346,348,351,353,356],{"class":105,"line":217},[103,318,251],{"class":116},[103,320,321],{"class":124}," page",[103,323,324],{"class":116}," =",[103,326,245],{"class":116},[103,328,260],{"class":124},[103,330,92],{"class":263},[103,332,266],{"class":124},[103,334,269],{"class":263},[103,336,272],{"class":109},[103,338,154],{"class":120},[103,340,277],{"class":109},[103,342,154],{"class":120},[103,344,345],{"class":109}," to",[103,347,154],{"class":120},[103,349,350],{"class":109}," limit",[103,352,121],{"class":116},[103,354,355],{"class":124}," 50",[103,357,358],{"class":109}," })\n",[103,360,362,364,367,369,371,373,376,379],{"class":105,"line":361},8,[103,363,251],{"class":116},[103,365,366],{"class":124}," next",[103,368,324],{"class":116},[103,370,245],{"class":116},[103,372,321],{"class":124},[103,374,375],{"class":263},".next",[103,377,378],{"class":109},"() ",[103,380,381],{"class":236},"\u002F\u002F null after the last page\n",[94,383,388],{"className":384,"code":385,"filename":386,"language":387,"meta":99,"style":99},"language-bash shiki shiki-themes css-variables","curl \"https:\u002F\u002Fapi.pyas.io\u002Fv2\u002Fevents?accountId=$ACCOUNT_ID&from=2026-10-20T00:00:00Z&to=2026-11-20T00:00:00Z&limit=50\" \\\n  -H \"x-api-key: $PYAS_API_KEY\"\n\n# Then request the next page with meta.nextCursor from the previous response:\ncurl \"https:\u002F\u002Fapi.pyas.io\u002Fv2\u002Fevents?accountId=$ACCOUNT_ID&from=2026-10-20T00:00:00Z&to=2026-11-20T00:00:00Z&limit=50&cursor=cur_...\" \\\n  -H \"x-api-key: $PYAS_API_KEY\"\n","cURL","bash",[73,389,390,401,410,414,419,428],{"__ignoreMap":99},[103,391,392,395,398],{"class":105,"line":106},[103,393,394],{"class":263},"curl",[103,396,397],{"class":147}," \"https:\u002F\u002Fapi.pyas.io\u002Fv2\u002Fevents?accountId=$ACCOUNT_ID&from=2026-10-20T00:00:00Z&to=2026-11-20T00:00:00Z&limit=50\"",[103,399,400],{"class":109}," \\\n",[103,402,403,407],{"class":105,"line":113},[103,404,406],{"class":405},"sTB4W","  -H",[103,408,409],{"class":147}," \"x-api-key: $PYAS_API_KEY\"\n",[103,411,412],{"class":105,"line":131},[103,413,309],{"emptyLinePlaceholder":308},[103,415,416],{"class":105,"line":171},[103,417,418],{"class":236},"# Then request the next page with meta.nextCursor from the previous response:\n",[103,420,421,423,426],{"class":105,"line":193},[103,422,394],{"class":263},[103,424,425],{"class":147}," \"https:\u002F\u002Fapi.pyas.io\u002Fv2\u002Fevents?accountId=$ACCOUNT_ID&from=2026-10-20T00:00:00Z&to=2026-11-20T00:00:00Z&limit=50&cursor=cur_...\"",[103,427,400],{"class":109},[103,429,430,432],{"class":105,"line":206},[103,431,406],{"class":405},[103,433,409],{"class":147},[435,436,52],"h2",{"id":51},[438,439,440,452,455,461],"ul",{},[441,442,443,444,447,448,451],"li",{},"When you send a cursor, send the same query parameters that you sent for the first page. Only ",[73,445,446],{},"limit"," can be different. A cursor that Pyas generates (",[73,449,450],{},"cur_...",") remembers its query, and the API rejects it with a different one. Other cursors don't, so a different query returns the wrong page.",[441,453,454],{},"You can reuse a cursor. The same cursor always returns the same page, so it's safe to retry a request.",[441,456,457,458,460],{},"Cursors that Pyas generates (",[73,459,450],{},") are valid for 1 day, so don't store them. To continue later, start again from the first page.",[441,462,463,465],{},[73,464,446],{}," sets the page size. Each list endpoint has its own default and maximum:",[467,468,469,485],"table",{},[470,471,472],"thead",{},[473,474,475,479,482],"tr",{},[476,477,478],"th",{},"List",[476,480,481],{},"Default",[476,483,484],{},"Maximum",[486,487,488,500,514,523,532],"tbody",{},[473,489,490,494,497],{},[491,492,493],"td",{},"Events, occurrences",[491,495,496],{},"100",[491,498,499],{},"250",[473,501,502,509,512],{},[491,503,504,505,508],{},"Events by metadata (",[73,506,507],{},"metadata.\u003Ckey>=",")",[491,510,511],{},"50",[491,513,496],{},[473,515,516,518,520],{},[491,517,7],{},[491,519,511],{},[491,521,522],{},"200",[473,524,525,528,530],{},[491,526,527],{},"Webhook events and deliveries",[491,529,511],{},[491,531,496],{},[473,533,534,537,539],{},[491,535,536],{},"Request logs",[491,538,511],{},[491,540,496],{},[69,542,543,544,546,547,88,549,92],{},"A page can contain fewer items than ",[73,545,446],{}," and still have a next page, because filters can exclude some items from a page. Keep requesting pages until ",[73,548,87],{},[73,550,91],{},[435,552,55],{"id":54},[69,554,555],{},"Accounts are returned in the order they were added. Webhook events, deliveries and request logs are returned newest first.",[69,557,558,559,562,563,566,567,570],{},"Events from a single calendar are returned in the provider's order. To sort them by start time, use ",[73,560,561],{},"expand=true"," with ",[73,564,565],{},"sort=start",". To sort them by last update, use ",[73,568,569],{},"sort=updated",". Events from several accounts are returned as a single timeline, sorted by start time.",[69,572,573,574,92],{},"To track changes to a calendar instead of paging through it again, use a ",[575,576,578],"a",{"href":577},"\u002Fevents#keeping-a-copy-in-sync","sync token",[580,581,582],"style",{},"html pre.shiki code .sqSWz, html code.shiki .sqSWz{--shiki-default:var(--shiki-foreground)}html pre.shiki code .sag7P, html code.shiki .sag7P{--shiki-default:var(--shiki-token-keyword)}html pre.shiki code .sEEt9, html code.shiki .sEEt9{--shiki-default:var(--shiki-token-punctuation)}html pre.shiki code .sXULy, html code.shiki .sXULy{--shiki-default:var(--shiki-token-constant)}html pre.shiki code .sk1Au, html code.shiki .sk1Au{--shiki-default:var(--shiki-token-string-expression)}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .ssgCD, html code.shiki .ssgCD{--shiki-default:var(--shiki-token-comment)}html pre.shiki code .s1IGz, html code.shiki .s1IGz{--shiki-default:var(--shiki-token-function)}html pre.shiki code .sTB4W, html code.shiki .sTB4W{--shiki-default:var(--shiki-token-string)}",{"title":99,"searchDepth":131,"depth":131,"links":584},[585,586],{"id":51,"depth":113,"text":52},{"id":54,"depth":113,"text":55},"md",false,{},"\u002Fpagination","---\ntitle: Pagination\ndescription: List endpoints return results one page at a time with a cursor, and the SDK can iterate through every page for you.\n---\n\n# Pagination\n\n::lead\nEvery list endpoint returns one page of results in `data`. When more results are available, the response also includes a cursor in `meta.nextCursor`. To get the next page, send that value as the `cursor` parameter. On the last page, `nextCursor` is `null`.\n::\n\n```json\n{\n  \"success\": true,\n  \"data\": [ { \"id\": \"...\" }, { \"id\": \"...\" } ],\n  \"meta\": { \"nextCursor\": \"cur_4f2a9c1e7b3d4a6f8e0c2b1d5a7c9e3f\" },\n  \"provider\": \"google\",\n  \"traceId\": \"trc_...\"\n}\n```\n\n::code-group\n```js [Node.js]\n\u002F\u002F Every event in the window, across every page:\nfor await (const event of pyas.events.list({ accountId, from, to })) {\n  console.log(event.title)\n}\n\n\u002F\u002F Or one page at a time:\nconst page = await pyas.events.list({ accountId, from, to, limit: 50 })\nconst next = await page.next() \u002F\u002F null after the last page\n```\n\n```bash [cURL]\ncurl \"https:\u002F\u002Fapi.pyas.io\u002Fv2\u002Fevents?accountId=$ACCOUNT_ID&from=2026-10-20T00:00:00Z&to=2026-11-20T00:00:00Z&limit=50\" \\\n  -H \"x-api-key: $PYAS_API_KEY\"\n\n# Then request the next page with meta.nextCursor from the previous response:\ncurl \"https:\u002F\u002Fapi.pyas.io\u002Fv2\u002Fevents?accountId=$ACCOUNT_ID&from=2026-10-20T00:00:00Z&to=2026-11-20T00:00:00Z&limit=50&cursor=cur_...\" \\\n  -H \"x-api-key: $PYAS_API_KEY\"\n```\n::\n\n## Rules\n\n- When you send a cursor, send the same query parameters that you sent for the first page. Only `limit` can be different. A cursor that Pyas generates (`cur_...`) remembers its query, and the API rejects it with a different one. Other cursors don't, so a different query returns the wrong page.\n- You can reuse a cursor. The same cursor always returns the same page, so it's safe to retry a request.\n- Cursors that Pyas generates (`cur_...`) are valid for 1 day, so don't store them. To continue later, start again from the first page.\n- `limit` sets the page size. Each list endpoint has its own default and maximum:\n\n| List | Default | Maximum |\n|---|---|---|\n| Events, occurrences | 100 | 250 |\n| Events by metadata (`metadata.\u003Ckey>=`) | 50 | 100 |\n| Accounts | 50 | 200 |\n| Webhook events and deliveries | 50 | 100 |\n| Request logs | 50 | 100 |\n\nA page can contain fewer items than `limit` and still have a next page, because filters can exclude some items from a page. Keep requesting pages until `nextCursor` is `null`.\n\n## Order\n\nAccounts are returned in the order they were added. Webhook events, deliveries and request logs are returned newest first.\n\nEvents from a single calendar are returned in the provider's order. To sort them by start time, use `expand=true` with `sort=start`. To sort them by last update, use `sort=updated`. Events from several accounts are returned as a single timeline, sorted by start time.\n\nTo track changes to a calendar instead of paging through it again, use a [sync token](\u002Fevents#keeping-a-copy-in-sync).\n",null,{"title":47,"description":48},"wcmTn-a7CQMm6C_TWvgz7VGYRVt08zukHKtaDkpIajI",1794697271345]