Users-2

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

Disable 2FA and remove all related devices

Endpoints

POST
GET
GET
POST
POST
PATCH
POST
POST

Create users two factor disable

Path parameters

  • uuid
    string

Request parameters

  • first_name
    string
  • last_name
    string
  • email
    string
  • notification_settings
    object
  • anonymize_data
    boolean
  • toolbar_mode
  • is_staff
    boolean

    Designates whether the user can log into this admin site.

  • 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
  • role_at_organization

Example request

POST /api/users/:uuid/two_factor_disable
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/two_factor_disable/\
-d email="string",\
-d password="string"

Example response

Status 200 No response body

Create users two factor disable

Path parameters

  • uuid
    string

Request parameters

  • first_name
    string
  • last_name
    string
  • email
    string
  • notification_settings
    object
  • anonymize_data
    boolean
  • toolbar_mode
  • is_staff
    boolean

    Designates whether the user can log into this admin site.

  • 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
  • role_at_organization

Example request

POST /api/users/:uuid/two_factor_disable
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/two_factor_disable/\
-d email="string",\
-d password="string"

Example response

Status 200 No response body

Retrieve users two factor start setup

Path parameters

  • uuid
    string

Example request

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

Example response

Status 200 No response body

Retrieve users two factor start setup

Path parameters

  • uuid
    string

Example request

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

Example response

Status 200 No response body

Retrieve users two factor status

Get current 2FA status including backup codes if enabled

Path parameters

  • uuid
    string

Example request

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

Example response

Status 200 No response body

Retrieve users two factor status

Get current 2FA status including backup codes if enabled

Path parameters

  • uuid
    string

Example request

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

Example response

Status 200 No response body

Create users two factor validate

Path parameters

  • uuid
    string

Request parameters

  • first_name
    string
  • last_name
    string
  • email
    string
  • notification_settings
    object
  • anonymize_data
    boolean
  • toolbar_mode
  • is_staff
    boolean

    Designates whether the user can log into this admin site.

  • 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
  • role_at_organization

Example request

POST /api/users/:uuid/two_factor_validate
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/two_factor_validate/\
-d email="string",\
-d password="string"

Example response

Status 200 No response body

Create users two factor validate

Path parameters

  • uuid
    string

Request parameters

  • first_name
    string
  • last_name
    string
  • email
    string
  • notification_settings
    object
  • anonymize_data
    boolean
  • toolbar_mode
  • is_staff
    boolean

    Designates whether the user can log into this admin site.

  • 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
  • role_at_organization

Example request

POST /api/users/:uuid/two_factor_validate
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/two_factor_validate/\
-d email="string",\
-d password="string"

Example response

Status 200 No response body

Create users validate 2fa

Path parameters

  • uuid
    string

Request parameters

  • first_name
    string
  • last_name
    string
  • email
    string
  • notification_settings
    object
  • anonymize_data
    boolean
  • toolbar_mode
  • is_staff
    boolean

    Designates whether the user can log into this admin site.

  • 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
  • role_at_organization

Example request

POST /api/users/:uuid/validate_2fa
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/validate_2fa/\
-d email="string",\
-d password="string"

Example response

Status 200 No response body

Create users validate 2fa

Path parameters

  • uuid
    string

Request parameters

  • first_name
    string
  • last_name
    string
  • email
    string
  • notification_settings
    object
  • anonymize_data
    boolean
  • toolbar_mode
  • is_staff
    boolean

    Designates whether the user can log into this admin site.

  • 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
  • role_at_organization

Example request

POST /api/users/:uuid/validate_2fa
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/validate_2fa/\
-d email="string",\
-d password="string"

Example response

Status 200 No response body

Update users cancel email change request

Request parameters

  • first_name
    string
  • last_name
    string
  • email
    string
  • notification_settings
    object
  • anonymize_data
    boolean
  • toolbar_mode
  • is_staff
    boolean

    Designates whether the user can log into this admin site.

  • 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
  • role_at_organization

Example request

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

Example response

Status 200 No response body

Update users cancel email change request

Request parameters

  • first_name
    string
  • last_name
    string
  • email
    string
  • notification_settings
    object
  • anonymize_data
    boolean
  • toolbar_mode
  • is_staff
    boolean

    Designates whether the user can log into this admin site.

  • 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
  • role_at_organization

Example request

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

Example response

Status 200 No response body

Create users request email verification

Request parameters

  • first_name
    string
  • last_name
    string
  • email
    string
  • notification_settings
    object
  • anonymize_data
    boolean
  • toolbar_mode
  • is_staff
    boolean

    Designates whether the user can log into this admin site.

  • 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
  • role_at_organization

Example request

POST /api/users/request_email_verification
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/request_email_verification/\
-d email="string",\
-d password="string"

Example response

Status 200 No response body

Create users request email verification

Request parameters

  • first_name
    string
  • last_name
    string
  • email
    string
  • notification_settings
    object
  • anonymize_data
    boolean
  • toolbar_mode
  • is_staff
    boolean

    Designates whether the user can log into this admin site.

  • 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
  • role_at_organization

Example request

POST /api/users/request_email_verification
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/request_email_verification/\
-d email="string",\
-d password="string"

Example response

Status 200 No response body

Create users verify email

Request parameters

  • first_name
    string
  • last_name
    string
  • email
    string
  • notification_settings
    object
  • anonymize_data
    boolean
  • toolbar_mode
  • is_staff
    boolean

    Designates whether the user can log into this admin site.

  • 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
  • role_at_organization

Example request

POST /api/users/verify_email
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/verify_email/\
-d email="string",\
-d password="string"

Example response

Status 200 No response body

Create users verify email

Request parameters

  • first_name
    string
  • last_name
    string
  • email
    string
  • notification_settings
    object
  • anonymize_data
    boolean
  • toolbar_mode
  • is_staff
    boolean

    Designates whether the user can log into this admin site.

  • 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
  • role_at_organization

Example request

POST /api/users/verify_email
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/verify_email/\
-d email="string",\
-d password="string"

Example response

Status 200 No response body

Community questions

Questions about this page? or post a community question.