provider persons POST
/api/environments/{environment_id}/persons/{id}/split/ @utdk/posthog
/api/environments/{environment_id}/persons/{id}/split/ environments_persons_split_create
Split distinct_ids off a merged person. Two mutually exclusive modes:
- **`distinct_ids_to_split`** (recommended for surgical edits): moves only the listed distinct_ids off this person onto new single-id persons. The original person keeps every other distinct_id and its properties.
- **`main_distinct_id`**: keeps only the specified distinct_id on this person; moves every *other* distinct_id off onto its own new person. If omitted, the first distinct_id is kept.
The original person always retains its properties. To clear individual properties afterward, use the `delete_property` endpoint.
The split runs asynchronously: a 201 response means the task was enqueued. Newly-created split-off persons get a deterministic UUID derived from `(team_id, distinct_id)`, so they can be located client-side without polling. If you need to delete a split-off person after this call, prefer looking it up by that deterministic UUID rather than by distinct_id, since the latter still resolves to the original merged person until the async task completes.
- environment_id path required
- Deprecated. Use /api/projects/{project_id}/ instead.
- string
- format query
- enum: csv, json
- id path required
- A unique value identifying this person. Accepts both numeric ID and UUID.
- string
Try it
Authentication
Configure credentials for PostHog API
Code snippet
Updates live as you fill in the form above.
TypeScript
import posthog from '@utdk/posthog';
await posthog.environmentsPersonsSplitCreate()