Skip to content

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.

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.

ParameterMeaning
limit1 to 100. Default 50.
starting_afterThe next_cursor from the previous page.
Terminal window
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:

Terminal window
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.

GET /v1/events returns stored events, newest first. The response is a plain array, with no has_more.

ParameterMeaning
limit1 to 100. Default 50.
starting_afterThe id of the last event on the previous page.
typeOnly this event type, such as call.ended.
Terminal window
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.

GET /v1/knowledge/connections/{id}/items lists what AirFone read from a connection, ordered by id.

ParameterMeaning
limit1 to 500. Default 100. Anything outside that range is a validation_failed error.
afterThe next value from the previous page.
Terminal window
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.