Persons-2
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
POST | |
POST | |
GET | |
GET | |
POST | |
GET | |
POST | |
GET | |
GET | |
POST |
Create environments persons batch by distinct ids
This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the capture API, the $set and $unset properties, or one of our SDKs.
Path parameters
- environment_idstring
Query parameters
- formatstringOne of:
"csv""json"
Request parameters
- properties
Example request
POST /api /environments /:environment_id /persons /batch_by_distinct_idsExample response
Status 200 No response body
Create environments persons batch by distinct ids
This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the capture API, the $set and $unset properties, or one of our SDKs.
Path parameters
- environment_idstring
Query parameters
- formatstringOne of:
"csv""json"
Request parameters
- properties
Example request
POST /api /environments /:environment_id /persons /batch_by_distinct_idsExample response
Status 200 No response body
Create environments persons bulk delete
This endpoint allows you to bulk delete persons, either by the PostHog person IDs or by distinct IDs. You can pass in a maximum of 1000 IDs per call. Only events captured before the request will be deleted.
Required API key scopes
person:writePath parameters
- environment_idstring
Query parameters
- delete_eventsbooleanDefault:
false - delete_recordingsbooleanDefault:
false - distinct_idsobject
- formatstringOne of:
"csv""json" - idsobject
- keep_personbooleanDefault:
false
Request parameters
- properties
Example request
POST /api /environments /:environment_id /persons /bulk_deleteExample response
Status 200 No response body
Create environments persons bulk delete
This endpoint allows you to bulk delete persons, either by the PostHog person IDs or by distinct IDs. You can pass in a maximum of 1000 IDs per call. Only events captured before the request will be deleted.
Required API key scopes
person:writePath parameters
- environment_idstring
Query parameters
- delete_eventsbooleanDefault:
false - delete_recordingsbooleanDefault:
false - distinct_idsobject
- formatstringOne of:
"csv""json" - idsobject
- keep_personbooleanDefault:
false
Request parameters
- properties
Example request
POST /api /environments /:environment_id /persons /bulk_deleteExample response
Status 200 No response body
Retrieve environments persons cohorts
This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the capture API, the $set and $unset properties, or one of our SDKs.
Required API key scopes
person:readcohort:readPath parameters
- environment_idstring
Query parameters
- formatstringOne of:
"csv""json"
Example request
GET /api /environments /:environment_id /persons /cohortsExample response
Status 200 No response body
Retrieve environments persons cohorts
This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the capture API, the $set and $unset properties, or one of our SDKs.
Required API key scopes
person:readcohort:readPath parameters
- environment_idstring
Query parameters
- formatstringOne of:
"csv""json"
Example request
GET /api /environments /:environment_id /persons /cohortsExample response
Status 200 No response body
Retrieve environments persons funnel
This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the capture API, the $set and $unset properties, or one of our SDKs.
Path parameters
- environment_idstring
Query parameters
- formatstringOne of:
"csv""json"
Example request
GET /api /environments /:environment_id /persons /funnelExample response
Status 200 No response body
Retrieve environments persons funnel
This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the capture API, the $set and $unset properties, or one of our SDKs.
Path parameters
- environment_idstring
Query parameters
- formatstringOne of:
"csv""json"
Example request
GET /api /environments /:environment_id /persons /funnelExample response
Status 200 No response body
Create environments persons funnel
This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the capture API, the $set and $unset properties, or one of our SDKs.
Path parameters
- environment_idstring
Query parameters
- formatstringOne of:
"csv""json"
Request parameters
- properties
Example request
POST /api /environments /:environment_id /persons /funnelExample response
Status 200 No response body
Create environments persons funnel
This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the capture API, the $set and $unset properties, or one of our SDKs.
Path parameters
- environment_idstring
Query parameters
- formatstringOne of:
"csv""json"
Request parameters
- properties
Example request
POST /api /environments /:environment_id /persons /funnelExample response
Status 200 No response body
Retrieve environments persons funnel correlation
This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the capture API, the $set and $unset properties, or one of our SDKs.
Path parameters
- environment_idstring
Query parameters
- formatstringOne of:
"csv""json"
Example request
GET /api /environments /:environment_id /persons /funnel /correlationExample response
Status 200 No response body
Retrieve environments persons funnel correlation
This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the capture API, the $set and $unset properties, or one of our SDKs.
Path parameters
- environment_idstring
Query parameters
- formatstringOne of:
"csv""json"
Example request
GET /api /environments /:environment_id /persons /funnel /correlationExample response
Status 200 No response body
Create environments persons funnel correlation
This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the capture API, the $set and $unset properties, or one of our SDKs.
Path parameters
- environment_idstring
Query parameters
- formatstringOne of:
"csv""json"
Request parameters
- properties
Example request
POST /api /environments /:environment_id /persons /funnel /correlationExample response
Status 200 No response body
Create environments persons funnel correlation
This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the capture API, the $set and $unset properties, or one of our SDKs.
Path parameters
- environment_idstring
Query parameters
- formatstringOne of:
"csv""json"
Request parameters
- properties
Example request
POST /api /environments /:environment_id /persons /funnel /correlationExample response
Status 200 No response body
Retrieve environments persons lifecycle
This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the capture API, the $set and $unset properties, or one of our SDKs.
Path parameters
- environment_idstring
Query parameters
- formatstringOne of:
"csv""json"
Example request
GET /api /environments /:environment_id /persons /lifecycleExample response
Status 200 No response body
Retrieve environments persons lifecycle
This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the capture API, the $set and $unset properties, or one of our SDKs.
Path parameters
- environment_idstring
Query parameters
- formatstringOne of:
"csv""json"
Example request
GET /api /environments /:environment_id /persons /lifecycleExample response
Status 200 No response body
Retrieve environments persons properties at time
Get person properties as they existed at a specific point in time.
This endpoint reconstructs person properties by querying ClickHouse events for $set and $set_once operations up to the specified timestamp.
Query parameters:
- distinct_id: The distinct_id of the person
- timestamp: ISO datetime string for the point in time (e.g., "2023-06-15T14:30:00Z")
- include_set_once: Whether to handle $set_once operations (default: false)
- debug: Whether to include debug information with raw events (default: false)
Required API key scopes
person:readPath parameters
- environment_idstring
Query parameters
- debugboolean
- distinct_idstring
- formatstringOne of:
"csv""json" - include_set_onceboolean
- person_idstring
- timestampstring
Response
Example request
GET /api /environments /:environment_id /persons /properties_at_timeExample response
Status 200
Status 400
Status 404
Status 500
Retrieve environments persons properties at time
Get person properties as they existed at a specific point in time.
This endpoint reconstructs person properties by querying ClickHouse events for $set and $set_once operations up to the specified timestamp.
Query parameters:
- distinct_id: The distinct_id of the person
- timestamp: ISO datetime string for the point in time (e.g., "2023-06-15T14:30:00Z")
- include_set_once: Whether to handle $set_once operations (default: false)
- debug: Whether to include debug information with raw events (default: false)
Required API key scopes
person:readPath parameters
- environment_idstring
Query parameters
- debugboolean
- distinct_idstring
- formatstringOne of:
"csv""json" - include_set_onceboolean
- person_idstring
- timestampstring
Response
Example request
GET /api /environments /:environment_id /persons /properties_at_timeExample response
Status 200
Status 400
Status 404
Status 500
Create environments persons reset person distinct id
Reset a distinct_id for a deleted person. This allows the distinct_id to be used again.
Required API key scopes
person:writePath parameters
- environment_idstring
Query parameters
- formatstringOne of:
"csv""json"
Request parameters
- properties
Example request
POST /api /environments /:environment_id /persons /reset_person_distinct_idExample response
Status 200 No response body
Create environments persons reset person distinct id
Reset a distinct_id for a deleted person. This allows the distinct_id to be used again.
Required API key scopes
person:writePath parameters
- environment_idstring
Query parameters
- formatstringOne of:
"csv""json"
Request parameters
- properties
Example request
POST /api /environments /:environment_id /persons /reset_person_distinct_id