Core-13

For instructions on how to authenticate to use this endpoint, see API overview.

Endpoints

POST
DELETE
POST
GET
POST
GET
PATCH
DELETE
POST
GET
GET
GET
PATCH
DELETE
POST
GET
GET
PATCH

Create session recordings sharing passwords

Create a new password for the sharing configuration.

Required API key scopes

sharing_configuration:write

Path parameters

  • recording_id
    string

Request parameters

  • enabled
    boolean
  • settings
  • password_required
    boolean

Response


Example request

POST /api/projects/:project_id/session_recordings/:recording_id/sharing/passwords
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/session_recordings/:recording_id/sharing/passwords/\
-d created_at="string"

Example response

Status 200
RESPONSE
{
"created_at": "2019-08-24T14:15:22Z",
"enabled": true,
"access_token": "string",
"settings": null,
"password_required": true,
"share_passwords": [
{
"id": 0,
"created_at": "2019-08-24T14:15:22Z",
"note": "string",
"created_by_email": "string",
"is_active": true
}
]
}

Delete session recordings sharing passwords

Delete a password from the sharing configuration.

Required API key scopes

sharing_configuration:write

Path parameters

  • password_id
    string
  • recording_id
    string

Example request

DELETE /api/projects/:project_id/session_recordings/:recording_id/sharing/passwords/:password_id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X DELETE \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/session_recordings/:recording_id/sharing/passwords/:password_id/

Example response

Status 204 No response body

Create session recordings sharing refresh

Required API key scopes

sharing_configuration:write

Path parameters

  • recording_id
    string

Request parameters

  • enabled
    boolean
  • settings
  • password_required
    boolean

Response


Example request

POST /api/projects/:project_id/session_recordings/:recording_id/sharing/refresh
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/session_recordings/:recording_id/sharing/refresh/\
-d created_at="string"

Example response

Status 200
RESPONSE
{
"created_at": "2019-08-24T14:15:22Z",
"enabled": true,
"access_token": "string",
"settings": null,
"password_required": true,
"share_passwords": [
{
"id": 0,
"created_at": "2019-08-24T14:15:22Z",
"note": "string",
"created_by_email": "string",
"is_active": true
}
]
}

List all subscriptions

Also available via the PostHog MCP server:

  • subscriptions-listList subscriptions

Required API key scopes

subscription:read

Query parameters

  • created_by
    string
  • dashboard
    integer
  • insight
    integer
  • limit
    integer
  • offset
    integer
  • ordering
    string
  • resource_type
    string
    One of: "dashboard""insight"
  • search
    string
  • target_type
    string
    One of: "email""slack""webhook"

Response


Example request

GET /api/projects/:project_id/subscriptions
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/subscriptions/

Example response

Status 200
RESPONSE
{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100",
"results": [
{
"id": 0,
"dashboard": 0,
"insight": 0,
"insight_short_id": "string",
"resource_name": "string",
"dashboard_export_insights": [
0
],
"target_type": "email",
"target_value": "string",
"frequency": "daily",
"interval": -2147483648,
"byweekday": [
"monday"
],
"bysetpos": -2147483648,
"count": -2147483648,
"start_date": "2019-08-24T14:15:22Z",
"until_date": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"deleted": true,
"enabled": true,
"title": "string",
"summary": "string",
"next_delivery_date": "2019-08-24T14:15:22Z",
"integration_id": 0,
"invite_message": "string",
"summary_enabled": true,
"summary_prompt_guide": "string"
}
]
}

Create subscriptions

Also available via the PostHog MCP server:

  • subscriptions-createCreate subscription

Required API key scopes

subscription:write

Request parameters

  • dashboard
    integernull
  • insight
    integernull
  • dashboard_export_insights
    array
  • target_type
  • target_value
    string
  • frequency
  • interval
    integer
  • byweekday
    arraynull
  • bysetpos
    integernull
  • count
    integernull
  • start_date
    string
  • until_date
    stringnull
  • deleted
    boolean
  • enabled
    boolean
  • title
    stringnull
  • integration_id
    integernull
  • invite_message
    stringnull
  • summary_enabled
    boolean
  • summary_prompt_guide
    string

Response


Example request

POST /api/projects/:project_id/subscriptions
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/subscriptions/\
-d target_type=undefined,\
-d target_value="string",\
-d frequency=undefined,\
-d start_date="string"

Example response

