events_retention
events_retention

Get the events retention window for a project

Returns how far back events stay queryable for this project. The window comes from the organization's plan and is read-only. Both window fields are null while no retention window applies to the project.

get/api/projects/{project_id}/events_retention/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/events_retention/
  • Auth: HTTP bearer

Path parameters

project_idstring required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Response

retention_monthsinteger nullable required

How many months of events stay queryable, counted back from today. Null while no retention window applies to the project.

retained_fromstring date nullable required

The earliest date whose events are still queryable, in the project's timezone. Null while no retention window applies to the project.

docs_urlstring uri required

Where the events retention policy is documented.

Changes

No recorded changes to this operation across all 1 revision of this API.