Skip to content

Events API

Things that happened, as delivered to webhooks.

The same operations are in the interactive API reference, and the whole contract is in the OpenAPI document.

GET/v1/event_types

Event types you can subscribe to

Returns every event type AirFone can send, as a plain list of names such as call.ended or message.received. Use it to fill a picker when subscribing a webhook, or to filter /v1/events.

Needs events:read. Free. The list is the same for every organization and in both modes. New types are added over time, so a receiver should ignore types it does not know instead of failing.

Scope event_types:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/events

Recent events

Returns events that happened in the organization, newest first. These are the same events that are delivered to webhooks, so you can use the feed to catch up after your endpoint was down, or to check what was sent.

Needs events:read. Free. A test key sees the sandbox's events only.

Filter with type, for example call.ended. An unknown type returns an empty list.

Paged, newest first: limit is 1 to 100 (default 50, out of range values are clamped) and cursor is the next_cursor of the previous page. The cursor is opaque and never built by the client; a cursor this API did not return is a 400. has_more is true while another page exists. There is no total.

Scope events:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
typequerystringNoOnly this type, like `call.ended`.
limitqueryintegerNoHow many items to return. Default 50, at most 100.
cursorquerystringNoThe `next_cursor` of the previous page. Opaque; never built by the client.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.