Status 201
RESPONSE
{
"id": 0,
"dashboard": 0,
"insight": 0,
"insight_short_id": "string",
"resource_name": "string",
"dashboard_export_insights": [
0
],
"target_type": "email",
"target_value": "string",
"frequency": "daily",
"interval": -2147483648,
"byweekday": [
"monday"
],
"bysetpos": -2147483648,
"count": -2147483648,
"start_date": "2019-08-24T14:15:22Z",
"until_date": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"deleted": true,
"enabled": true,
"title": "string",
"summary": "string",
"next_delivery_date": "2019-08-24T14:15:22Z",
"integration_id": 0,
"invite_message": "string",
"summary_enabled": true,
"summary_prompt_guide": "string"
}

Retrieve subscriptions

Also available via the PostHog MCP server:

  • subscriptions-retrieveGet subscription

Required API key scopes

subscription:read

Path parameters

  • id
    integer

Response


Example request

GET /api/projects/:project_id/subscriptions/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/subscriptions/:id/

Example response

Status 200
RESPONSE
{
"id": 0,
"dashboard": 0,
"insight": 0,
"insight_short_id": "string",
"resource_name": "string",
"dashboard_export_insights": [
0
],
"target_type": "email",
"target_value": "string",
"frequency": "daily",
"interval": -2147483648,
"byweekday": [
"monday"
],
"bysetpos": -2147483648,
"count": -2147483648,
"start_date": "2019-08-24T14:15:22Z",
"until_date": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"deleted": true,
"enabled": true,
"title": "string",
"summary": "string",
"next_delivery_date": "2019-08-24T14:15:22Z",
"integration_id": 0,
"invite_message": "string",
"summary_enabled": true,
"summary_prompt_guide": "string"
}

Update subscriptions

Also available via the PostHog MCP server:

  • subscriptions-partial-updateUpdate subscription

Required API key scopes

subscription:write

Path parameters

  • id
    integer

Request parameters

  • dashboard
    integernull
  • insight
    integernull
  • dashboard_export_insights
    array
  • target_type
  • target_value
    string
  • frequency
  • interval
    integer
  • byweekday
    arraynull
  • bysetpos
    integernull
  • count
    integernull
  • start_date
    string
  • until_date
    stringnull
  • deleted
    boolean
  • enabled
    boolean
  • title
    stringnull
  • integration_id
    integernull
  • invite_message
    stringnull
  • summary_enabled
    boolean
  • summary_prompt_guide
    string

Response


Example request

PATCH /api/projects/:project_id/subscriptions/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/subscriptions/:id/\
-d dashboard=["integer","null"]

Example response

Status 200
RESPONSE
{
"id": 0,
"dashboard": 0,
"insight": 0,
"insight_short_id": "string",
"resource_name": "string",
"dashboard_export_insights": [
0
],
"target_type": "email",
"target_value": "string",
"frequency": "daily",
"interval": -2147483648,
"byweekday": [
"monday"
],
"bysetpos": -2147483648,
"count": -2147483648,
"start_date": "2019-08-24T14:15:22Z",
"until_date": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"deleted": true,
"enabled": true,
"title": "string",
"summary": "string",
"next_delivery_date": "2019-08-24T14:15:22Z",
"integration_id": 0,
"invite_message": "string",
"summary_enabled": true,
"summary_prompt_guide": "string"
}

Delete subscriptions

Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true

Required API key scopes

subscription:write

Path parameters

  • id
    integer

Example request

DELETE /api/projects/:project_id/subscriptions/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X DELETE \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/subscriptions/:id/

Example response

Status 405 No response body

Create subscriptions test delivery

Also available via the PostHog MCP server:

  • subscriptions-test-delivery-createSend test delivery

Required API key scopes

subscription:write

Path parameters

  • id
    integer

Example request

POST /api/projects/:project_id/subscriptions/:id/test-delivery
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/subscriptions/:id/test-delivery/

Example response

Status 202 Test delivery workflow started

Retrieve subscriptions summary quota

Required API key scopes

subscription:read

Example request

GET /api/projects/:project_id/subscriptions/summary_quota
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/subscriptions/summary_quota/

Example response

Status 200 Org-wide AI summary quota: count of currently-active summaries and the limit for the org's plan tier. `limit` is null when no cap is configured.

List all users

Required API key scopes

user:read

Query parameters

  • email
    string
  • is_staff
    boolean
  • limit
    integer
  • offset
    integer

Response


Example request

GET /api/users
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/users/

Example response

