Pagination
Each list endpoint pages with a cursor. The cursor is always the id of the last item you received, and paging is stable: new items arriving while you page never cause a skip or a repeat.
Request logs
Section titled “Request logs”GET /v1/request-logs returns calls made with API keys, newest first. It needs an admin, a role with developer.manage, or a secret key.
| Parameter | Meaning |
|---|---|
limit | 1 to 100. Default 50. |
starting_after | The next_cursor from the previous page. |
curl "https://app.airfone.app/v1/request-logs?limit=50" \ -H "Authorization: Bearer $AIRFONE_SECRET_KEY"{ "data": [ ... ], "has_more": true, "next_cursor": "9d2c..." }While has_more is true, pass next_cursor as starting_after:
curl "https://app.airfone.app/v1/request-logs?limit=50&starting_after=9d2c..." \ -H "Authorization: Bearer $AIRFONE_SECRET_KEY"When has_more is false, next_cursor is null and you have everything.
Events
Section titled “Events”GET /v1/events returns stored events, newest first. The response is a plain array, with no has_more.
| Parameter | Meaning |
|---|---|
limit | 1 to 100. Default 50. |
starting_after | The id of the last event on the previous page. |
type | Only this event type, such as call.ended. |
curl "https://app.airfone.app/v1/events?type=call.ended&limit=100" \ -H "Authorization: Bearer $AIRFONE_SECRET_KEY"
curl "https://app.airfone.app/v1/events?type=call.ended&limit=100&starting_after=EVENT_ID" \ -H "Authorization: Bearer $AIRFONE_SECRET_KEY"Stop when a page returns fewer items than limit. An empty array also means you are done.
Knowledge connection items
Section titled “Knowledge connection items”GET /v1/knowledge/connections/{id}/items lists what AirFone read from a connection, ordered by id.
| Parameter | Meaning |
|---|---|
limit | 1 to 500. Default 100. Anything outside that range is a validation_failed error. |
after | The next value from the previous page. |
curl "https://app.airfone.app/v1/knowledge/connections/$ID/items?limit=200" \ -H "Authorization: Bearer $AIRFONE_SECRET_KEY"{ "items": [ ... ], "next": "https://example.com/pricing" }Pass next as after for the next page. When next is null, the list is finished.