activity_logs

List all activity logs

Changed on

This endpoint retrieves all existing activity logs that represent actions performed on application resources. Logs are returned from the most recent to the oldest.

get/activity_logs

Request

Query parameters

pageinteger
Example:1

Page number. Defaults to 1. A value that is not a positive integer, such as 0, returns the first page.

per_pageinteger
Example:20

Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a 422 error with value_is_out_of_range on per_page. A value that is not a positive integer, such as 0, returns the default number of records.

from_datestring date
Example:2022-08-09

Filter activity logs logged at or after this date. A date or a full ISO 8601 datetime is accepted.

to_datestring date
Example:2022-08-09

Filter activity logs logged at or before this date. A date or a full ISO 8601 datetime is accepted.

activity_types[]string[]

Filter results by activity types.

[
  "billable_metric.created",
  "billable_metric.updated"
]
activity_sources[]string[]

Filter results by activity sources.

[
  "api",
  "front"
]
user_emails[]string[]

Filter results by the email of the user who performed the activity.

[
  "dinesh@piedpiper.example"
]
external_customer_idstring
Example:5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba

Unique identifier assigned to the customer in your application.

external_subscription_idstring
Example:5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba

External subscription ID

resource_ids[]string[]

Filter results by the unique identifiers of the resources the actions were applied to.

[
  "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba",
  "1a901a90-1a90-1a90-1a90-1a901a901a90"
]
resource_types[]string[]

Filter results by resource types.

[
  "BillableMetric",
  "Invoice"
]

Response

List of activity logs

Example response

{
  "activity_logs": [
    {
      "activity_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
      "user_email": "dinesh@piedpiper.example",
      "activity_type": "billable_metric.created",
      "activity_source": "api",
      "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",
      "resource_id": "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba",
      "resource_type": "BillableMetric",
      "logged_at": "2025-03-31T12:31:44Z",
      "created_at": "2022-04-29T08:59:51Z"
    }
  ],
  "meta": {
    "current_page": 2,
    "next_page": 3,
    "prev_page": 1,
    "total_pages": 4,
    "total_count": 70
  }
}

Changes

    • breaking

      the // response's property format changed from object to no format for status

    • breaking

      the // response's property format changed from object to no format for status

    • breaking

      removed the required property // from the response with the status

    • info

      added the non-success response with the status

    • info

      the response property // became required for the status

    • info

      the response property // became required for the status

    • info

      the response property // became required for the status

    • info

      the response property // became required for the status

    • info

      the response property // became required for the status