Status 200
RESPONSE
{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100",
"results": [
{
"date_joined": "2019-08-24T14:15:22Z",
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"pending_email": "user@example.com",
"is_email_verified": true,
"notification_settings": {},
"anonymize_data": true,
"allow_impersonation": true,
"toolbar_mode": "disabled",
"has_password": true,
"id": 0,
"is_staff": true,
"is_impersonated": true,
"is_impersonated_until": "string",
"is_impersonated_read_only": true,
"sensitive_session_expires_at": "string",
"team": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"organization": "452c1a86-a0af-475b-b03f-724878b0f387",
"project_id": -9223372036854776000,
"api_token": "string",
"name": "string",
"completed_snippet_onboarding": true,
"has_completed_onboarding_for": null,
"ingested_event": true,
"is_demo": true,
"timezone": "Africa/Abidjan",
"access_control": true
},
"organization": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"slug": "string",
"logo_media_id": "a5d9f2f1-d934-4d2e-bebe-4b3cdcd08a33",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"membership_level": 1,
"plugins_access_level": 0,
"teams": [
{}
],
"projects": [
{}
],
"available_product_features": [
null
],
"is_member_join_email_enabled": true,
"metadata": {
"property1": "string",
"property2": "string"
},
"customer_id": "string",
"enforce_2fa": true,
"members_can_invite": true,
"members_can_use_personal_api_keys": true,
"allow_publicly_shared_resources": true,
"member_count": 0,
"is_ai_data_processing_approved": true,
"is_ai_training_opted_in": true,
"is_ai_training_locked": true,
"is_ai_training_cta_shown": true,
"is_hipaa": true,
"default_experiment_stats_method": "bayesian",
"default_anonymize_ips": true,
"default_role_id": "string",
"is_active": true,
"is_not_active_reason": "string",
"is_pending_deletion": true
},
"organizations": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"slug": "string",
"logo_media_id": "a5d9f2f1-d934-4d2e-bebe-4b3cdcd08a33",
"membership_level": 1,
"members_can_use_personal_api_keys": true,
"is_active": true,
"is_not_active_reason": "string",
"is_pending_deletion": true
}
],
"set_current_organization": "string",
"set_current_team": "string",
"password": "string",
"current_password": "string",
"events_column_config": null,
"is_2fa_enabled": true,
"has_social_auth": true,
"has_sso_enforcement": true,
"has_seen_product_intro_for": null,
"scene_personalisation": [
{
"scene": "string",
"dashboard": 0
}
],
"theme_mode": "light",
"hedgehog_config": null,
"allow_sidebar_suggestions": true,
"shortcut_position": "above",
"role_at_organization": "engineering",
"passkeys_enabled_for_2fa": true,
"hide_mcp_hints": true,
"onboarding_skipped_at": "2019-08-24T14:15:22Z",
"onboarding_skipped_reason": "delegated",
"onboarding_skipped_organization_id": "07d05e34-b1e4-4d27-bda6-e0475982a5c6",
"onboarding_delegated_to_invite": "5b84e4d7-3fe6-4b27-ad86-bc5c82f39436",
"onboarding_delegated_to_organization_id": "cc1d8401-81fd-4ff9-836c-1740f15ea5c2",
"onboarding_delegation_accepted_at": "2019-08-24T14:15:22Z",
"is_organization_first_user": true,
"active_realtime_notification_types": [
"string"
],
"pending_invites": [
{
"id": "string",
"target_email": "user@example.com",
"organization_id": "string",
"organization_name": "string",
"created_at": "2019-08-24T14:15:22Z"
}
],
"requires_credential_review": true
}
]
}

Retrieve users

Retrieve a user's profile and settings. Pass @me as the UUID to fetch the authenticated user; non-staff callers may only access their own account.

Required API key scopes

user:read

Path parameters

  • uuid
    string

Response


Example request

GET /api/users/:uuid
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/users/:uuid/

Example response

