# Retrieving events
The /api/events/ endpoint enables you to retrieve
information about events in the system. Not all events are available through the API, as some are of a more internal nature.
The data fetched here is more detailed than the history entries available as part of customer data.
There are many events in the system, so use filters to only fetch the needed data. A maximum of 10000 events are returned.
Note that it is also possible to recieve events as they happen, by setting up event webhooks.
# Parameters
The endpoint uses GET and currently supports the following parameters, all optional:
"event_id" - (optional) ID of a specific event, e.g.
?event_id=462416."customer" - (optional) events for a specific customer with the provided customer ID, e.g.
?customer=9224437."types" - (optional) events with the requested event types, e.g.
?types=customer:created,customer:deleted.The following event types are supported:
- customer:created
- customer:updated
- customer:deleted
- customer:password-reset-requested
- customer:onetime-password-requested
- customer:added-internal-note
- subscription:created
- subscription:updated
- subscription:changed-status
- subscription:changed-campaign
- subscription:created
- subscription:updated
- subscription:changed-status
- subscription:changed-campaign
- subscription:renewed
- subscription:changed-period
- subscription:registered-campaign-change
- subscription:registered-stop
- subscription:cancelled-stop
- customeroverride:created
- customeroverride:updated
- customeroverride:ended
- customer-product-assignment:created
- customer-product-assignment:updated
- campaign:created
- campaign:updated
- payment:created
- payment:allocated
- error:webhook
- error:bladkompagniet
- error:universaldistribution
- error:dimaps
- error:podio
- error:pingen
- error:mailchimp
- error:activecampaign
- error:magento
- error:peppol
- error:external-email-server
- error:invalid-address:bs
- error:invalid-address:pingen
- error:invalid-email
- error:email-delivery
- error:backup
"created_before" - (optional) e.g.
?created_before=2024-01-01(the date inclusive)"created_after" - (optional) e.g.
?created_after=2024-01-01(the date inclusive)"created_before_id" - (optional) events created before the event with the given ID, e.g.
?created_before_id=63524(the event with ID not included)"created_after_id" - (optional) events created after the event with the given ID, e.g.
?created_after_id=63524(the event with ID not included)"max_results" - how many events to retrieve at most, e.g.
max_results=1000. If there are more results available, anext_urlis returned which you can use to grab the next page. "max_results" is currently clipped to be between 1-10000. If left out, 10000 will be assumed."prefetch" - a list of prefetch settings for each event type to return in the JSON. Each prefetch setting in the list should consist of three parts separated by colon: the event object type, the type of setting and the value of the setting, e.g.
?prefetch=customer:fields:data,subscriptions. The default is that no prefetching is done.For all events available though this API except the campaign events, the fields available for prefetch are related to the customer of the event. The available fields are the same as the ones you can fetch for customers via
/api/customers/. E.g. when fetching payment events, the prefetch options are based on the customer data, so that to prefetch customers, their subscriptions and payments the prefetch settings could bepayment:fields:data,subscriptions,payments. To prefetch only the subscription or the payment related to the subscription or the payment event, you can add the settingsubscription:single_subscription:trueorpayment:single_payment:trueto the list of settings- "customer:fields:subscriptions" - prefetch a list of subscriptions for the prefetched customers
- "subscription:fields:data" - fetch related customer data for each subscription event
- "subscription:fields:subscriptions.begin" - fetch related customer subscription data for each subscription event
- "campaign:fields:data" - fetch related campaign data for each campaign event
- "payment:fields:data,subscriptions,payments" - fetch all subscriptions and payment data for the related customer for each payment event
- "subscription:single_subscription:true" - fetch only subscription data for the event subscription for the related customer prefetch data
- "payment:single_payment:true" - fetch only payment data for the event payments for the related customer prefetch data
# Return value
The data returned is an object with an array of event information (possibly empty array). The events will be sorted with the oldest event first.
Note that the content depends on the type of the event. Common for all event types are the fields event_id, timestamp, event and via.
GET /api/events/?created_after_id=6789&types=customer:created,payment:registered
&prefetch=customer:fields:data,payment:fields:data,payment:single_payment:true
{
"events": [
{
"event_id": "6791",
"timestamp": 2026-05-14T18:20:06,
"event": "customer:created",
"via": "administration",
"customer_id": "4560",
"data": {
"name": "Arnold Smith",
"email": "a@smith.com",
"company": "Big Business Corp."
},
"prefetch": {
"customers": [
{
"id": "4560",
"name": "Arnold Smith",
"company": "Big Business Corp.",
"email": "a@smith.com"
}
]
},
},
{
"event_id": "6790",
"timestamp": 2026-05-13T18:20:06,
"event": "payment:created",
"amount": 5.0,
"method": "manual",
"payment_id": "1186",
"currency": "DKK",
"invoice_type": "invoice",
"invoice": 1004,
"customer_id": "3256",
"prefetch": {
"customers": [
{
"id": "3256",
"name": "Maggie Johnson",
"company": "",
"email": "maggie@example.com",
"payments": [
{
"id": "1186",
"amount": 5.0,
"currency": "DKK",
"business_entity": "TinyCorp"
}
]
}
]
}
}
]
}