Pagination
All list endpoints support pagination.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number |
per_page | integer | 25 | Items per page (max 100) |
Response Structure
json
{
"data": [
{ "id": 1, "email": "alice@example.com" },
{ "id": 2, "email": "bob@example.com" }
],
"meta": {
"total": 150,
"count": 25,
"per_page": 25,
"current_page": 2,
"last_page": 6
},
"links": {
"first": "https://app.beeving.com/api/v1/contacts?page=1",
"last": "https://app.beeving.com/api/v1/contacts?page=6",
"prev": "https://app.beeving.com/api/v1/contacts?page=1",
"next": "https://app.beeving.com/api/v1/contacts?page=3"
}
}Example
bash
# Page 2, 50 items per page
curl "https://app.beeving.com/api/v1/contacts?page=2&per_page=50" \
-H "Authorization: Bearer YOUR_TOKEN"Iterating All Pages
js
async function getAllContacts(token) {
let page = 1
let allContacts = []
while (true) {
const res = await fetch(
`https://app.beeving.com/api/v1/contacts?page=${page}&per_page=100`,
{ headers: { Authorization: `Bearer ${token}` } }
)
const { data, meta } = await res.json()
allContacts.push(...data)
if (page >= meta.last_page) break
page++
}
return allContacts
}