Status 200
RESPONSE
{
"date_joined": "2019-08-24T14:15:22Z",
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"pending_email": "user@example.com",
"is_email_verified": true,
"notification_settings": {},
"anonymize_data": true,
"allow_impersonation": true,
"toolbar_mode": "disabled",
"has_password": true,
"id": 0,
"is_staff": true,
"is_impersonated": true,
"is_impersonated_until": "string",
"is_impersonated_read_only": true,
"sensitive_session_expires_at": "string",
"team": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"organization": "452c1a86-a0af-475b-b03f-724878b0f387",
"project_id": -9223372036854776000,
"api_token": "string",
"name": "string",
"completed_snippet_onboarding": true,
"has_completed_onboarding_for": null,
"ingested_event": true,
"is_demo": true,
"timezone": "Africa/Abidjan",
"access_control": true
},
"organization": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"slug": "string",
"logo_media_id": "a5d9f2f1-d934-4d2e-bebe-4b3cdcd08a33",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"membership_level": 1,
"plugins_access_level": 0,
"teams": [
{}
],
"projects": [
{}
],
"available_product_features": [
null
],
"is_member_join_email_enabled": true,
"metadata": {
"property1": "string",
"property2": "string"
},
"customer_id": "string",
"enforce_2fa": true,
"members_can_invite": true,
"members_can_use_personal_api_keys": true,
"allow_publicly_shared_resources": true,
"member_count": 0,
"is_ai_data_processing_approved": true,
"is_ai_training_opted_in": true,
"is_ai_training_locked": true,
"is_ai_training_cta_shown": true,
"is_hipaa": true,
"default_experiment_stats_method": "bayesian",
"default_anonymize_ips": true,
"default_role_id": "string",
"is_active": true,
"is_not_active_reason": "string",
"is_pending_deletion": true
},
"organizations": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"slug": "string",
"logo_media_id": "a5d9f2f1-d934-4d2e-bebe-4b3cdcd08a33",
"membership_level": 1,
"members_can_use_personal_api_keys": true,
"is_active": true,
"is_not_active_reason": "string",
"is_pending_deletion": true
}
],
"set_current_organization": "string",
"set_current_team": "string",
"password": "string",
"current_password": "string",
"events_column_config": null,
"is_2fa_enabled": true,
"has_social_auth": true,
"has_sso_enforcement": true,
"has_seen_product_intro_for": null,
"scene_personalisation": [
{
"scene": "string",
"dashboard": 0
}
],
"theme_mode": "light",
"hedgehog_config": null,
"allow_sidebar_suggestions": true,
"shortcut_position": "above",
"role_at_organization": "engineering",
"passkeys_enabled_for_2fa": true,
"hide_mcp_hints": true,
"onboarding_skipped_at": "2019-08-24T14:15:22Z",
"onboarding_skipped_reason": "delegated",
"onboarding_skipped_organization_id": "07d05e34-b1e4-4d27-bda6-e0475982a5c6",
"onboarding_delegated_to_invite": "5b84e4d7-3fe6-4b27-ad86-bc5c82f39436",
"onboarding_delegated_to_organization_id": "cc1d8401-81fd-4ff9-836c-1740f15ea5c2",
"onboarding_delegation_accepted_at": "2019-08-24T14:15:22Z",
"is_organization_first_user": true,
"active_realtime_notification_types": [
"string"
],
"pending_invites": [
{
"id": "string",
"target_email": "user@example.com",
"organization_id": "string",
"organization_name": "string",
"created_at": "2019-08-24T14:15:22Z"
}
],
"requires_credential_review": true
}

Update users

Update one or more of the authenticated user's profile fields or settings.

Required API key scopes

user:write

Path parameters

  • uuid
    string

Request parameters

  • first_name
    string
  • last_name
    string
  • email
    string
  • notification_settings
    object
  • anonymize_data
    booleannull
  • allow_impersonation
    booleannull
  • toolbar_mode
  • is_staff
    boolean
  • set_current_organization
    string
  • set_current_team
    string
  • password
    string
  • current_password
    string
  • events_column_config
  • has_seen_product_intro_for
  • theme_mode
  • hedgehog_config
  • allow_sidebar_suggestions
    booleannull
  • shortcut_position
  • role_at_organization
  • passkeys_enabled_for_2fa
    booleannull
  • hide_mcp_hints
    boolean

Response


Example request

PATCH /api/users/:uuid
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/users/:uuid/\
-d date_joined="string"

Example response

