events

    This endpoint allows you to list and filter events.
    It is effectively deprecated and is kept only for backwards compatibility.
    If you ever ask about it you will be advised to not use it...
    If you want to ad-hoc list or aggregate events, use the Query endpoint instead.
    If you want to export all events or many pages of events you should use our CDP/Batch Exports products instead.
    
get/api/projects/{project_id}/events/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/events/
  • 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/.

Query parameters

afterstring date-time

Only return events with a timestamp after this time. Default: now() - 24 hours.

beforestring date-time

Only return events with a timestamp before this time. Default: now() + 5 seconds.

distinct_idinteger

Filter list by distinct id.

eventstring

Filter list by event. For example user sign up or $pageview.

format'csv' | 'json'
include_personboolean

Include person details for each event. Default: false.

limitinteger

The maximum number of results to return

offsetinteger

Allows to skip first offset rows. Will fail for value larger than 100000. Read about proper way of paginating: https://posthog.com/docs/api/queries#5-use-timestamp-based-pagination-instead-of-offset

person_idinteger

Filter list by person id.

type'AND' | 'OR'

Filter events by event property, person property, cohort, groups and more.

selectstring[]

(Experimental) JSON-serialized array of HogQL expressions to return

wherestring[]

(Experimental) JSON-serialized array of HogQL expressions that must pass

Response

nextstring uri nullable

Example response

{
  "next": "http://api.example.org/accounts/?offset=400&limit=100"
}

Changes

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