List all activity logs
curl --request GET \
--url https://api.getlago.com/api/v1/activity_logs \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.getlago.com/api/v1/activity_logs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getlago.com/api/v1/activity_logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getlago.com/api/v1/activity_logs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.getlago.com/api/v1/activity_logs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.getlago.com/api/v1/activity_logs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getlago.com/api/v1/activity_logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"activity_logs": [
{
"activity_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"activity_type": "billing_metric.created",
"activity_source": "api",
"resource_id": "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba",
"resource_type": "BillableMetric",
"organization_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"logged_at": "2025-03-31T12:31:44Z",
"created_at": "2022-04-29T08:59:51Z",
"user_email": "dinesh@piedpiper.test",
"activity_object": {
"lago_id": "dad68bc7-c01a-4ad8-a87b-13e78693a5bc",
"plan_id": "b9155544-e261-4e92-b54e-f65d7609294c"
},
"activity_object_changes": {
"plan_id": [
null,
"b9155544-e261-4e92-b54e-f65d7609294c"
]
},
"external_customer_id": "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba",
"external_subscription_id": "external_id"
}
],
"meta": {
"current_page": 2,
"total_pages": 4,
"total_count": 70,
"next_page": 3,
"prev_page": 1
}
}{
"status": 401,
"error": "Unauthorized"
}Audit logs
List all activity logs
This endpoint retrieves all existing activity logs that represent actions performed on application resources.
GET
/
activity_logs
List all activity logs
curl --request GET \
--url https://api.getlago.com/api/v1/activity_logs \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.getlago.com/api/v1/activity_logs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getlago.com/api/v1/activity_logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getlago.com/api/v1/activity_logs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.getlago.com/api/v1/activity_logs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.getlago.com/api/v1/activity_logs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getlago.com/api/v1/activity_logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"activity_logs": [
{
"activity_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"activity_type": "billing_metric.created",
"activity_source": "api",
"resource_id": "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba",
"resource_type": "BillableMetric",
"organization_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"logged_at": "2025-03-31T12:31:44Z",
"created_at": "2022-04-29T08:59:51Z",
"user_email": "dinesh@piedpiper.test",
"activity_object": {
"lago_id": "dad68bc7-c01a-4ad8-a87b-13e78693a5bc",
"plan_id": "b9155544-e261-4e92-b54e-f65d7609294c"
},
"activity_object_changes": {
"plan_id": [
null,
"b9155544-e261-4e92-b54e-f65d7609294c"
]
},
"external_customer_id": "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba",
"external_subscription_id": "external_id"
}
],
"meta": {
"current_page": 2,
"total_pages": 4,
"total_count": 70,
"next_page": 3,
"prev_page": 1
}
}{
"status": 401,
"error": "Unauthorized"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Page number.
Example:
1
Number of records per page.
Example:
20
Filter activity logs from a specific date.
Example:
"2022-08-09"
Filter activity logs up to a specific date.
Example:
"2022-08-09"
Filter results by activity types
Example:
[ "billing_metric.created", "billing_metric.updated" ]
Filter results by activity sources
Available options:
api, front, system Example:
["api", "front"]
Filter results by user emails
Example:
["dinesh@piedpiper.test"]
Unique identifier assigned to the customer in your application.
Example:
"5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
External subscription ID
Example:
"5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
Filter results by resources unique identifiers
Example:
[ "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba", "1a901a90-1a90-1a90-1a90-1a901a901a90" ]
Filter results by resource class types
Example:
["BillableMetric", "Invoice"]
Was this page helpful?