@utdk/posthog 1.0.0-20260712.5-dev.e2949a6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +373 -0
- package/README.md +172 -0
- package/docs/account_relationship_definitions.md +194 -0
- package/docs/accounts.md +380 -0
- package/docs/actions.md +274 -0
- package/docs/activity_logs.md +144 -0
- package/docs/advanced_activity_logs.md +101 -0
- package/docs/agent_platform.md +2525 -0
- package/docs/ai-observability.md +514 -0
- package/docs/alerts.md +444 -0
- package/docs/annotations.md +200 -0
- package/docs/batch_exports.md +2118 -0
- package/docs/business_knowledge.md +468 -0
- package/docs/code-invites.md +72 -0
- package/docs/cohorts.md +412 -0
- package/docs/comments.md +321 -0
- package/docs/conversations.md +695 -0
- package/docs/custom_property_definitions.md +442 -0
- package/docs/custom_property_sources.md +194 -0
- package/docs/customer_analytics.md +442 -0
- package/docs/customer_journeys.md +380 -0
- package/docs/customer_profile_configs.md +380 -0
- package/docs/dashboard_templates.md +258 -0
- package/docs/dashboards.md +1896 -0
- package/docs/data_color_themes.md +380 -0
- package/docs/data_modeling_jobs.md +264 -0
- package/docs/data_warehouse.md +928 -0
- package/docs/dataset_items.md +382 -0
- package/docs/datasets.md +382 -0
- package/docs/desktop_file_system.md +753 -0
- package/docs/desktop_file_system_shortcut.md +244 -0
- package/docs/docs.md +72 -0
- package/docs/early_access_feature.md +194 -0
- package/docs/elements.md +510 -0
- package/docs/endpoints.md +1030 -0
- package/docs/engineering_analytics.md +712 -0
- package/docs/environments.md +881 -0
- package/docs/error_tracking.md +5108 -0
- package/docs/evaluation_runs.md +78 -0
- package/docs/evaluations.md +446 -0
- package/docs/event_definitions.md +425 -0
- package/docs/event_filter.md +280 -0
- package/docs/event_schemas.md +163 -0
- package/docs/events.md +208 -0
- package/docs/experiment_holdouts.md +194 -0
- package/docs/experiment_saved_metrics.md +194 -0
- package/docs/experiments.md +1088 -0
- package/docs/exports.md +256 -0
- package/docs/external_data_schemas.md +752 -0
- package/docs/external_data_sources.md +2296 -0
- package/docs/feature_flags.md +808 -0
- package/docs/field_notes.md +206 -0
- package/docs/file_system.md +880 -0
- package/docs/file_system_shortcut.md +444 -0
- package/docs/flag_value.md +46 -0
- package/docs/groups.md +514 -0
- package/docs/groups_types.md +349 -0
- package/docs/health_issues.md +386 -0
- package/docs/heatmap_screenshots.md +72 -0
- package/docs/heatmaps.md +136 -0
- package/docs/hog_flows.md +1576 -0
- package/docs/hog_function_templates.md +101 -0
- package/docs/hog_functions.md +974 -0
- package/docs/ingestion_warnings_v2.md +40 -0
- package/docs/insight_variables.md +380 -0
- package/docs/insights.md +1722 -0
- package/docs/integrations.md +1954 -0
- package/docs/js-snippet.md +104 -0
- package/docs/live_debugger_breakpoints.md +264 -0
- package/docs/llm_analytics.md +3373 -0
- package/docs/llm_prompts.md +442 -0
- package/docs/llm_skills.md +952 -0
- package/docs/logs.md +2446 -0
- package/docs/managed_viewsets.md +140 -0
- package/docs/marketing_analytics.md +518 -0
- package/docs/max.md +772 -0
- package/docs/max_tools.md +70 -0
- package/docs/mcp_analytics.md +712 -0
- package/docs/mcp_server_installations.md +970 -0
- package/docs/mcp_servers.md +78 -0
- package/docs/mcp_tools.md +82 -0
- package/docs/messaging_templates.md +444 -0
- package/docs/metrics.md +462 -0
- package/docs/notebooks.md +838 -0
- package/docs/object_media_previews.md +228 -0
- package/docs/organizations.md +2958 -0
- package/docs/persons.md +1514 -0
- package/docs/platform_features.md +700 -0
- package/docs/plugin_configs.md +70 -0
- package/docs/product_enablement.md +39 -0
- package/docs/product_tours.md +357 -0
- package/docs/project_secret_api_keys.md +444 -0
- package/docs/property_access_controls.md +200 -0
- package/docs/property_definitions.md +244 -0
- package/docs/query.md +560 -0
- package/docs/quota_limits.md +40 -0
- package/docs/reminders.md +194 -0
- package/docs/replay.md +1020 -0
- package/docs/reverse_proxy.md +200 -0
- package/docs/sandbox-custom-images.md +209 -0
- package/docs/sandbox-environments.md +168 -0
- package/docs/saved.md +392 -0
- package/docs/saved_query_column_annotations.md +224 -0
- package/docs/scheduled_changes.md +200 -0
- package/docs/schema_property_groups.md +194 -0
- package/docs/sdk_health.md +40 -0
- package/docs/session_group_summaries.md +200 -0
- package/docs/session_recordings.md +260 -0
- package/docs/session_summaries.md +200 -0
- package/docs/sessions.md +132 -0
- package/docs/signals.md +1428 -0
- package/docs/single_session_summaries.md +72 -0
- package/docs/streamlit_apps.md +456 -0
- package/docs/subscriptions.md +634 -0
- package/docs/surveys.md +731 -0
- package/docs/taggers.md +446 -0
- package/docs/task-automations.md +200 -0
- package/docs/task-runs.md +654 -0
- package/docs/task_channels.md +136 -0
- package/docs/task_mentions.md +40 -0
- package/docs/tasks.md +776 -0
- package/docs/tracing.md +1186 -0
- package/docs/uploaded_media.md +44 -0
- package/docs/user_home_settings.md +72 -0
- package/docs/user_interview_topics.md +1288 -0
- package/docs/user_interviews.md +444 -0
- package/docs/users.md +1267 -0
- package/docs/vision.md +2022 -0
- package/docs/visual_review.md +816 -0
- package/docs/warehouse_column_annotations.md +224 -0
- package/docs/warehouse_column_statistics.md +80 -0
- package/docs/warehouse_dag.md +40 -0
- package/docs/warehouse_model_paths.md +70 -0
- package/docs/warehouse_saved_queries.md +1056 -0
- package/docs/warehouse_saved_query_folders.md +318 -0
- package/docs/warehouse_tables.md +584 -0
- package/docs/warehouse_view_link.md +456 -0
- package/docs/warehouse_view_links.md +456 -0
- package/docs/web_analytics.md +136 -0
- package/docs/web_analytics_achievements.md +200 -0
- package/docs/web_experiments.md +194 -0
- package/docs/web_vitals.md +74 -0
- package/docs/wizard.md +170 -0
- package/index.ts +22 -0
- package/metadata.ts +41419 -0
- package/openapi.json +297382 -0
- package/overlay.yaml +23 -0
- package/package.json +34 -0
- package/provenance.json +24 -0
- package/research.json +80 -0
- package/types/index.ts +17547 -0
package/docs/persons.md
ADDED
|
@@ -0,0 +1,1514 @@
|
|
|
1
|
+
# Persons
|
|
2
|
+
|
|
3
|
+
## Operations
|
|
4
|
+
|
|
5
|
+
### `posthog.environmentsPersonsList`
|
|
6
|
+
|
|
7
|
+
- **HTTP**: `GET /api/environments/{environment_id}/persons/`
|
|
8
|
+
- **What it does**: This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
|
|
9
|
+
- **OpenAPI operationId**: `environments_persons_list`
|
|
10
|
+
- **Path params**: None
|
|
11
|
+
- **Query params**: `distinct_id`, `email`, `format`, `limit`, `offset`, `properties`, `search`
|
|
12
|
+
- **Response codes**: `200`
|
|
13
|
+
- **Transport options**: None
|
|
14
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
15
|
+
|
|
16
|
+
**Inputs**
|
|
17
|
+
|
|
18
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
19
|
+
- Client transport options: None
|
|
20
|
+
|
|
21
|
+
**Outputs**
|
|
22
|
+
|
|
23
|
+
- Client return type: `{ next?: string | null; previous?: string | null; count?: number; results?: ({ id: number; name: string; distinct_ids: (string)[]; properties?: unknown; created_at: string; uuid: string; last_seen_at: string | null })[]...`
|
|
24
|
+
- OpenAPI response codes: `200`
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
import posthog from "@utdk/posthog";
|
|
28
|
+
|
|
29
|
+
type EnvironmentsPersonsListInput = Parameters<typeof posthog.environmentsPersonsList> extends [infer T, ...unknown[]] ? T : undefined;
|
|
30
|
+
type EnvironmentsPersonsListOutput = Awaited<ReturnType<typeof posthog.environmentsPersonsList>>;
|
|
31
|
+
|
|
32
|
+
const result: EnvironmentsPersonsListOutput = await posthog.environmentsPersonsList();
|
|
33
|
+
|
|
34
|
+
// Result shape (from schema): { next?: string | null; previous?: string | null; count?: number; results?: ({ id: number; name: string; distinct_ids: (string)[]; properties?: unknown; created_at: string; uuid: string; last_seen_at: string | null })[]...
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### `posthog.environmentsPersonsRetrieve`
|
|
38
|
+
|
|
39
|
+
- **HTTP**: `GET /api/environments/{environment_id}/persons/{id}/`
|
|
40
|
+
- **What it does**: This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
|
|
41
|
+
- **OpenAPI operationId**: `environments_persons_retrieve`
|
|
42
|
+
- **Path params**: `id`
|
|
43
|
+
- **Query params**: `format`
|
|
44
|
+
- **Response codes**: `200`
|
|
45
|
+
- **Transport options**: None
|
|
46
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
47
|
+
|
|
48
|
+
**Inputs**
|
|
49
|
+
|
|
50
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
51
|
+
- Client transport options: None
|
|
52
|
+
|
|
53
|
+
**Outputs**
|
|
54
|
+
|
|
55
|
+
- Client return type: `{ id: number; name: string; distinct_ids: (string)[]; properties?: unknown; created_at: string; uuid: string; last_seen_at: string | null }`
|
|
56
|
+
- OpenAPI response codes: `200`
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
import posthog from "@utdk/posthog";
|
|
60
|
+
|
|
61
|
+
type EnvironmentsPersonsRetrieveInput = Parameters<typeof posthog.environmentsPersonsRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
62
|
+
type EnvironmentsPersonsRetrieveOutput = Awaited<ReturnType<typeof posthog.environmentsPersonsRetrieve>>;
|
|
63
|
+
|
|
64
|
+
const result: EnvironmentsPersonsRetrieveOutput = await posthog.environmentsPersonsRetrieve();
|
|
65
|
+
|
|
66
|
+
// Result shape (from schema): { id: number; name: string; distinct_ids: (string)[]; properties?: unknown; created_at: string; uuid: string; last_seen_at: string | null }
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### `posthog.environmentsPersonsPartialUpdate`
|
|
70
|
+
|
|
71
|
+
- **HTTP**: `PATCH /api/environments/{environment_id}/persons/{id}/`
|
|
72
|
+
- **What it does**: This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
|
|
73
|
+
- **OpenAPI operationId**: `environments_persons_partial_update`
|
|
74
|
+
- **Path params**: `id`
|
|
75
|
+
- **Query params**: `format`
|
|
76
|
+
- **Response codes**: `200`
|
|
77
|
+
- **Transport options**: None
|
|
78
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
79
|
+
|
|
80
|
+
**Inputs**
|
|
81
|
+
|
|
82
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
83
|
+
- Client transport options: None
|
|
84
|
+
|
|
85
|
+
**Outputs**
|
|
86
|
+
|
|
87
|
+
- Client return type: `{ id: number; name: string; distinct_ids: (string)[]; properties?: unknown; created_at: string; uuid: string; last_seen_at: string | null }`
|
|
88
|
+
- OpenAPI response codes: `200`
|
|
89
|
+
|
|
90
|
+
```ts
|
|
91
|
+
import posthog from "@utdk/posthog";
|
|
92
|
+
|
|
93
|
+
type EnvironmentsPersonsPartialUpdateInput = Parameters<typeof posthog.environmentsPersonsPartialUpdate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
94
|
+
type EnvironmentsPersonsPartialUpdateOutput = Awaited<ReturnType<typeof posthog.environmentsPersonsPartialUpdate>>;
|
|
95
|
+
|
|
96
|
+
const result: EnvironmentsPersonsPartialUpdateOutput = await posthog.environmentsPersonsPartialUpdate();
|
|
97
|
+
|
|
98
|
+
// Result shape (from schema): { id: number; name: string; distinct_ids: (string)[]; properties?: unknown; created_at: string; uuid: string; last_seen_at: string | null }
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### `posthog.environmentsPersonsUpdate`
|
|
102
|
+
|
|
103
|
+
- **HTTP**: `PUT /api/environments/{environment_id}/persons/{id}/`
|
|
104
|
+
- **What it does**: Only for setting properties on the person. "properties" from the request data will be updated via a "$set" event.
|
|
105
|
+
This means that only the properties listed will be updated, but other properties won't be removed nor updated.
|
|
106
|
+
If you would like to remove a property use the `delete_property` endpoint.
|
|
107
|
+
- **OpenAPI operationId**: `environments_persons_update`
|
|
108
|
+
- **Path params**: `id`
|
|
109
|
+
- **Query params**: `format`
|
|
110
|
+
- **Response codes**: `200`
|
|
111
|
+
- **Transport options**: None
|
|
112
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
113
|
+
|
|
114
|
+
**Inputs**
|
|
115
|
+
|
|
116
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
117
|
+
- Client transport options: None
|
|
118
|
+
|
|
119
|
+
**Outputs**
|
|
120
|
+
|
|
121
|
+
- Client return type: `{ id: number; name: string; distinct_ids: (string)[]; properties?: unknown; created_at: string; uuid: string; last_seen_at: string | null }`
|
|
122
|
+
- OpenAPI response codes: `200`
|
|
123
|
+
|
|
124
|
+
```ts
|
|
125
|
+
import posthog from "@utdk/posthog";
|
|
126
|
+
|
|
127
|
+
type EnvironmentsPersonsUpdateInput = Parameters<typeof posthog.environmentsPersonsUpdate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
128
|
+
type EnvironmentsPersonsUpdateOutput = Awaited<ReturnType<typeof posthog.environmentsPersonsUpdate>>;
|
|
129
|
+
|
|
130
|
+
const result: EnvironmentsPersonsUpdateOutput = await posthog.environmentsPersonsUpdate();
|
|
131
|
+
|
|
132
|
+
// Result shape (from schema): { id: number; name: string; distinct_ids: (string)[]; properties?: unknown; created_at: string; uuid: string; last_seen_at: string | null }
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### `posthog.environmentsPersonsActivityRetrieve`
|
|
136
|
+
|
|
137
|
+
- **HTTP**: `GET /api/environments/{environment_id}/persons/{id}/activity/`
|
|
138
|
+
- **What it does**: This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
|
|
139
|
+
- **OpenAPI operationId**: `environments_persons_activity_retrieve`
|
|
140
|
+
- **Path params**: `id`
|
|
141
|
+
- **Query params**: `format`
|
|
142
|
+
- **Response codes**: `200`
|
|
143
|
+
- **Transport options**: None
|
|
144
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
145
|
+
|
|
146
|
+
**Inputs**
|
|
147
|
+
|
|
148
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
149
|
+
- Client transport options: None
|
|
150
|
+
|
|
151
|
+
**Outputs**
|
|
152
|
+
|
|
153
|
+
- Client return type: `unknown`
|
|
154
|
+
- OpenAPI response codes: `200`
|
|
155
|
+
|
|
156
|
+
```ts
|
|
157
|
+
import posthog from "@utdk/posthog";
|
|
158
|
+
|
|
159
|
+
type EnvironmentsPersonsActivityRetrieveInput = Parameters<typeof posthog.environmentsPersonsActivityRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
160
|
+
type EnvironmentsPersonsActivityRetrieveOutput = Awaited<ReturnType<typeof posthog.environmentsPersonsActivityRetrieve>>;
|
|
161
|
+
|
|
162
|
+
const result: EnvironmentsPersonsActivityRetrieveOutput = await posthog.environmentsPersonsActivityRetrieve();
|
|
163
|
+
|
|
164
|
+
// Result shape (from schema): unknown
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### `posthog.environmentsPersonsDeletePropertyCreate`
|
|
168
|
+
|
|
169
|
+
- **HTTP**: `POST /api/environments/{environment_id}/persons/{id}/delete_property/`
|
|
170
|
+
- **What it does**: This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
|
|
171
|
+
- **OpenAPI operationId**: `environments_persons_delete_property_create`
|
|
172
|
+
- **Path params**: `id`
|
|
173
|
+
- **Query params**: `format`
|
|
174
|
+
- **Response codes**: `200`
|
|
175
|
+
- **Transport options**: None
|
|
176
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
177
|
+
|
|
178
|
+
**Inputs**
|
|
179
|
+
|
|
180
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
181
|
+
- Client transport options: None
|
|
182
|
+
|
|
183
|
+
**Outputs**
|
|
184
|
+
|
|
185
|
+
- Client return type: `unknown`
|
|
186
|
+
- OpenAPI response codes: `200`
|
|
187
|
+
|
|
188
|
+
```ts
|
|
189
|
+
import posthog from "@utdk/posthog";
|
|
190
|
+
|
|
191
|
+
type EnvironmentsPersonsDeletePropertyCreateInput = Parameters<typeof posthog.environmentsPersonsDeletePropertyCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
192
|
+
type EnvironmentsPersonsDeletePropertyCreateOutput = Awaited<ReturnType<typeof posthog.environmentsPersonsDeletePropertyCreate>>;
|
|
193
|
+
|
|
194
|
+
const result: EnvironmentsPersonsDeletePropertyCreateOutput = await posthog.environmentsPersonsDeletePropertyCreate();
|
|
195
|
+
|
|
196
|
+
// Result shape (from schema): unknown
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### `posthog.environmentsPersonsEmailsList`
|
|
200
|
+
|
|
201
|
+
- **HTTP**: `GET /api/environments/{environment_id}/persons/{id}/emails/`
|
|
202
|
+
- **What it does**: This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
|
|
203
|
+
- **OpenAPI operationId**: `environments_persons_emails_list`
|
|
204
|
+
- **Path params**: `id`
|
|
205
|
+
- **Query params**: `after`, `before`, `format`, `limit`, `offset`
|
|
206
|
+
- **Response codes**: `200`
|
|
207
|
+
- **Transport options**: None
|
|
208
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
209
|
+
|
|
210
|
+
**Inputs**
|
|
211
|
+
|
|
212
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
213
|
+
- Client transport options: None
|
|
214
|
+
|
|
215
|
+
**Outputs**
|
|
216
|
+
|
|
217
|
+
- Client return type: `({ invocation_id: string; action_id: string; function_id: string; function_name: string; parent_run_id: string; kind: string; distinct_id: string; person_id: string; recipient: string; subject: string; status: string; s...`
|
|
218
|
+
- OpenAPI response codes: `200`
|
|
219
|
+
|
|
220
|
+
```ts
|
|
221
|
+
import posthog from "@utdk/posthog";
|
|
222
|
+
|
|
223
|
+
type EnvironmentsPersonsEmailsListInput = Parameters<typeof posthog.environmentsPersonsEmailsList> extends [infer T, ...unknown[]] ? T : undefined;
|
|
224
|
+
type EnvironmentsPersonsEmailsListOutput = Awaited<ReturnType<typeof posthog.environmentsPersonsEmailsList>>;
|
|
225
|
+
|
|
226
|
+
const result: EnvironmentsPersonsEmailsListOutput = await posthog.environmentsPersonsEmailsList();
|
|
227
|
+
|
|
228
|
+
// Result shape (from schema): ({ invocation_id: string; action_id: string; function_id: string; function_name: string; parent_run_id: string; kind: string; distinct_id: string; person_id: string; recipient: string; subject: string; status: string; s...
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### `posthog.environmentsPersonsPropertiesTimelineRetrieve`
|
|
232
|
+
|
|
233
|
+
- **HTTP**: `GET /api/environments/{environment_id}/persons/{id}/properties_timeline/`
|
|
234
|
+
- **What it does**: This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
|
|
235
|
+
- **OpenAPI operationId**: `environments_persons_properties_timeline_retrieve`
|
|
236
|
+
- **Path params**: `id`
|
|
237
|
+
- **Query params**: `format`
|
|
238
|
+
- **Response codes**: `200`
|
|
239
|
+
- **Transport options**: None
|
|
240
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
241
|
+
|
|
242
|
+
**Inputs**
|
|
243
|
+
|
|
244
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
245
|
+
- Client transport options: None
|
|
246
|
+
|
|
247
|
+
**Outputs**
|
|
248
|
+
|
|
249
|
+
- Client return type: `unknown`
|
|
250
|
+
- OpenAPI response codes: `200`
|
|
251
|
+
|
|
252
|
+
```ts
|
|
253
|
+
import posthog from "@utdk/posthog";
|
|
254
|
+
|
|
255
|
+
type EnvironmentsPersonsPropertiesTimelineRetrieveInput = Parameters<typeof posthog.environmentsPersonsPropertiesTimelineRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
256
|
+
type EnvironmentsPersonsPropertiesTimelineRetrieveOutput = Awaited<ReturnType<typeof posthog.environmentsPersonsPropertiesTimelineRetrieve>>;
|
|
257
|
+
|
|
258
|
+
const result: EnvironmentsPersonsPropertiesTimelineRetrieveOutput = await posthog.environmentsPersonsPropertiesTimelineRetrieve();
|
|
259
|
+
|
|
260
|
+
// Result shape (from schema): unknown
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
### `posthog.environmentsPersonsSplitCreate`
|
|
264
|
+
|
|
265
|
+
- **HTTP**: `POST /api/environments/{environment_id}/persons/{id}/split/`
|
|
266
|
+
- **What it does**: Split distinct_ids off a merged person. Two mutually exclusive modes:
|
|
267
|
+
|
|
268
|
+
- **`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.
|
|
269
|
+
- **`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.
|
|
270
|
+
|
|
271
|
+
The original person always retains its properties. To clear individual properties afterward, use the `delete_property` endpoint.
|
|
272
|
+
|
|
273
|
+
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.
|
|
274
|
+
- **OpenAPI operationId**: `environments_persons_split_create`
|
|
275
|
+
- **Path params**: `id`
|
|
276
|
+
- **Query params**: `format`
|
|
277
|
+
- **Response codes**: `201`
|
|
278
|
+
- **Transport options**: None
|
|
279
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
280
|
+
|
|
281
|
+
**Inputs**
|
|
282
|
+
|
|
283
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
284
|
+
- Client transport options: None
|
|
285
|
+
|
|
286
|
+
**Outputs**
|
|
287
|
+
|
|
288
|
+
- Client return type: `{ success: boolean }`
|
|
289
|
+
- OpenAPI response codes: `201`
|
|
290
|
+
|
|
291
|
+
```ts
|
|
292
|
+
import posthog from "@utdk/posthog";
|
|
293
|
+
|
|
294
|
+
type EnvironmentsPersonsSplitCreateInput = Parameters<typeof posthog.environmentsPersonsSplitCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
295
|
+
type EnvironmentsPersonsSplitCreateOutput = Awaited<ReturnType<typeof posthog.environmentsPersonsSplitCreate>>;
|
|
296
|
+
|
|
297
|
+
const result: EnvironmentsPersonsSplitCreateOutput = await posthog.environmentsPersonsSplitCreate();
|
|
298
|
+
|
|
299
|
+
// Result shape (from schema): { success: boolean }
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
### `posthog.environmentsPersonsUpdatePropertyCreate`
|
|
303
|
+
|
|
304
|
+
- **HTTP**: `POST /api/environments/{environment_id}/persons/{id}/update_property/`
|
|
305
|
+
- **What it does**: This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
|
|
306
|
+
- **OpenAPI operationId**: `environments_persons_update_property_create`
|
|
307
|
+
- **Path params**: `id`
|
|
308
|
+
- **Query params**: `format`
|
|
309
|
+
- **Response codes**: `200`
|
|
310
|
+
- **Transport options**: None
|
|
311
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
312
|
+
|
|
313
|
+
**Inputs**
|
|
314
|
+
|
|
315
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
316
|
+
- Client transport options: None
|
|
317
|
+
|
|
318
|
+
**Outputs**
|
|
319
|
+
|
|
320
|
+
- Client return type: `unknown`
|
|
321
|
+
- OpenAPI response codes: `200`
|
|
322
|
+
|
|
323
|
+
```ts
|
|
324
|
+
import posthog from "@utdk/posthog";
|
|
325
|
+
|
|
326
|
+
type EnvironmentsPersonsUpdatePropertyCreateInput = Parameters<typeof posthog.environmentsPersonsUpdatePropertyCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
327
|
+
type EnvironmentsPersonsUpdatePropertyCreateOutput = Awaited<ReturnType<typeof posthog.environmentsPersonsUpdatePropertyCreate>>;
|
|
328
|
+
|
|
329
|
+
const result: EnvironmentsPersonsUpdatePropertyCreateOutput = await posthog.environmentsPersonsUpdatePropertyCreate();
|
|
330
|
+
|
|
331
|
+
// Result shape (from schema): unknown
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
### `posthog.environmentsPersonsAllActivityRetrieve`
|
|
335
|
+
|
|
336
|
+
- **HTTP**: `GET /api/environments/{environment_id}/persons/activity/`
|
|
337
|
+
- **What it does**: This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
|
|
338
|
+
- **OpenAPI operationId**: `environments_persons_all_activity_retrieve`
|
|
339
|
+
- **Path params**: None
|
|
340
|
+
- **Query params**: `format`
|
|
341
|
+
- **Response codes**: `200`
|
|
342
|
+
- **Transport options**: None
|
|
343
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
344
|
+
|
|
345
|
+
**Inputs**
|
|
346
|
+
|
|
347
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
348
|
+
- Client transport options: None
|
|
349
|
+
|
|
350
|
+
**Outputs**
|
|
351
|
+
|
|
352
|
+
- Client return type: `unknown`
|
|
353
|
+
- OpenAPI response codes: `200`
|
|
354
|
+
|
|
355
|
+
```ts
|
|
356
|
+
import posthog from "@utdk/posthog";
|
|
357
|
+
|
|
358
|
+
type EnvironmentsPersonsAllActivityRetrieveInput = Parameters<typeof posthog.environmentsPersonsAllActivityRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
359
|
+
type EnvironmentsPersonsAllActivityRetrieveOutput = Awaited<ReturnType<typeof posthog.environmentsPersonsAllActivityRetrieve>>;
|
|
360
|
+
|
|
361
|
+
const result: EnvironmentsPersonsAllActivityRetrieveOutput = await posthog.environmentsPersonsAllActivityRetrieve();
|
|
362
|
+
|
|
363
|
+
// Result shape (from schema): unknown
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
### `posthog.environmentsPersonsBatchByDistinctIdsCreate`
|
|
367
|
+
|
|
368
|
+
- **HTTP**: `POST /api/environments/{environment_id}/persons/batch_by_distinct_ids/`
|
|
369
|
+
- **What it does**: This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
|
|
370
|
+
- **OpenAPI operationId**: `environments_persons_batch_by_distinct_ids_create`
|
|
371
|
+
- **Path params**: None
|
|
372
|
+
- **Query params**: `format`
|
|
373
|
+
- **Response codes**: `200`
|
|
374
|
+
- **Transport options**: None
|
|
375
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
376
|
+
|
|
377
|
+
**Inputs**
|
|
378
|
+
|
|
379
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
380
|
+
- Client transport options: None
|
|
381
|
+
|
|
382
|
+
**Outputs**
|
|
383
|
+
|
|
384
|
+
- Client return type: `unknown`
|
|
385
|
+
- OpenAPI response codes: `200`
|
|
386
|
+
|
|
387
|
+
```ts
|
|
388
|
+
import posthog from "@utdk/posthog";
|
|
389
|
+
|
|
390
|
+
type EnvironmentsPersonsBatchByDistinctIdsCreateInput = Parameters<typeof posthog.environmentsPersonsBatchByDistinctIdsCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
391
|
+
type EnvironmentsPersonsBatchByDistinctIdsCreateOutput = Awaited<ReturnType<typeof posthog.environmentsPersonsBatchByDistinctIdsCreate>>;
|
|
392
|
+
|
|
393
|
+
const result: EnvironmentsPersonsBatchByDistinctIdsCreateOutput = await posthog.environmentsPersonsBatchByDistinctIdsCreate();
|
|
394
|
+
|
|
395
|
+
// Result shape (from schema): unknown
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
### `posthog.environmentsPersonsBatchByUuidsCreate`
|
|
399
|
+
|
|
400
|
+
- **HTTP**: `POST /api/environments/{environment_id}/persons/batch_by_uuids/`
|
|
401
|
+
- **What it does**: This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
|
|
402
|
+
- **OpenAPI operationId**: `environments_persons_batch_by_uuids_create`
|
|
403
|
+
- **Path params**: None
|
|
404
|
+
- **Query params**: `format`
|
|
405
|
+
- **Response codes**: `200`
|
|
406
|
+
- **Transport options**: None
|
|
407
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
408
|
+
|
|
409
|
+
**Inputs**
|
|
410
|
+
|
|
411
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
412
|
+
- Client transport options: None
|
|
413
|
+
|
|
414
|
+
**Outputs**
|
|
415
|
+
|
|
416
|
+
- Client return type: `unknown`
|
|
417
|
+
- OpenAPI response codes: `200`
|
|
418
|
+
|
|
419
|
+
```ts
|
|
420
|
+
import posthog from "@utdk/posthog";
|
|
421
|
+
|
|
422
|
+
type EnvironmentsPersonsBatchByUuidsCreateInput = Parameters<typeof posthog.environmentsPersonsBatchByUuidsCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
423
|
+
type EnvironmentsPersonsBatchByUuidsCreateOutput = Awaited<ReturnType<typeof posthog.environmentsPersonsBatchByUuidsCreate>>;
|
|
424
|
+
|
|
425
|
+
const result: EnvironmentsPersonsBatchByUuidsCreateOutput = await posthog.environmentsPersonsBatchByUuidsCreate();
|
|
426
|
+
|
|
427
|
+
// Result shape (from schema): unknown
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
### `posthog.environmentsPersonsBulkDeleteCreate`
|
|
431
|
+
|
|
432
|
+
- **HTTP**: `POST /api/environments/{environment_id}/persons/bulk_delete/`
|
|
433
|
+
- **What it does**: 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.
|
|
434
|
+
- **OpenAPI operationId**: `environments_persons_bulk_delete_create`
|
|
435
|
+
- **Path params**: None
|
|
436
|
+
- **Query params**: `format`
|
|
437
|
+
- **Response codes**: `202`
|
|
438
|
+
- **Transport options**: None
|
|
439
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
440
|
+
|
|
441
|
+
**Inputs**
|
|
442
|
+
|
|
443
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
444
|
+
- Client transport options: None
|
|
445
|
+
|
|
446
|
+
**Outputs**
|
|
447
|
+
|
|
448
|
+
- Client return type: `unknown`
|
|
449
|
+
- OpenAPI response codes: `202`
|
|
450
|
+
|
|
451
|
+
```ts
|
|
452
|
+
import posthog from "@utdk/posthog";
|
|
453
|
+
|
|
454
|
+
type EnvironmentsPersonsBulkDeleteCreateInput = Parameters<typeof posthog.environmentsPersonsBulkDeleteCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
455
|
+
type EnvironmentsPersonsBulkDeleteCreateOutput = Awaited<ReturnType<typeof posthog.environmentsPersonsBulkDeleteCreate>>;
|
|
456
|
+
|
|
457
|
+
const result: EnvironmentsPersonsBulkDeleteCreateOutput = await posthog.environmentsPersonsBulkDeleteCreate();
|
|
458
|
+
|
|
459
|
+
// Result shape (from schema): unknown
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
### `posthog.environmentsPersonsCohortsRetrieve`
|
|
463
|
+
|
|
464
|
+
- **HTTP**: `GET /api/environments/{environment_id}/persons/cohorts/`
|
|
465
|
+
- **What it does**: This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
|
|
466
|
+
- **OpenAPI operationId**: `environments_persons_cohorts_retrieve`
|
|
467
|
+
- **Path params**: None
|
|
468
|
+
- **Query params**: `format`, `person_id`
|
|
469
|
+
- **Response codes**: `200`
|
|
470
|
+
- **Transport options**: None
|
|
471
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
472
|
+
|
|
473
|
+
**Inputs**
|
|
474
|
+
|
|
475
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
476
|
+
- Client transport options: None
|
|
477
|
+
|
|
478
|
+
**Outputs**
|
|
479
|
+
|
|
480
|
+
- Client return type: `unknown`
|
|
481
|
+
- OpenAPI response codes: `200`
|
|
482
|
+
|
|
483
|
+
```ts
|
|
484
|
+
import posthog from "@utdk/posthog";
|
|
485
|
+
|
|
486
|
+
type EnvironmentsPersonsCohortsRetrieveInput = Parameters<typeof posthog.environmentsPersonsCohortsRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
487
|
+
type EnvironmentsPersonsCohortsRetrieveOutput = Awaited<ReturnType<typeof posthog.environmentsPersonsCohortsRetrieve>>;
|
|
488
|
+
|
|
489
|
+
const result: EnvironmentsPersonsCohortsRetrieveOutput = await posthog.environmentsPersonsCohortsRetrieve();
|
|
490
|
+
|
|
491
|
+
// Result shape (from schema): unknown
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
### `posthog.environmentsPersonsDeletionStatusList`
|
|
495
|
+
|
|
496
|
+
- **HTTP**: `GET /api/environments/{environment_id}/persons/deletion_status/`
|
|
497
|
+
- **What it does**: List the status of queued event deletions for persons. When you delete a person with `delete_events=true`, an async deletion is queued. Use this endpoint to check whether those deletions are still pending or have been completed.
|
|
498
|
+
- **OpenAPI operationId**: `environments_persons_deletion_status_list`
|
|
499
|
+
- **Path params**: None
|
|
500
|
+
- **Query params**: `format`, `limit`, `offset`, `person_uuid`, `status`
|
|
501
|
+
- **Response codes**: `200`
|
|
502
|
+
- **Transport options**: None
|
|
503
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
504
|
+
|
|
505
|
+
**Inputs**
|
|
506
|
+
|
|
507
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
508
|
+
- Client transport options: None
|
|
509
|
+
|
|
510
|
+
**Outputs**
|
|
511
|
+
|
|
512
|
+
- Client return type: `{ next?: string | null; previous?: string | null; count?: number; results?: ({ person_uuid: string; created_at: string; status: string; delete_verified_at: string | null })[] }`
|
|
513
|
+
- OpenAPI response codes: `200`
|
|
514
|
+
|
|
515
|
+
```ts
|
|
516
|
+
import posthog from "@utdk/posthog";
|
|
517
|
+
|
|
518
|
+
type EnvironmentsPersonsDeletionStatusListInput = Parameters<typeof posthog.environmentsPersonsDeletionStatusList> extends [infer T, ...unknown[]] ? T : undefined;
|
|
519
|
+
type EnvironmentsPersonsDeletionStatusListOutput = Awaited<ReturnType<typeof posthog.environmentsPersonsDeletionStatusList>>;
|
|
520
|
+
|
|
521
|
+
const result: EnvironmentsPersonsDeletionStatusListOutput = await posthog.environmentsPersonsDeletionStatusList();
|
|
522
|
+
|
|
523
|
+
// Result shape (from schema): { next?: string | null; previous?: string | null; count?: number; results?: ({ person_uuid: string; created_at: string; status: string; delete_verified_at: string | null })[] }
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
### `posthog.environmentsPersonsFunnelRetrieve`
|
|
527
|
+
|
|
528
|
+
- **HTTP**: `GET /api/environments/{environment_id}/persons/funnel/`
|
|
529
|
+
- **What it does**: This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
|
|
530
|
+
- **OpenAPI operationId**: `environments_persons_funnel_retrieve`
|
|
531
|
+
- **Path params**: None
|
|
532
|
+
- **Query params**: `format`
|
|
533
|
+
- **Response codes**: `200`
|
|
534
|
+
- **Transport options**: None
|
|
535
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
536
|
+
|
|
537
|
+
**Inputs**
|
|
538
|
+
|
|
539
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
540
|
+
- Client transport options: None
|
|
541
|
+
|
|
542
|
+
**Outputs**
|
|
543
|
+
|
|
544
|
+
- Client return type: `unknown`
|
|
545
|
+
- OpenAPI response codes: `200`
|
|
546
|
+
|
|
547
|
+
```ts
|
|
548
|
+
import posthog from "@utdk/posthog";
|
|
549
|
+
|
|
550
|
+
type EnvironmentsPersonsFunnelRetrieveInput = Parameters<typeof posthog.environmentsPersonsFunnelRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
551
|
+
type EnvironmentsPersonsFunnelRetrieveOutput = Awaited<ReturnType<typeof posthog.environmentsPersonsFunnelRetrieve>>;
|
|
552
|
+
|
|
553
|
+
const result: EnvironmentsPersonsFunnelRetrieveOutput = await posthog.environmentsPersonsFunnelRetrieve();
|
|
554
|
+
|
|
555
|
+
// Result shape (from schema): unknown
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
### `posthog.environmentsPersonsFunnelCreate`
|
|
559
|
+
|
|
560
|
+
- **HTTP**: `POST /api/environments/{environment_id}/persons/funnel/`
|
|
561
|
+
- **What it does**: This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
|
|
562
|
+
- **OpenAPI operationId**: `environments_persons_funnel_create`
|
|
563
|
+
- **Path params**: None
|
|
564
|
+
- **Query params**: `format`
|
|
565
|
+
- **Response codes**: `200`
|
|
566
|
+
- **Transport options**: None
|
|
567
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
568
|
+
|
|
569
|
+
**Inputs**
|
|
570
|
+
|
|
571
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
572
|
+
- Client transport options: None
|
|
573
|
+
|
|
574
|
+
**Outputs**
|
|
575
|
+
|
|
576
|
+
- Client return type: `unknown`
|
|
577
|
+
- OpenAPI response codes: `200`
|
|
578
|
+
|
|
579
|
+
```ts
|
|
580
|
+
import posthog from "@utdk/posthog";
|
|
581
|
+
|
|
582
|
+
type EnvironmentsPersonsFunnelCreateInput = Parameters<typeof posthog.environmentsPersonsFunnelCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
583
|
+
type EnvironmentsPersonsFunnelCreateOutput = Awaited<ReturnType<typeof posthog.environmentsPersonsFunnelCreate>>;
|
|
584
|
+
|
|
585
|
+
const result: EnvironmentsPersonsFunnelCreateOutput = await posthog.environmentsPersonsFunnelCreate();
|
|
586
|
+
|
|
587
|
+
// Result shape (from schema): unknown
|
|
588
|
+
```
|
|
589
|
+
|
|
590
|
+
### `posthog.environmentsPersonsLifecycleRetrieve`
|
|
591
|
+
|
|
592
|
+
- **HTTP**: `GET /api/environments/{environment_id}/persons/lifecycle/`
|
|
593
|
+
- **What it does**: This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
|
|
594
|
+
- **OpenAPI operationId**: `environments_persons_lifecycle_retrieve`
|
|
595
|
+
- **Path params**: None
|
|
596
|
+
- **Query params**: `format`
|
|
597
|
+
- **Response codes**: `200`
|
|
598
|
+
- **Transport options**: None
|
|
599
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
600
|
+
|
|
601
|
+
**Inputs**
|
|
602
|
+
|
|
603
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
604
|
+
- Client transport options: None
|
|
605
|
+
|
|
606
|
+
**Outputs**
|
|
607
|
+
|
|
608
|
+
- Client return type: `unknown`
|
|
609
|
+
- OpenAPI response codes: `200`
|
|
610
|
+
|
|
611
|
+
```ts
|
|
612
|
+
import posthog from "@utdk/posthog";
|
|
613
|
+
|
|
614
|
+
type EnvironmentsPersonsLifecycleRetrieveInput = Parameters<typeof posthog.environmentsPersonsLifecycleRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
615
|
+
type EnvironmentsPersonsLifecycleRetrieveOutput = Awaited<ReturnType<typeof posthog.environmentsPersonsLifecycleRetrieve>>;
|
|
616
|
+
|
|
617
|
+
const result: EnvironmentsPersonsLifecycleRetrieveOutput = await posthog.environmentsPersonsLifecycleRetrieve();
|
|
618
|
+
|
|
619
|
+
// Result shape (from schema): unknown
|
|
620
|
+
```
|
|
621
|
+
|
|
622
|
+
### `posthog.environmentsPersonsPropertiesAtTimeRetrieve`
|
|
623
|
+
|
|
624
|
+
- **HTTP**: `GET /api/environments/{environment_id}/persons/properties_at_time/`
|
|
625
|
+
- **What it does**: Get person properties as they existed at a specific point in time.
|
|
626
|
+
|
|
627
|
+
This endpoint reconstructs person properties by querying ClickHouse events
|
|
628
|
+
for $set and $set_once operations up to the specified timestamp.
|
|
629
|
+
|
|
630
|
+
Query parameters:
|
|
631
|
+
- distinct_id: The distinct_id of the person
|
|
632
|
+
- timestamp: ISO datetime string for the point in time (e.g., "2023-06-15T14:30:00Z")
|
|
633
|
+
- include_set_once: Whether to handle $set_once operations (default: false)
|
|
634
|
+
- **OpenAPI operationId**: `environments_persons_properties_at_time_retrieve`
|
|
635
|
+
- **Path params**: None
|
|
636
|
+
- **Query params**: `distinct_id`, `format`, `include_set_once`, `person_id`, `timestamp`
|
|
637
|
+
- **Response codes**: `200`, `400`, `404`, `500`
|
|
638
|
+
- **Transport options**: None
|
|
639
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
640
|
+
|
|
641
|
+
**Inputs**
|
|
642
|
+
|
|
643
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
644
|
+
- Client transport options: None
|
|
645
|
+
|
|
646
|
+
**Outputs**
|
|
647
|
+
|
|
648
|
+
- Client return type: `{ id: number; name: string; distinct_ids: (string)[]; properties: { [key: string]: string | null | undefined }; created_at: string; uuid: string; last_seen_at: string | null; point_in_time_metadata: { queried_timestamp:...`
|
|
649
|
+
- OpenAPI response codes: `200`, `400`, `404`, `500`
|
|
650
|
+
|
|
651
|
+
```ts
|
|
652
|
+
import posthog from "@utdk/posthog";
|
|
653
|
+
|
|
654
|
+
type EnvironmentsPersonsPropertiesAtTimeRetrieveInput = Parameters<typeof posthog.environmentsPersonsPropertiesAtTimeRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
655
|
+
type EnvironmentsPersonsPropertiesAtTimeRetrieveOutput = Awaited<ReturnType<typeof posthog.environmentsPersonsPropertiesAtTimeRetrieve>>;
|
|
656
|
+
|
|
657
|
+
const result: EnvironmentsPersonsPropertiesAtTimeRetrieveOutput = await posthog.environmentsPersonsPropertiesAtTimeRetrieve();
|
|
658
|
+
|
|
659
|
+
// Result shape (from schema): { id: number; name: string; distinct_ids: (string)[]; properties: { [key: string]: string | null | undefined }; created_at: string; uuid: string; last_seen_at: string | null; point_in_time_metadata: { queried_timestamp:...
|
|
660
|
+
```
|
|
661
|
+
|
|
662
|
+
### `posthog.environmentsPersonsResetPersonDistinctIdCreate`
|
|
663
|
+
|
|
664
|
+
- **HTTP**: `POST /api/environments/{environment_id}/persons/reset_person_distinct_id/`
|
|
665
|
+
- **What it does**: Reset a distinct_id for a deleted person. This allows the distinct_id to be used again.
|
|
666
|
+
- **OpenAPI operationId**: `environments_persons_reset_person_distinct_id_create`
|
|
667
|
+
- **Path params**: None
|
|
668
|
+
- **Query params**: `format`
|
|
669
|
+
- **Response codes**: `200`
|
|
670
|
+
- **Transport options**: None
|
|
671
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
672
|
+
|
|
673
|
+
**Inputs**
|
|
674
|
+
|
|
675
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
676
|
+
- Client transport options: None
|
|
677
|
+
|
|
678
|
+
**Outputs**
|
|
679
|
+
|
|
680
|
+
- Client return type: `unknown`
|
|
681
|
+
- OpenAPI response codes: `200`
|
|
682
|
+
|
|
683
|
+
```ts
|
|
684
|
+
import posthog from "@utdk/posthog";
|
|
685
|
+
|
|
686
|
+
type EnvironmentsPersonsResetPersonDistinctIdCreateInput = Parameters<typeof posthog.environmentsPersonsResetPersonDistinctIdCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
687
|
+
type EnvironmentsPersonsResetPersonDistinctIdCreateOutput = Awaited<ReturnType<typeof posthog.environmentsPersonsResetPersonDistinctIdCreate>>;
|
|
688
|
+
|
|
689
|
+
const result: EnvironmentsPersonsResetPersonDistinctIdCreateOutput = await posthog.environmentsPersonsResetPersonDistinctIdCreate();
|
|
690
|
+
|
|
691
|
+
// Result shape (from schema): unknown
|
|
692
|
+
```
|
|
693
|
+
|
|
694
|
+
### `posthog.environmentsPersonsTrendsRetrieve`
|
|
695
|
+
|
|
696
|
+
- **HTTP**: `GET /api/environments/{environment_id}/persons/trends/`
|
|
697
|
+
- **What it does**: This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
|
|
698
|
+
- **OpenAPI operationId**: `environments_persons_trends_retrieve`
|
|
699
|
+
- **Path params**: None
|
|
700
|
+
- **Query params**: `format`
|
|
701
|
+
- **Response codes**: `200`
|
|
702
|
+
- **Transport options**: None
|
|
703
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
704
|
+
|
|
705
|
+
**Inputs**
|
|
706
|
+
|
|
707
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
708
|
+
- Client transport options: None
|
|
709
|
+
|
|
710
|
+
**Outputs**
|
|
711
|
+
|
|
712
|
+
- Client return type: `unknown`
|
|
713
|
+
- OpenAPI response codes: `200`
|
|
714
|
+
|
|
715
|
+
```ts
|
|
716
|
+
import posthog from "@utdk/posthog";
|
|
717
|
+
|
|
718
|
+
type EnvironmentsPersonsTrendsRetrieveInput = Parameters<typeof posthog.environmentsPersonsTrendsRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
719
|
+
type EnvironmentsPersonsTrendsRetrieveOutput = Awaited<ReturnType<typeof posthog.environmentsPersonsTrendsRetrieve>>;
|
|
720
|
+
|
|
721
|
+
const result: EnvironmentsPersonsTrendsRetrieveOutput = await posthog.environmentsPersonsTrendsRetrieve();
|
|
722
|
+
|
|
723
|
+
// Result shape (from schema): unknown
|
|
724
|
+
```
|
|
725
|
+
|
|
726
|
+
### `posthog.environmentsPersonsValuesRetrieve`
|
|
727
|
+
|
|
728
|
+
- **HTTP**: `GET /api/environments/{environment_id}/persons/values/`
|
|
729
|
+
- **What it does**: This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
|
|
730
|
+
- **OpenAPI operationId**: `environments_persons_values_retrieve`
|
|
731
|
+
- **Path params**: None
|
|
732
|
+
- **Query params**: `format`, `key`, `value`
|
|
733
|
+
- **Response codes**: `200`
|
|
734
|
+
- **Transport options**: None
|
|
735
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
736
|
+
|
|
737
|
+
**Inputs**
|
|
738
|
+
|
|
739
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
740
|
+
- Client transport options: None
|
|
741
|
+
|
|
742
|
+
**Outputs**
|
|
743
|
+
|
|
744
|
+
- Client return type: `unknown`
|
|
745
|
+
- OpenAPI response codes: `200`
|
|
746
|
+
|
|
747
|
+
```ts
|
|
748
|
+
import posthog from "@utdk/posthog";
|
|
749
|
+
|
|
750
|
+
type EnvironmentsPersonsValuesRetrieveInput = Parameters<typeof posthog.environmentsPersonsValuesRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
751
|
+
type EnvironmentsPersonsValuesRetrieveOutput = Awaited<ReturnType<typeof posthog.environmentsPersonsValuesRetrieve>>;
|
|
752
|
+
|
|
753
|
+
const result: EnvironmentsPersonsValuesRetrieveOutput = await posthog.environmentsPersonsValuesRetrieve();
|
|
754
|
+
|
|
755
|
+
// Result shape (from schema): unknown
|
|
756
|
+
```
|
|
757
|
+
|
|
758
|
+
### `posthog.personsList`
|
|
759
|
+
|
|
760
|
+
- **HTTP**: `GET /api/projects/{project_id}/persons/`
|
|
761
|
+
- **What it does**: This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
|
|
762
|
+
- **OpenAPI operationId**: `persons_list`
|
|
763
|
+
- **Path params**: None
|
|
764
|
+
- **Query params**: `distinct_id`, `email`, `format`, `limit`, `offset`, `properties`, `search`
|
|
765
|
+
- **Response codes**: `200`
|
|
766
|
+
- **Transport options**: None
|
|
767
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
768
|
+
|
|
769
|
+
**Inputs**
|
|
770
|
+
|
|
771
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
772
|
+
- Client transport options: None
|
|
773
|
+
|
|
774
|
+
**Outputs**
|
|
775
|
+
|
|
776
|
+
- Client return type: `{ next?: string | null; previous?: string | null; count?: number; results?: ({ id: number; name: string; distinct_ids: (string)[]; properties?: unknown; created_at: string; uuid: string; last_seen_at: string | null })[]...`
|
|
777
|
+
- OpenAPI response codes: `200`
|
|
778
|
+
|
|
779
|
+
```ts
|
|
780
|
+
import posthog from "@utdk/posthog";
|
|
781
|
+
|
|
782
|
+
type PersonsListInput = Parameters<typeof posthog.personsList> extends [infer T, ...unknown[]] ? T : undefined;
|
|
783
|
+
type PersonsListOutput = Awaited<ReturnType<typeof posthog.personsList>>;
|
|
784
|
+
|
|
785
|
+
const result: PersonsListOutput = await posthog.personsList();
|
|
786
|
+
|
|
787
|
+
// Result shape (from schema): { next?: string | null; previous?: string | null; count?: number; results?: ({ id: number; name: string; distinct_ids: (string)[]; properties?: unknown; created_at: string; uuid: string; last_seen_at: string | null })[]...
|
|
788
|
+
```
|
|
789
|
+
|
|
790
|
+
### `posthog.personsRetrieve`
|
|
791
|
+
|
|
792
|
+
- **HTTP**: `GET /api/projects/{project_id}/persons/{id}/`
|
|
793
|
+
- **What it does**: This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
|
|
794
|
+
- **OpenAPI operationId**: `persons_retrieve`
|
|
795
|
+
- **Path params**: `id`
|
|
796
|
+
- **Query params**: `format`
|
|
797
|
+
- **Response codes**: `200`
|
|
798
|
+
- **Transport options**: None
|
|
799
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
800
|
+
|
|
801
|
+
**Inputs**
|
|
802
|
+
|
|
803
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
804
|
+
- Client transport options: None
|
|
805
|
+
|
|
806
|
+
**Outputs**
|
|
807
|
+
|
|
808
|
+
- Client return type: `{ id: number; name: string; distinct_ids: (string)[]; properties?: unknown; created_at: string; uuid: string; last_seen_at: string | null }`
|
|
809
|
+
- OpenAPI response codes: `200`
|
|
810
|
+
|
|
811
|
+
```ts
|
|
812
|
+
import posthog from "@utdk/posthog";
|
|
813
|
+
|
|
814
|
+
type PersonsRetrieveInput = Parameters<typeof posthog.personsRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
815
|
+
type PersonsRetrieveOutput = Awaited<ReturnType<typeof posthog.personsRetrieve>>;
|
|
816
|
+
|
|
817
|
+
const result: PersonsRetrieveOutput = await posthog.personsRetrieve();
|
|
818
|
+
|
|
819
|
+
// Result shape (from schema): { id: number; name: string; distinct_ids: (string)[]; properties?: unknown; created_at: string; uuid: string; last_seen_at: string | null }
|
|
820
|
+
```
|
|
821
|
+
|
|
822
|
+
### `posthog.personsPartialUpdate`
|
|
823
|
+
|
|
824
|
+
- **HTTP**: `PATCH /api/projects/{project_id}/persons/{id}/`
|
|
825
|
+
- **What it does**: This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
|
|
826
|
+
- **OpenAPI operationId**: `persons_partial_update`
|
|
827
|
+
- **Path params**: `id`
|
|
828
|
+
- **Query params**: `format`
|
|
829
|
+
- **Response codes**: `200`
|
|
830
|
+
- **Transport options**: None
|
|
831
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
832
|
+
|
|
833
|
+
**Inputs**
|
|
834
|
+
|
|
835
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
836
|
+
- Client transport options: None
|
|
837
|
+
|
|
838
|
+
**Outputs**
|
|
839
|
+
|
|
840
|
+
- Client return type: `{ id: number; name: string; distinct_ids: (string)[]; properties?: unknown; created_at: string; uuid: string; last_seen_at: string | null }`
|
|
841
|
+
- OpenAPI response codes: `200`
|
|
842
|
+
|
|
843
|
+
```ts
|
|
844
|
+
import posthog from "@utdk/posthog";
|
|
845
|
+
|
|
846
|
+
type PersonsPartialUpdateInput = Parameters<typeof posthog.personsPartialUpdate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
847
|
+
type PersonsPartialUpdateOutput = Awaited<ReturnType<typeof posthog.personsPartialUpdate>>;
|
|
848
|
+
|
|
849
|
+
const result: PersonsPartialUpdateOutput = await posthog.personsPartialUpdate();
|
|
850
|
+
|
|
851
|
+
// Result shape (from schema): { id: number; name: string; distinct_ids: (string)[]; properties?: unknown; created_at: string; uuid: string; last_seen_at: string | null }
|
|
852
|
+
```
|
|
853
|
+
|
|
854
|
+
### `posthog.personsUpdate`
|
|
855
|
+
|
|
856
|
+
- **HTTP**: `PUT /api/projects/{project_id}/persons/{id}/`
|
|
857
|
+
- **What it does**: Only for setting properties on the person. "properties" from the request data will be updated via a "$set" event.
|
|
858
|
+
This means that only the properties listed will be updated, but other properties won't be removed nor updated.
|
|
859
|
+
If you would like to remove a property use the `delete_property` endpoint.
|
|
860
|
+
- **OpenAPI operationId**: `persons_update`
|
|
861
|
+
- **Path params**: `id`
|
|
862
|
+
- **Query params**: `format`
|
|
863
|
+
- **Response codes**: `200`
|
|
864
|
+
- **Transport options**: None
|
|
865
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
866
|
+
|
|
867
|
+
**Inputs**
|
|
868
|
+
|
|
869
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
870
|
+
- Client transport options: None
|
|
871
|
+
|
|
872
|
+
**Outputs**
|
|
873
|
+
|
|
874
|
+
- Client return type: `{ id: number; name: string; distinct_ids: (string)[]; properties?: unknown; created_at: string; uuid: string; last_seen_at: string | null }`
|
|
875
|
+
- OpenAPI response codes: `200`
|
|
876
|
+
|
|
877
|
+
```ts
|
|
878
|
+
import posthog from "@utdk/posthog";
|
|
879
|
+
|
|
880
|
+
type PersonsUpdateInput = Parameters<typeof posthog.personsUpdate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
881
|
+
type PersonsUpdateOutput = Awaited<ReturnType<typeof posthog.personsUpdate>>;
|
|
882
|
+
|
|
883
|
+
const result: PersonsUpdateOutput = await posthog.personsUpdate();
|
|
884
|
+
|
|
885
|
+
// Result shape (from schema): { id: number; name: string; distinct_ids: (string)[]; properties?: unknown; created_at: string; uuid: string; last_seen_at: string | null }
|
|
886
|
+
```
|
|
887
|
+
|
|
888
|
+
### `posthog.personsActivityRetrieve`
|
|
889
|
+
|
|
890
|
+
- **HTTP**: `GET /api/projects/{project_id}/persons/{id}/activity/`
|
|
891
|
+
- **What it does**: This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
|
|
892
|
+
- **OpenAPI operationId**: `persons_activity_retrieve`
|
|
893
|
+
- **Path params**: `id`
|
|
894
|
+
- **Query params**: `format`
|
|
895
|
+
- **Response codes**: `200`
|
|
896
|
+
- **Transport options**: None
|
|
897
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
898
|
+
|
|
899
|
+
**Inputs**
|
|
900
|
+
|
|
901
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
902
|
+
- Client transport options: None
|
|
903
|
+
|
|
904
|
+
**Outputs**
|
|
905
|
+
|
|
906
|
+
- Client return type: `unknown`
|
|
907
|
+
- OpenAPI response codes: `200`
|
|
908
|
+
|
|
909
|
+
```ts
|
|
910
|
+
import posthog from "@utdk/posthog";
|
|
911
|
+
|
|
912
|
+
type PersonsActivityRetrieveInput = Parameters<typeof posthog.personsActivityRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
913
|
+
type PersonsActivityRetrieveOutput = Awaited<ReturnType<typeof posthog.personsActivityRetrieve>>;
|
|
914
|
+
|
|
915
|
+
const result: PersonsActivityRetrieveOutput = await posthog.personsActivityRetrieve();
|
|
916
|
+
|
|
917
|
+
// Result shape (from schema): unknown
|
|
918
|
+
```
|
|
919
|
+
|
|
920
|
+
### `posthog.personsDeletePropertyCreate`
|
|
921
|
+
|
|
922
|
+
- **HTTP**: `POST /api/projects/{project_id}/persons/{id}/delete_property/`
|
|
923
|
+
- **What it does**: This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
|
|
924
|
+
- **OpenAPI operationId**: `persons_delete_property_create`
|
|
925
|
+
- **Path params**: `id`
|
|
926
|
+
- **Query params**: `format`
|
|
927
|
+
- **Response codes**: `200`
|
|
928
|
+
- **Transport options**: None
|
|
929
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
930
|
+
|
|
931
|
+
**Inputs**
|
|
932
|
+
|
|
933
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
934
|
+
- Client transport options: None
|
|
935
|
+
|
|
936
|
+
**Outputs**
|
|
937
|
+
|
|
938
|
+
- Client return type: `unknown`
|
|
939
|
+
- OpenAPI response codes: `200`
|
|
940
|
+
|
|
941
|
+
```ts
|
|
942
|
+
import posthog from "@utdk/posthog";
|
|
943
|
+
|
|
944
|
+
type PersonsDeletePropertyCreateInput = Parameters<typeof posthog.personsDeletePropertyCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
945
|
+
type PersonsDeletePropertyCreateOutput = Awaited<ReturnType<typeof posthog.personsDeletePropertyCreate>>;
|
|
946
|
+
|
|
947
|
+
const result: PersonsDeletePropertyCreateOutput = await posthog.personsDeletePropertyCreate();
|
|
948
|
+
|
|
949
|
+
// Result shape (from schema): unknown
|
|
950
|
+
```
|
|
951
|
+
|
|
952
|
+
### `posthog.personsEmailsList`
|
|
953
|
+
|
|
954
|
+
- **HTTP**: `GET /api/projects/{project_id}/persons/{id}/emails/`
|
|
955
|
+
- **What it does**: This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
|
|
956
|
+
- **OpenAPI operationId**: `persons_emails_list`
|
|
957
|
+
- **Path params**: `id`
|
|
958
|
+
- **Query params**: `after`, `before`, `format`, `limit`, `offset`
|
|
959
|
+
- **Response codes**: `200`
|
|
960
|
+
- **Transport options**: None
|
|
961
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
962
|
+
|
|
963
|
+
**Inputs**
|
|
964
|
+
|
|
965
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
966
|
+
- Client transport options: None
|
|
967
|
+
|
|
968
|
+
**Outputs**
|
|
969
|
+
|
|
970
|
+
- Client return type: `({ invocation_id: string; action_id: string; function_id: string; function_name: string; parent_run_id: string; kind: string; distinct_id: string; person_id: string; recipient: string; subject: string; status: string; s...`
|
|
971
|
+
- OpenAPI response codes: `200`
|
|
972
|
+
|
|
973
|
+
```ts
|
|
974
|
+
import posthog from "@utdk/posthog";
|
|
975
|
+
|
|
976
|
+
type PersonsEmailsListInput = Parameters<typeof posthog.personsEmailsList> extends [infer T, ...unknown[]] ? T : undefined;
|
|
977
|
+
type PersonsEmailsListOutput = Awaited<ReturnType<typeof posthog.personsEmailsList>>;
|
|
978
|
+
|
|
979
|
+
const result: PersonsEmailsListOutput = await posthog.personsEmailsList();
|
|
980
|
+
|
|
981
|
+
// Result shape (from schema): ({ invocation_id: string; action_id: string; function_id: string; function_name: string; parent_run_id: string; kind: string; distinct_id: string; person_id: string; recipient: string; subject: string; status: string; s...
|
|
982
|
+
```
|
|
983
|
+
|
|
984
|
+
### `posthog.personsPropertiesTimelineRetrieve`
|
|
985
|
+
|
|
986
|
+
- **HTTP**: `GET /api/projects/{project_id}/persons/{id}/properties_timeline/`
|
|
987
|
+
- **What it does**: This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
|
|
988
|
+
- **OpenAPI operationId**: `persons_properties_timeline_retrieve`
|
|
989
|
+
- **Path params**: `id`
|
|
990
|
+
- **Query params**: `format`
|
|
991
|
+
- **Response codes**: `200`
|
|
992
|
+
- **Transport options**: None
|
|
993
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
994
|
+
|
|
995
|
+
**Inputs**
|
|
996
|
+
|
|
997
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
998
|
+
- Client transport options: None
|
|
999
|
+
|
|
1000
|
+
**Outputs**
|
|
1001
|
+
|
|
1002
|
+
- Client return type: `unknown`
|
|
1003
|
+
- OpenAPI response codes: `200`
|
|
1004
|
+
|
|
1005
|
+
```ts
|
|
1006
|
+
import posthog from "@utdk/posthog";
|
|
1007
|
+
|
|
1008
|
+
type PersonsPropertiesTimelineRetrieveInput = Parameters<typeof posthog.personsPropertiesTimelineRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
1009
|
+
type PersonsPropertiesTimelineRetrieveOutput = Awaited<ReturnType<typeof posthog.personsPropertiesTimelineRetrieve>>;
|
|
1010
|
+
|
|
1011
|
+
const result: PersonsPropertiesTimelineRetrieveOutput = await posthog.personsPropertiesTimelineRetrieve();
|
|
1012
|
+
|
|
1013
|
+
// Result shape (from schema): unknown
|
|
1014
|
+
```
|
|
1015
|
+
|
|
1016
|
+
### `posthog.personsSplitCreate`
|
|
1017
|
+
|
|
1018
|
+
- **HTTP**: `POST /api/projects/{project_id}/persons/{id}/split/`
|
|
1019
|
+
- **What it does**: Split distinct_ids off a merged person. Two mutually exclusive modes:
|
|
1020
|
+
|
|
1021
|
+
- **`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.
|
|
1022
|
+
- **`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.
|
|
1023
|
+
|
|
1024
|
+
The original person always retains its properties. To clear individual properties afterward, use the `delete_property` endpoint.
|
|
1025
|
+
|
|
1026
|
+
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.
|
|
1027
|
+
- **OpenAPI operationId**: `persons_split_create`
|
|
1028
|
+
- **Path params**: `id`
|
|
1029
|
+
- **Query params**: `format`
|
|
1030
|
+
- **Response codes**: `201`
|
|
1031
|
+
- **Transport options**: None
|
|
1032
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
1033
|
+
|
|
1034
|
+
**Inputs**
|
|
1035
|
+
|
|
1036
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
1037
|
+
- Client transport options: None
|
|
1038
|
+
|
|
1039
|
+
**Outputs**
|
|
1040
|
+
|
|
1041
|
+
- Client return type: `{ success: boolean }`
|
|
1042
|
+
- OpenAPI response codes: `201`
|
|
1043
|
+
|
|
1044
|
+
```ts
|
|
1045
|
+
import posthog from "@utdk/posthog";
|
|
1046
|
+
|
|
1047
|
+
type PersonsSplitCreateInput = Parameters<typeof posthog.personsSplitCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
1048
|
+
type PersonsSplitCreateOutput = Awaited<ReturnType<typeof posthog.personsSplitCreate>>;
|
|
1049
|
+
|
|
1050
|
+
const result: PersonsSplitCreateOutput = await posthog.personsSplitCreate();
|
|
1051
|
+
|
|
1052
|
+
// Result shape (from schema): { success: boolean }
|
|
1053
|
+
```
|
|
1054
|
+
|
|
1055
|
+
### `posthog.personsUpdatePropertyCreate`
|
|
1056
|
+
|
|
1057
|
+
- **HTTP**: `POST /api/projects/{project_id}/persons/{id}/update_property/`
|
|
1058
|
+
- **What it does**: This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
|
|
1059
|
+
- **OpenAPI operationId**: `persons_update_property_create`
|
|
1060
|
+
- **Path params**: `id`
|
|
1061
|
+
- **Query params**: `format`
|
|
1062
|
+
- **Response codes**: `200`
|
|
1063
|
+
- **Transport options**: None
|
|
1064
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
1065
|
+
|
|
1066
|
+
**Inputs**
|
|
1067
|
+
|
|
1068
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
1069
|
+
- Client transport options: None
|
|
1070
|
+
|
|
1071
|
+
**Outputs**
|
|
1072
|
+
|
|
1073
|
+
- Client return type: `unknown`
|
|
1074
|
+
- OpenAPI response codes: `200`
|
|
1075
|
+
|
|
1076
|
+
```ts
|
|
1077
|
+
import posthog from "@utdk/posthog";
|
|
1078
|
+
|
|
1079
|
+
type PersonsUpdatePropertyCreateInput = Parameters<typeof posthog.personsUpdatePropertyCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
1080
|
+
type PersonsUpdatePropertyCreateOutput = Awaited<ReturnType<typeof posthog.personsUpdatePropertyCreate>>;
|
|
1081
|
+
|
|
1082
|
+
const result: PersonsUpdatePropertyCreateOutput = await posthog.personsUpdatePropertyCreate();
|
|
1083
|
+
|
|
1084
|
+
// Result shape (from schema): unknown
|
|
1085
|
+
```
|
|
1086
|
+
|
|
1087
|
+
### `posthog.personsAllActivityRetrieve`
|
|
1088
|
+
|
|
1089
|
+
- **HTTP**: `GET /api/projects/{project_id}/persons/activity/`
|
|
1090
|
+
- **What it does**: This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
|
|
1091
|
+
- **OpenAPI operationId**: `persons_all_activity_retrieve`
|
|
1092
|
+
- **Path params**: None
|
|
1093
|
+
- **Query params**: `format`
|
|
1094
|
+
- **Response codes**: `200`
|
|
1095
|
+
- **Transport options**: None
|
|
1096
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
1097
|
+
|
|
1098
|
+
**Inputs**
|
|
1099
|
+
|
|
1100
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
1101
|
+
- Client transport options: None
|
|
1102
|
+
|
|
1103
|
+
**Outputs**
|
|
1104
|
+
|
|
1105
|
+
- Client return type: `unknown`
|
|
1106
|
+
- OpenAPI response codes: `200`
|
|
1107
|
+
|
|
1108
|
+
```ts
|
|
1109
|
+
import posthog from "@utdk/posthog";
|
|
1110
|
+
|
|
1111
|
+
type PersonsAllActivityRetrieveInput = Parameters<typeof posthog.personsAllActivityRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
1112
|
+
type PersonsAllActivityRetrieveOutput = Awaited<ReturnType<typeof posthog.personsAllActivityRetrieve>>;
|
|
1113
|
+
|
|
1114
|
+
const result: PersonsAllActivityRetrieveOutput = await posthog.personsAllActivityRetrieve();
|
|
1115
|
+
|
|
1116
|
+
// Result shape (from schema): unknown
|
|
1117
|
+
```
|
|
1118
|
+
|
|
1119
|
+
### `posthog.personsBatchByDistinctIdsCreate`
|
|
1120
|
+
|
|
1121
|
+
- **HTTP**: `POST /api/projects/{project_id}/persons/batch_by_distinct_ids/`
|
|
1122
|
+
- **What it does**: This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
|
|
1123
|
+
- **OpenAPI operationId**: `persons_batch_by_distinct_ids_create`
|
|
1124
|
+
- **Path params**: None
|
|
1125
|
+
- **Query params**: `format`
|
|
1126
|
+
- **Response codes**: `200`
|
|
1127
|
+
- **Transport options**: None
|
|
1128
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
1129
|
+
|
|
1130
|
+
**Inputs**
|
|
1131
|
+
|
|
1132
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
1133
|
+
- Client transport options: None
|
|
1134
|
+
|
|
1135
|
+
**Outputs**
|
|
1136
|
+
|
|
1137
|
+
- Client return type: `unknown`
|
|
1138
|
+
- OpenAPI response codes: `200`
|
|
1139
|
+
|
|
1140
|
+
```ts
|
|
1141
|
+
import posthog from "@utdk/posthog";
|
|
1142
|
+
|
|
1143
|
+
type PersonsBatchByDistinctIdsCreateInput = Parameters<typeof posthog.personsBatchByDistinctIdsCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
1144
|
+
type PersonsBatchByDistinctIdsCreateOutput = Awaited<ReturnType<typeof posthog.personsBatchByDistinctIdsCreate>>;
|
|
1145
|
+
|
|
1146
|
+
const result: PersonsBatchByDistinctIdsCreateOutput = await posthog.personsBatchByDistinctIdsCreate();
|
|
1147
|
+
|
|
1148
|
+
// Result shape (from schema): unknown
|
|
1149
|
+
```
|
|
1150
|
+
|
|
1151
|
+
### `posthog.personsBatchByUuidsCreate`
|
|
1152
|
+
|
|
1153
|
+
- **HTTP**: `POST /api/projects/{project_id}/persons/batch_by_uuids/`
|
|
1154
|
+
- **What it does**: This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
|
|
1155
|
+
- **OpenAPI operationId**: `persons_batch_by_uuids_create`
|
|
1156
|
+
- **Path params**: None
|
|
1157
|
+
- **Query params**: `format`
|
|
1158
|
+
- **Response codes**: `200`
|
|
1159
|
+
- **Transport options**: None
|
|
1160
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
1161
|
+
|
|
1162
|
+
**Inputs**
|
|
1163
|
+
|
|
1164
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
1165
|
+
- Client transport options: None
|
|
1166
|
+
|
|
1167
|
+
**Outputs**
|
|
1168
|
+
|
|
1169
|
+
- Client return type: `unknown`
|
|
1170
|
+
- OpenAPI response codes: `200`
|
|
1171
|
+
|
|
1172
|
+
```ts
|
|
1173
|
+
import posthog from "@utdk/posthog";
|
|
1174
|
+
|
|
1175
|
+
type PersonsBatchByUuidsCreateInput = Parameters<typeof posthog.personsBatchByUuidsCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
1176
|
+
type PersonsBatchByUuidsCreateOutput = Awaited<ReturnType<typeof posthog.personsBatchByUuidsCreate>>;
|
|
1177
|
+
|
|
1178
|
+
const result: PersonsBatchByUuidsCreateOutput = await posthog.personsBatchByUuidsCreate();
|
|
1179
|
+
|
|
1180
|
+
// Result shape (from schema): unknown
|
|
1181
|
+
```
|
|
1182
|
+
|
|
1183
|
+
### `posthog.personsBulkDeleteCreate`
|
|
1184
|
+
|
|
1185
|
+
- **HTTP**: `POST /api/projects/{project_id}/persons/bulk_delete/`
|
|
1186
|
+
- **What it does**: 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.
|
|
1187
|
+
- **OpenAPI operationId**: `persons_bulk_delete_create`
|
|
1188
|
+
- **Path params**: None
|
|
1189
|
+
- **Query params**: `format`
|
|
1190
|
+
- **Response codes**: `202`
|
|
1191
|
+
- **Transport options**: None
|
|
1192
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
1193
|
+
|
|
1194
|
+
**Inputs**
|
|
1195
|
+
|
|
1196
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
1197
|
+
- Client transport options: None
|
|
1198
|
+
|
|
1199
|
+
**Outputs**
|
|
1200
|
+
|
|
1201
|
+
- Client return type: `unknown`
|
|
1202
|
+
- OpenAPI response codes: `202`
|
|
1203
|
+
|
|
1204
|
+
```ts
|
|
1205
|
+
import posthog from "@utdk/posthog";
|
|
1206
|
+
|
|
1207
|
+
type PersonsBulkDeleteCreateInput = Parameters<typeof posthog.personsBulkDeleteCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
1208
|
+
type PersonsBulkDeleteCreateOutput = Awaited<ReturnType<typeof posthog.personsBulkDeleteCreate>>;
|
|
1209
|
+
|
|
1210
|
+
const result: PersonsBulkDeleteCreateOutput = await posthog.personsBulkDeleteCreate();
|
|
1211
|
+
|
|
1212
|
+
// Result shape (from schema): unknown
|
|
1213
|
+
```
|
|
1214
|
+
|
|
1215
|
+
### `posthog.personsCohortsRetrieve`
|
|
1216
|
+
|
|
1217
|
+
- **HTTP**: `GET /api/projects/{project_id}/persons/cohorts/`
|
|
1218
|
+
- **What it does**: This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
|
|
1219
|
+
- **OpenAPI operationId**: `persons_cohorts_retrieve`
|
|
1220
|
+
- **Path params**: None
|
|
1221
|
+
- **Query params**: `format`, `person_id`
|
|
1222
|
+
- **Response codes**: `200`
|
|
1223
|
+
- **Transport options**: None
|
|
1224
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
1225
|
+
|
|
1226
|
+
**Inputs**
|
|
1227
|
+
|
|
1228
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
1229
|
+
- Client transport options: None
|
|
1230
|
+
|
|
1231
|
+
**Outputs**
|
|
1232
|
+
|
|
1233
|
+
- Client return type: `unknown`
|
|
1234
|
+
- OpenAPI response codes: `200`
|
|
1235
|
+
|
|
1236
|
+
```ts
|
|
1237
|
+
import posthog from "@utdk/posthog";
|
|
1238
|
+
|
|
1239
|
+
type PersonsCohortsRetrieveInput = Parameters<typeof posthog.personsCohortsRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
1240
|
+
type PersonsCohortsRetrieveOutput = Awaited<ReturnType<typeof posthog.personsCohortsRetrieve>>;
|
|
1241
|
+
|
|
1242
|
+
const result: PersonsCohortsRetrieveOutput = await posthog.personsCohortsRetrieve();
|
|
1243
|
+
|
|
1244
|
+
// Result shape (from schema): unknown
|
|
1245
|
+
```
|
|
1246
|
+
|
|
1247
|
+
### `posthog.personsDeletionStatusList`
|
|
1248
|
+
|
|
1249
|
+
- **HTTP**: `GET /api/projects/{project_id}/persons/deletion_status/`
|
|
1250
|
+
- **What it does**: List the status of queued event deletions for persons. When you delete a person with `delete_events=true`, an async deletion is queued. Use this endpoint to check whether those deletions are still pending or have been completed.
|
|
1251
|
+
- **OpenAPI operationId**: `persons_deletion_status_list`
|
|
1252
|
+
- **Path params**: None
|
|
1253
|
+
- **Query params**: `format`, `limit`, `offset`, `person_uuid`, `status`
|
|
1254
|
+
- **Response codes**: `200`
|
|
1255
|
+
- **Transport options**: None
|
|
1256
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
1257
|
+
|
|
1258
|
+
**Inputs**
|
|
1259
|
+
|
|
1260
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
1261
|
+
- Client transport options: None
|
|
1262
|
+
|
|
1263
|
+
**Outputs**
|
|
1264
|
+
|
|
1265
|
+
- Client return type: `{ next?: string | null; previous?: string | null; count?: number; results?: ({ person_uuid: string; created_at: string; status: string; delete_verified_at: string | null })[] }`
|
|
1266
|
+
- OpenAPI response codes: `200`
|
|
1267
|
+
|
|
1268
|
+
```ts
|
|
1269
|
+
import posthog from "@utdk/posthog";
|
|
1270
|
+
|
|
1271
|
+
type PersonsDeletionStatusListInput = Parameters<typeof posthog.personsDeletionStatusList> extends [infer T, ...unknown[]] ? T : undefined;
|
|
1272
|
+
type PersonsDeletionStatusListOutput = Awaited<ReturnType<typeof posthog.personsDeletionStatusList>>;
|
|
1273
|
+
|
|
1274
|
+
const result: PersonsDeletionStatusListOutput = await posthog.personsDeletionStatusList();
|
|
1275
|
+
|
|
1276
|
+
// Result shape (from schema): { next?: string | null; previous?: string | null; count?: number; results?: ({ person_uuid: string; created_at: string; status: string; delete_verified_at: string | null })[] }
|
|
1277
|
+
```
|
|
1278
|
+
|
|
1279
|
+
### `posthog.personsFunnelRetrieve`
|
|
1280
|
+
|
|
1281
|
+
- **HTTP**: `GET /api/projects/{project_id}/persons/funnel/`
|
|
1282
|
+
- **What it does**: This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
|
|
1283
|
+
- **OpenAPI operationId**: `persons_funnel_retrieve`
|
|
1284
|
+
- **Path params**: None
|
|
1285
|
+
- **Query params**: `format`
|
|
1286
|
+
- **Response codes**: `200`
|
|
1287
|
+
- **Transport options**: None
|
|
1288
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
1289
|
+
|
|
1290
|
+
**Inputs**
|
|
1291
|
+
|
|
1292
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
1293
|
+
- Client transport options: None
|
|
1294
|
+
|
|
1295
|
+
**Outputs**
|
|
1296
|
+
|
|
1297
|
+
- Client return type: `unknown`
|
|
1298
|
+
- OpenAPI response codes: `200`
|
|
1299
|
+
|
|
1300
|
+
```ts
|
|
1301
|
+
import posthog from "@utdk/posthog";
|
|
1302
|
+
|
|
1303
|
+
type PersonsFunnelRetrieveInput = Parameters<typeof posthog.personsFunnelRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
1304
|
+
type PersonsFunnelRetrieveOutput = Awaited<ReturnType<typeof posthog.personsFunnelRetrieve>>;
|
|
1305
|
+
|
|
1306
|
+
const result: PersonsFunnelRetrieveOutput = await posthog.personsFunnelRetrieve();
|
|
1307
|
+
|
|
1308
|
+
// Result shape (from schema): unknown
|
|
1309
|
+
```
|
|
1310
|
+
|
|
1311
|
+
### `posthog.personsFunnelCreate`
|
|
1312
|
+
|
|
1313
|
+
- **HTTP**: `POST /api/projects/{project_id}/persons/funnel/`
|
|
1314
|
+
- **What it does**: This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
|
|
1315
|
+
- **OpenAPI operationId**: `persons_funnel_create`
|
|
1316
|
+
- **Path params**: None
|
|
1317
|
+
- **Query params**: `format`
|
|
1318
|
+
- **Response codes**: `200`
|
|
1319
|
+
- **Transport options**: None
|
|
1320
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
1321
|
+
|
|
1322
|
+
**Inputs**
|
|
1323
|
+
|
|
1324
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
1325
|
+
- Client transport options: None
|
|
1326
|
+
|
|
1327
|
+
**Outputs**
|
|
1328
|
+
|
|
1329
|
+
- Client return type: `unknown`
|
|
1330
|
+
- OpenAPI response codes: `200`
|
|
1331
|
+
|
|
1332
|
+
```ts
|
|
1333
|
+
import posthog from "@utdk/posthog";
|
|
1334
|
+
|
|
1335
|
+
type PersonsFunnelCreateInput = Parameters<typeof posthog.personsFunnelCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
1336
|
+
type PersonsFunnelCreateOutput = Awaited<ReturnType<typeof posthog.personsFunnelCreate>>;
|
|
1337
|
+
|
|
1338
|
+
const result: PersonsFunnelCreateOutput = await posthog.personsFunnelCreate();
|
|
1339
|
+
|
|
1340
|
+
// Result shape (from schema): unknown
|
|
1341
|
+
```
|
|
1342
|
+
|
|
1343
|
+
### `posthog.personsLifecycleRetrieve`
|
|
1344
|
+
|
|
1345
|
+
- **HTTP**: `GET /api/projects/{project_id}/persons/lifecycle/`
|
|
1346
|
+
- **What it does**: This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
|
|
1347
|
+
- **OpenAPI operationId**: `persons_lifecycle_retrieve`
|
|
1348
|
+
- **Path params**: None
|
|
1349
|
+
- **Query params**: `format`
|
|
1350
|
+
- **Response codes**: `200`
|
|
1351
|
+
- **Transport options**: None
|
|
1352
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
1353
|
+
|
|
1354
|
+
**Inputs**
|
|
1355
|
+
|
|
1356
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
1357
|
+
- Client transport options: None
|
|
1358
|
+
|
|
1359
|
+
**Outputs**
|
|
1360
|
+
|
|
1361
|
+
- Client return type: `unknown`
|
|
1362
|
+
- OpenAPI response codes: `200`
|
|
1363
|
+
|
|
1364
|
+
```ts
|
|
1365
|
+
import posthog from "@utdk/posthog";
|
|
1366
|
+
|
|
1367
|
+
type PersonsLifecycleRetrieveInput = Parameters<typeof posthog.personsLifecycleRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
1368
|
+
type PersonsLifecycleRetrieveOutput = Awaited<ReturnType<typeof posthog.personsLifecycleRetrieve>>;
|
|
1369
|
+
|
|
1370
|
+
const result: PersonsLifecycleRetrieveOutput = await posthog.personsLifecycleRetrieve();
|
|
1371
|
+
|
|
1372
|
+
// Result shape (from schema): unknown
|
|
1373
|
+
```
|
|
1374
|
+
|
|
1375
|
+
### `posthog.personsPropertiesAtTimeRetrieve`
|
|
1376
|
+
|
|
1377
|
+
- **HTTP**: `GET /api/projects/{project_id}/persons/properties_at_time/`
|
|
1378
|
+
- **What it does**: Get person properties as they existed at a specific point in time.
|
|
1379
|
+
|
|
1380
|
+
This endpoint reconstructs person properties by querying ClickHouse events
|
|
1381
|
+
for $set and $set_once operations up to the specified timestamp.
|
|
1382
|
+
|
|
1383
|
+
Query parameters:
|
|
1384
|
+
- distinct_id: The distinct_id of the person
|
|
1385
|
+
- timestamp: ISO datetime string for the point in time (e.g., "2023-06-15T14:30:00Z")
|
|
1386
|
+
- include_set_once: Whether to handle $set_once operations (default: false)
|
|
1387
|
+
- **OpenAPI operationId**: `persons_properties_at_time_retrieve`
|
|
1388
|
+
- **Path params**: None
|
|
1389
|
+
- **Query params**: `distinct_id`, `format`, `include_set_once`, `person_id`, `timestamp`
|
|
1390
|
+
- **Response codes**: `200`, `400`, `404`, `500`
|
|
1391
|
+
- **Transport options**: None
|
|
1392
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
1393
|
+
|
|
1394
|
+
**Inputs**
|
|
1395
|
+
|
|
1396
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
1397
|
+
- Client transport options: None
|
|
1398
|
+
|
|
1399
|
+
**Outputs**
|
|
1400
|
+
|
|
1401
|
+
- Client return type: `{ id: number; name: string; distinct_ids: (string)[]; properties: { [key: string]: string | null | undefined }; created_at: string; uuid: string; last_seen_at: string | null; point_in_time_metadata: { queried_timestamp:...`
|
|
1402
|
+
- OpenAPI response codes: `200`, `400`, `404`, `500`
|
|
1403
|
+
|
|
1404
|
+
```ts
|
|
1405
|
+
import posthog from "@utdk/posthog";
|
|
1406
|
+
|
|
1407
|
+
type PersonsPropertiesAtTimeRetrieveInput = Parameters<typeof posthog.personsPropertiesAtTimeRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
1408
|
+
type PersonsPropertiesAtTimeRetrieveOutput = Awaited<ReturnType<typeof posthog.personsPropertiesAtTimeRetrieve>>;
|
|
1409
|
+
|
|
1410
|
+
const result: PersonsPropertiesAtTimeRetrieveOutput = await posthog.personsPropertiesAtTimeRetrieve();
|
|
1411
|
+
|
|
1412
|
+
// Result shape (from schema): { id: number; name: string; distinct_ids: (string)[]; properties: { [key: string]: string | null | undefined }; created_at: string; uuid: string; last_seen_at: string | null; point_in_time_metadata: { queried_timestamp:...
|
|
1413
|
+
```
|
|
1414
|
+
|
|
1415
|
+
### `posthog.personsResetPersonDistinctIdCreate`
|
|
1416
|
+
|
|
1417
|
+
- **HTTP**: `POST /api/projects/{project_id}/persons/reset_person_distinct_id/`
|
|
1418
|
+
- **What it does**: Reset a distinct_id for a deleted person. This allows the distinct_id to be used again.
|
|
1419
|
+
- **OpenAPI operationId**: `persons_reset_person_distinct_id_create`
|
|
1420
|
+
- **Path params**: None
|
|
1421
|
+
- **Query params**: `format`
|
|
1422
|
+
- **Response codes**: `200`
|
|
1423
|
+
- **Transport options**: None
|
|
1424
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
1425
|
+
|
|
1426
|
+
**Inputs**
|
|
1427
|
+
|
|
1428
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
1429
|
+
- Client transport options: None
|
|
1430
|
+
|
|
1431
|
+
**Outputs**
|
|
1432
|
+
|
|
1433
|
+
- Client return type: `unknown`
|
|
1434
|
+
- OpenAPI response codes: `200`
|
|
1435
|
+
|
|
1436
|
+
```ts
|
|
1437
|
+
import posthog from "@utdk/posthog";
|
|
1438
|
+
|
|
1439
|
+
type PersonsResetPersonDistinctIdCreateInput = Parameters<typeof posthog.personsResetPersonDistinctIdCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
1440
|
+
type PersonsResetPersonDistinctIdCreateOutput = Awaited<ReturnType<typeof posthog.personsResetPersonDistinctIdCreate>>;
|
|
1441
|
+
|
|
1442
|
+
const result: PersonsResetPersonDistinctIdCreateOutput = await posthog.personsResetPersonDistinctIdCreate();
|
|
1443
|
+
|
|
1444
|
+
// Result shape (from schema): unknown
|
|
1445
|
+
```
|
|
1446
|
+
|
|
1447
|
+
### `posthog.personsTrendsRetrieve`
|
|
1448
|
+
|
|
1449
|
+
- **HTTP**: `GET /api/projects/{project_id}/persons/trends/`
|
|
1450
|
+
- **What it does**: This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
|
|
1451
|
+
- **OpenAPI operationId**: `persons_trends_retrieve`
|
|
1452
|
+
- **Path params**: None
|
|
1453
|
+
- **Query params**: `format`
|
|
1454
|
+
- **Response codes**: `200`
|
|
1455
|
+
- **Transport options**: None
|
|
1456
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
1457
|
+
|
|
1458
|
+
**Inputs**
|
|
1459
|
+
|
|
1460
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
1461
|
+
- Client transport options: None
|
|
1462
|
+
|
|
1463
|
+
**Outputs**
|
|
1464
|
+
|
|
1465
|
+
- Client return type: `unknown`
|
|
1466
|
+
- OpenAPI response codes: `200`
|
|
1467
|
+
|
|
1468
|
+
```ts
|
|
1469
|
+
import posthog from "@utdk/posthog";
|
|
1470
|
+
|
|
1471
|
+
type PersonsTrendsRetrieveInput = Parameters<typeof posthog.personsTrendsRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
1472
|
+
type PersonsTrendsRetrieveOutput = Awaited<ReturnType<typeof posthog.personsTrendsRetrieve>>;
|
|
1473
|
+
|
|
1474
|
+
const result: PersonsTrendsRetrieveOutput = await posthog.personsTrendsRetrieve();
|
|
1475
|
+
|
|
1476
|
+
// Result shape (from schema): unknown
|
|
1477
|
+
```
|
|
1478
|
+
|
|
1479
|
+
### `posthog.personsValuesRetrieve`
|
|
1480
|
+
|
|
1481
|
+
- **HTTP**: `GET /api/projects/{project_id}/persons/values/`
|
|
1482
|
+
- **What it does**: This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
|
|
1483
|
+
- **OpenAPI operationId**: `persons_values_retrieve`
|
|
1484
|
+
- **Path params**: None
|
|
1485
|
+
- **Query params**: `format`, `key`, `value`
|
|
1486
|
+
- **Response codes**: `200`
|
|
1487
|
+
- **Transport options**: None
|
|
1488
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
1489
|
+
|
|
1490
|
+
**Inputs**
|
|
1491
|
+
|
|
1492
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
1493
|
+
- Client transport options: None
|
|
1494
|
+
|
|
1495
|
+
**Outputs**
|
|
1496
|
+
|
|
1497
|
+
- Client return type: `unknown`
|
|
1498
|
+
- OpenAPI response codes: `200`
|
|
1499
|
+
|
|
1500
|
+
```ts
|
|
1501
|
+
import posthog from "@utdk/posthog";
|
|
1502
|
+
|
|
1503
|
+
type PersonsValuesRetrieveInput = Parameters<typeof posthog.personsValuesRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
1504
|
+
type PersonsValuesRetrieveOutput = Awaited<ReturnType<typeof posthog.personsValuesRetrieve>>;
|
|
1505
|
+
|
|
1506
|
+
const result: PersonsValuesRetrieveOutput = await posthog.personsValuesRetrieve();
|
|
1507
|
+
|
|
1508
|
+
// Result shape (from schema): unknown
|
|
1509
|
+
```
|
|
1510
|
+
|
|
1511
|
+
|
|
1512
|
+
<!-- prompt-hash:
|
|
1513
|
+
8c3694991a4c289225f05a4e8f1e098cc74d085a088d7dffd82f00d93797b7f8
|
|
1514
|
+
-->
|