events
Send a usage event
Changed onThis endpoint is used for transmitting a usage measurement event to a subscription.
post/events
Request
- Base URLhttps://api.getlago.com/api/v1
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"event": {
"transaction_id": "transaction_1234567890",
"external_subscription_id": "sub_1234567890",
"code": "storage",
"precise_total_amount_cents": "1234.56",
"properties": {
"gb": 10
}
}
}Response
Event
Example response
{
"event": {
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"transaction_id": "transaction_1234567890",
"code": "storage",
"timestamp": "2022-04-29T08:59:51.123Z",
"precise_total_amount_cents": "1234.56",
"properties": {
"gb": 10
},
"lago_subscription_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"external_subscription_id": "sub_1234567890",
"created_at": "2022-04-29T08:59:51Z"
}
}Changes
- info
added the new optional request property
//
- info