Skip to content

Read your app's event journal

OpenAPI JSON
GET
/events
Code sample: Python
import os, requests, time
cursor, since = None, "2026-09-10T00:00:00Z"
while True:
params = {"cursor": cursor} if cursor else {"since": since, "types": "app_user.*,extension.*", "limit": 100}
r = requests.get(
"https://api.eu.apigami.com/events",
headers={"Authorization": f"Bearer {os.environ['APIGAMI_API_KEY']}"},
params=params,
).json()
for event in r["events"]:
handle(event) # by event["id"], skipping the ones already seen
cursor = r["next"] or cursor
if not r["events"]:
time.sleep(30)

The journal of everything that changed for your app’s users: a user connected or disconnected, their approvals or their language changed, a browser was attached to or detached from them, came online or went offline. Events are kept 30 days, ascending by (created_at, id); an event’s data only until your app has it — once every webhook endpoint it was sent to answered 2xx, or once a later request sends back a cursor past it — then data is null and data_erased_at says when. Only your app’s own events come back — the key names the app, and there is no parameter to name another one. Use it to catch up after your own deploy, to reconcile a state you doubt, or instead of a webhook endpoint if your service has no public URL. API keys only: a dashboard session, a personal access token or an OAuth token is refused with 401.

since
string format: date-time

An ISO 8601 timestamp. Events strictly after it. Default: 30 days ago. Ignored when cursor is given. It acknowledges nothing.

Example
2026-09-10T00:00:00Z
cursor
string

The next of a previous answer: an opaque encoding of (created_at, id). It needs no row to still exist, so a cursor kept across the 30-day purge keeps working. Wins over since. Sending it acknowledges the events earlier requests returned up to it, with the same types: their data is erased.

types
string

Comma-separated list of types or <namespace>.* patterns, your application’s own types included, such as message.*. An unknown type matches nothing. Omitted: every type.

Example
app_user.*,extension.offline
limit
integer
default: 100 >= 1 <= 1000

How many events at most. Default 100, clamped to 1000. A page also stops after the event that brings its data past 4 MiB; the first event always comes.

A page of events, oldest first, at most limit of them and about 4 MiB of data. next is the cursor of the page’s last event, null only on an empty page: nothing more right now.

Media typeapplication/json
object
events
required
Array<object>
Event

One thing that happened, as your app sees it. Your webhook endpoints receive the same object, in a JSON array of 1 to 100 events. An app_user event carries the user’s whole set of approvals, not the change alone, so a consumer replaces its copy instead of diffing.

object
id
required

Unique to your app. Two apps never share an id, and it is the idempotency key of a delivery.

string format: uuid
type
required

One of the types of GET /events/catalogue, or one your application declares in x-apigami.events, such as message.created: never prefixed with an application’s slug.

string
created_at
required

The ordering key, for every type. Compare it, never arrival order.

string format: date-time
app_id
required

Your app, on what your webhooks and GET /events return. On what a subscription of your manifest receives, the application that emitted the event, one of those under yours, or the one whose queue held the task of a task.completed.

string format: uuid
user_ref
required

The user the event is about, as POST /connect/token returned it. Null on an event about no user.

string | null
install_ref
required

The browser the event is about. Null on an event about the user as a whole, or about no browser.

string | null
data
required

Depends on the type — see GET /events/catalogue. Null once your app has the event and its content was erased.

object | null
data_erased_at
required

When data was erased: every webhook endpoint the event was sent to answered 2xx, or a cursor past it acknowledged it. Null while data is kept.

string | null format: date-time
next
required

Pass it back as cursor once the page is handled: that acknowledges it. Keep it: it survives the purge.

string | null
Example
{
"events": [
{
"id": "6f1c2d3e-4a5b-4c6d-8e9f-0a1b2c3d4e5f",
"type": "app_user.updated",
"created_at": "2026-09-10T10:12:31.128Z",
"app_id": "2b7f6a41-0c9d-4a3e-9f21-8d5c4b3a2109",
"user_ref": "usr_3f9c1a0e7b2d4c58a61e9f0b2d7c4e13",
"install_ref": null,
"data": {
"connected_at": "2026-09-01T08:00:00.000Z",
"locale": "fr",
"grants": [
{
"domain": "acme.com",
"granted": false,
"decided_at": "2026-09-10T10:12:31.128Z"
},
{
"domain": "example.com",
"granted": true,
"decided_at": "2026-09-02T09:30:00.000Z"
}
],
"change": {
"domain": "acme.com",
"decision": "denied",
"was_granted": true
}
},
"data_erased_at": null
}
],
"next": "MjAyNi0wOS0xMFQxMDoxMjozMS4xMjhaLzZmMWM"
}

A query parameter could not be read.

Media typeapplication/json
object
error
required
string
consentPending

Present and true when the approval window is open and the user has not answered within 45 s.

boolean
permission

On consent requested and no grant from emails.send or ai.generate: the permission the user never decided, or refused. Absent for a site.

string
Allowed values: emails ai
settings_url

On no grant: the page of the user’s Apigami space where they allow it again; send them there.

string format: uri
terms

On consent requested, in place of permission: the bare app_id of each application whose terms or subprocessors the user has yet to agree to, unlike the boxes of GET /apps/{app_id}. Only the connect page asks it: send them to connect_url, or to one of your pages.

Array<string>
connect_url

With terms, when the user agrees under your application: your install link, where they tick the boxes still to tick.

string format: uri
Examples
{
"error": "since must be an ISO timestamp"
}

Missing, malformed or revoked API key — or a credential that is not one: a dashboard session, a personal access token and an OAuth token are refused here, like on /call.

Media typeapplication/json
object
error
required
string
consentPending

Present and true when the approval window is open and the user has not answered within 45 s.

boolean
permission

On consent requested and no grant from emails.send or ai.generate: the permission the user never decided, or refused. Absent for a site.

string
Allowed values: emails ai
settings_url

On no grant: the page of the user’s Apigami space where they allow it again; send them there.

string format: uri
terms

On consent requested, in place of permission: the bare app_id of each application whose terms or subprocessors the user has yet to agree to, unlike the boxes of GET /apps/{app_id}. Only the connect page asks it: send them to connect_url, or to one of your pages.

Array<string>
connect_url

With terms, when the user agrees under your application: your install link, where they tick the boxes still to tick.

string format: uri
Example
{
"error": "bad client credentials"
}