Status 200
RESPONSE
{
"date_joined": "2019-08-24T14:15:22Z",
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"pending_email": "user@example.com",
"is_email_verified": true,
"notification_settings": {},
"anonymize_data": true,
"allow_impersonation": true,
"toolbar_mode": "disabled",
"has_password": true,
"id": 0,
"is_staff": true,
"is_impersonated": true,
"is_impersonated_until": "string",
"is_impersonated_read_only": true,
"sensitive_session_expires_at": "string",
"team": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"organization": "452c1a86-a0af-475b-b03f-724878b0f387",
"project_id": -9223372036854776000,
"api_token": "string",
"name": "string",
"completed_snippet_onboarding": true,
"has_completed_onboarding_for": null,
"ingested_event": true,
"is_demo": true,
"timezone": "Africa/Abidjan",
"access_control": true
},
"organization": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"slug": "string",
"logo_media_id": "a5d9f2f1-d934-4d2e-bebe-4b3cdcd08a33",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"membership_level": 1,
"plugins_access_level": 0,
"teams": [
{}
],
"projects": [
{}
],
"available_product_features": [
null
],
"is_member_join_email_enabled": true,
"metadata": {
"property1": "string",
"property2": "string"
},
"customer_id": "string",
"enforce_2fa": true,
"members_can_invite": true,
"members_can_use_personal_api_keys": true,
"allow_publicly_shared_resources": true,
"member_count": 0,
"is_ai_data_processing_approved": true,
"is_ai_training_opted_in": true,
"is_ai_training_locked": true,
"is_ai_training_cta_shown": true,
"is_hipaa": true,
"default_experiment_stats_method": "bayesian",
"default_anonymize_ips": true,
"default_role_id": "string",
"is_active": true,
"is_not_active_reason": "string",
"is_pending_deletion": true
},
"organizations": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"slug": "string",
"logo_media_id": "a5d9f2f1-d934-4d2e-bebe-4b3cdcd08a33",
"membership_level": 1,
"members_can_use_personal_api_keys": true,
"is_active": true,
"is_not_active_reason": "string",
"is_pending_deletion": true
}
],
"set_current_organization": "string",
"set_current_team": "string",
"password": "string",
"current_password": "string",
"events_column_config": null,
"is_2fa_enabled": true,
"has_social_auth": true,
"has_sso_enforcement": true,
"has_seen_product_intro_for": null,
"scene_personalisation": [
{
"scene": "string",
"dashboard": 0
}
],
"theme_mode": "light",
"hedgehog_config": null,
"allow_sidebar_suggestions": true,
"shortcut_position": "above",
"role_at_organization": "engineering",
"passkeys_enabled_for_2fa": true,
"hide_mcp_hints": true,
"onboarding_skipped_at": "2019-08-24T14:15:22Z",
"onboarding_skipped_reason": "delegated",
"onboarding_skipped_organization_id": "07d05e34-b1e4-4d27-bda6-e0475982a5c6",
"onboarding_delegated_to_invite": "5b84e4d7-3fe6-4b27-ad86-bc5c82f39436",
"onboarding_delegated_to_organization_id": "cc1d8401-81fd-4ff9-836c-1740f15ea5c2",
"onboarding_delegation_accepted_at": "2019-08-24T14:15:22Z",
"is_organization_first_user": true,
"active_realtime_notification_types": [
"string"
],
"pending_invites": [
{
"id": "string",
"target_email": "user@example.com",
"organization_id": "string",
"organization_name": "string",
"created_at": "2019-08-24T14:15:22Z"
}
],
"requires_credential_review": true
}

Delete users

Path parameters

  • uuid
    string

Example request

DELETE /api/users/:uuid
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X DELETE \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/users/:uuid/

Example response

Status 204 No response body

Create users credentials review complete

Mark the user as having reviewed their existing credentials. Idempotent. Flips requires_credential_review to False so the post-login interstitial isn't shown again. Does not modify any credentials; the user revokes individual Personal API Keys via the existing PAT endpoints from the same screen.

Path parameters

  • uuid
    string

Example request

POST /api/users/:uuid/credentials_review_complete
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/users/:uuid/credentials_review_complete/

Example response

Status 204 No response body

Retrieve users github login

Required API key scopes

user:read

Path parameters

  • uuid
    string

Example request

GET /api/users/:uuid/github_login
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/users/:uuid/github_login/

Example response

Status 200 No response body

Retrieve users hedgehog config

Required API key scopes

user:read

Path parameters

  • uuid
    string

Example request

GET /api/users/:uuid/hedgehog_config
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/users/:uuid/hedgehog_config/

Example response

Status 200 No response body

Update users hedgehog config

Required API key scopes

user:write

Path parameters

  • uuid
    string

Request parameters

  • first_name
    string
  • last_name
    string
  • email
    string
  • notification_settings
    object
  • anonymize_data
    booleannull
  • allow_impersonation
    booleannull
  • toolbar_mode
  • is_staff
    boolean
  • set_current_organization
    string
  • set_current_team
    string
  • password
    string
  • current_password
    string
  • events_column_config
  • has_seen_product_intro_for
  • theme_mode
  • hedgehog_config
  • allow_sidebar_suggestions
    booleannull
  • shortcut_position
  • role_at_organization
  • passkeys_enabled_for_2fa
    booleannull
  • hide_mcp_hints
    boolean

Example request

PATCH /api/users/:uuid/hedgehog_config
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/users/:uuid/hedgehog_config/\
-d date_joined="string"

Example response

Status 200 No response body

Community questions

Questions about this page? or post a community question.