Usage events are the raw data that meters aggregate into billable quantities. Send an event every time a metered action occurs — an API call, a file upload, a message sent. Borga matches each event to the appropriate meter byDocumentation Index
Fetch the complete documentation index at: https://docs.borga.is/llms.txt
Use this file to discover all available pages before exploring further.
event_name and accumulates usage for invoicing.
Ingest a single event
POST /v1/events
Ingests one usage event.
Request parameters
Name of the event. Must match the
event_name configured on a meter. Maximum 200 characters.ID of the Borga customer this event belongs to. Either
customer or external_customer_id must be provided.Your own identifier for the customer. Borga will resolve this to a Borga customer ID. Either
customer or external_customer_id must be provided.A unique string for this event. If you send two events with the same key, only the first is recorded. Maximum 200 characters. Recommended for all production ingestion.
ISO 8601 timestamp indicating when the event occurred. Defaults to the current time if omitted. Use this to backfill historical events.
Arbitrary key-value pairs describing the event. For meters with
aggregate_type other than count, the aggregate_property value is read from this object.Response fields
Unique identifier assigned to this event.
Name of the ingested event.
ID of the customer this event is associated with.
The idempotency key provided with this event.
ISO 8601 timestamp of when the event occurred.
Key-value pairs attached to the event.
Ingest a batch of events
POST /v1/events/batch
Ingests up to 1,000 events in a single request. Borga processes each event independently — if one event fails validation, the others are still ingested.
Each batch request can contain a maximum of 1,000 events. If you need to send more, split them across multiple batch requests.
Request parameters
Array of event objects to ingest. Minimum 1, maximum 1,000 items. Each object accepts the same fields as a single event ingestion request.
Response fields
Number of events successfully ingested.
Array of error objects for any events that failed validation. Each object includes an
index indicating which event in the request array failed, and a message describing the error.List events
GET /v1/events
Returns a paginated list of ingested events, ordered by timestamp descending.
Query parameters
Filter events by customer ID.
Filter events by event name.
Return only events at or after this ISO 8601 timestamp.
Return only events at or before this ISO 8601 timestamp.
Cursor for pagination. Pass the
id of the last event from the previous page to retrieve the next page.Maximum number of events to return per page.
Response fields
Array of event objects. Each object has the same fields as the single event response above.
Whether more events exist beyond this page. Pass the last
id as starting_after to retrieve the next page.