Product

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

Product tours is in private alpha

Product Tours is currently in private alpha. Share your thoughts and we'll reach out with early access.


Endpoints

GET
POST
GET
PATCH
DELETE
DELETE
PATCH
GET
POST
POST

List all product tours

Required API key scopes

product_tour:read

Path parameters

  • project_id
    string

Query parameters

  • limit
    integer
  • offset
    integer
  • search
    string

Response


Example request

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

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": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"internal_targeting_flag": {
"id": 0,
"team_id": 0,
"name": "string",
"key": "string",
"filters": {
"property1": null,
"property2": null
},
"deleted": true,
"active": true,
"ensure_experience_continuity": true,
"has_encrypted_payloads": true,
"version": -2147483648,
"evaluation_runtime": "server",
"bucketing_identifier": "distinct_id",
"evaluation_tags": [
"string"
],
"evaluation_contexts": [
"string"
]
},
"linked_flag": {
"id": 0,
"team_id": 0,
"name": "string",
"key": "string",
"filters": {
"property1": null,
"property2": null
},
"deleted": true,
"active": true,
"ensure_experience_continuity": true,
"has_encrypted_payloads": true,
"version": -2147483648,
"evaluation_runtime": "server",
"bucketing_identifier": "distinct_id",
"evaluation_tags": [
"string"
],
"evaluation_contexts": [
"string"
]
},
"targeting_flag_filters": {
"property1": null,
"property2": null
},
"content": null,
"draft_content": null,
"has_draft": true,
"auto_launch": true,
"start_date": "2019-08-24T14:15:22Z",
"end_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": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"updated_at": "2019-08-24T14:15:22Z",
"archived": true
}
]
}

Create product tours

Required API key scopes

product_tour:write

Path parameters

  • project_id
    string

Request parameters

  • name
    string
  • description
    string
  • linked_flag_id
    integer
  • targeting_flag_filters
  • content
  • auto_launch
    boolean
  • start_date
    string
  • end_date
    string
  • archived
    boolean
  • creation_context
    Default: app

Response


Example request

POST /api/projects/:project_id/product_tours
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/product_tours/\
-d name="string"

Example response

Status 201
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"internal_targeting_flag": {
"id": 0,
"team_id": 0,
"name": "string",
"key": "string",
"filters": {
"property1": null,
"property2": null
},
"deleted": true,
"active": true,
"ensure_experience_continuity": true,
"has_encrypted_payloads": true,
"version": -2147483648,
"evaluation_runtime": "server",
"bucketing_identifier": "distinct_id",
"evaluation_tags": [
"string"
],
"evaluation_contexts": [
"string"
]
},
"linked_flag": {
"id": 0,
"team_id": 0,
"name": "string",
"key": "string",
"filters": {
"property1": null,
"property2": null
},
"deleted": true,
"active": true,
"ensure_experience_continuity": true,
"has_encrypted_payloads": true,
"version": -2147483648,
"evaluation_runtime": "server",
"bucketing_identifier": "distinct_id",
"evaluation_tags": [
"string"
],
"evaluation_contexts": [
"string"
]
},
"linked_flag_id": 0,
"targeting_flag_filters": null,
"content": null,
"auto_launch": true,
"start_date": "2019-08-24T14:15:22Z",
"end_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": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"updated_at": "2019-08-24T14:15:22Z",
"archived": true,
"creation_context": "app"
}

Retrieve product tours

Required API key scopes

product_tour:read

Path parameters

  • id
    string
  • project_id
    string

Response


Example request

GET /api/projects/:project_id/product_tours/: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/product_tours/:id/

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"internal_targeting_flag": {
"id": 0,
"team_id": 0,
"name": "string",
"key": "string",
"filters": {
"property1": null,
"property2": null
},
"deleted": true,
"active": true,
"ensure_experience_continuity": true,
"has_encrypted_payloads": true,
"version": -2147483648,
"evaluation_runtime": "server",
"bucketing_identifier": "distinct_id",
"evaluation_tags": [
"string"
],
"evaluation_contexts": [
"string"
]
},
"linked_flag": {
"id": 0,
"team_id": 0,
"name": "string",
"key": "string",
"filters": {
"property1": null,
"property2": null
},
"deleted": true,
"active": true,
"ensure_experience_continuity": true,
"has_encrypted_payloads": true,
"version": -2147483648,
"evaluation_runtime": "server",
"bucketing_identifier": "distinct_id",
"evaluation_tags": [
"string"
],
"evaluation_contexts": [
"string"
]
},
"targeting_flag_filters": {
"property1": null,
"property2": null
},
"content": null,
"draft_content": null,
"has_draft": true,
"auto_launch": true,
"start_date": "2019-08-24T14:15:22Z",
"end_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": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"updated_at": "2019-08-24T14:15:22Z",
"archived": true
}

Update product tours

Required API key scopes

product_tour:write

Path parameters

  • id
    string
  • project_id
    string

Request parameters

  • name
    string
  • description
    string
  • linked_flag_id
    integer
  • targeting_flag_filters
  • content
  • auto_launch
    boolean
  • start_date
    string
  • end_date
    string
  • archived
    boolean
  • creation_context
    Default: app

Response


Example request

PATCH /api/projects/:project_id/product_tours/: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/product_tours/:id/\
-d name="string"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"internal_targeting_flag": {
"id": 0,
"team_id": 0,
"name": "string",
"key": "string",
"filters": {
"property1": null,
"property2": null
},
"deleted": true,
"active": true,
"ensure_experience_continuity": true,
"has_encrypted_payloads": true,
"version": -2147483648,
"evaluation_runtime": "server",
"bucketing_identifier": "distinct_id",
"evaluation_tags": [
"string"
],
"evaluation_contexts": [
"string"
]
},
"linked_flag": {
"id": 0,
"team_id": 0,
"name": "string",
"key": "string",
"filters": {
"property1": null,
"property2": null
},
"deleted": true,
"active": true,
"ensure_experience_continuity": true,
"has_encrypted_payloads": true,
"version": -2147483648,
"evaluation_runtime": "server",
"bucketing_identifier": "distinct_id",
"evaluation_tags": [
"string"
],
"evaluation_contexts": [
"string"
]
},
"linked_flag_id": 0,
"targeting_flag_filters": null,
"content": null,
"auto_launch": true,
"start_date": "2019-08-24T14:15:22Z",
"end_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": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"updated_at": "2019-08-24T14:15:22Z",
"archived": true,
"creation_context": "app"
}

Delete product tours

Required API key scopes

product_tour:write

Path parameters

  • id
    string
  • project_id
    string

Example request

DELETE /api/projects/:project_id/product_tours/: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/product_tours/:id/

Example response

Status 204 No response body

Delete product tours discard draft

Discard draft content.

Required API key scopes

product_tour:write

Path parameters

  • id
    string
  • project_id
    string

Response


Example request

DELETE /api/projects/:project_id/product_tours/:id/discard_draft
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/product_tours/:id/discard_draft/

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"internal_targeting_flag": {
"id": 0,
"team_id": 0,
"name": "string",
"key": "string",
"filters": {
"property1": null,
"property2": null
},
"deleted": true,
"active": true,
"ensure_experience_continuity": true,
"has_encrypted_payloads": true,
"version": -2147483648,
"evaluation_runtime": "server",
"bucketing_identifier": "distinct_id",
"evaluation_tags": [
"string"
],
"evaluation_contexts": [
"string"
]
},
"linked_flag": {
"id": 0,
"team_id": 0,
"name": "string",
"key": "string",
"filters": {
"property1": null,
"property2": null
},
"deleted": true,
"active": true,
"ensure_experience_continuity": true,
"has_encrypted_payloads": true,
"version": -2147483648,
"evaluation_runtime": "server",
"bucketing_identifier": "distinct_id",
"evaluation_tags": [
"string"
],
"evaluation_contexts": [
"string"
]
},
"targeting_flag_filters": {
"property1": null,
"property2": null
},
"content": null,
"draft_content": null,
"has_draft": true,
"auto_launch": true,
"start_date": "2019-08-24T14:15:22Z",
"end_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": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"updated_at": "2019-08-24T14:15:22Z",
"archived": true
}

Update product tours draft

Save draft content (server-side merge). No side effects triggered.

Required API key scopes

product_tour:write

Path parameters

  • id
    string
  • project_id
    string

Request parameters

  • name
    string
  • description
    string
  • linked_flag_id
    integer
  • targeting_flag_filters
  • content
  • auto_launch
    boolean
  • start_date
    string
  • end_date
    string
  • archived
    boolean
  • creation_context
    Default: app

Response


Example request

PATCH /api/projects/:project_id/product_tours/:id/draft
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/product_tours/:id/draft/\
-d name="string"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"internal_targeting_flag": {
"id": 0,
"team_id": 0,
"name": "string",
"key": "string",
"filters": {
"property1": null,
"property2": null
},
"deleted": true,
"active": true,
"ensure_experience_continuity": true,
"has_encrypted_payloads": true,
"version": -2147483648,
"evaluation_runtime": "server",
"bucketing_identifier": "distinct_id",
"evaluation_tags": [
"string"
],
"evaluation_contexts": [
"string"
]
},
"linked_flag": {
"id": 0,
"team_id": 0,
"name": "string",
"key": "string",
"filters": {
"property1": null,
"property2": null
},
"deleted": true,
"active": true,
"ensure_experience_continuity": true,
"has_encrypted_payloads": true,
"version": -2147483648,
"evaluation_runtime": "server",
"bucketing_identifier": "distinct_id",
"evaluation_tags": [
"string"
],
"evaluation_contexts": [
"string"
]
},
"targeting_flag_filters": {
"property1": null,
"property2": null
},
"content": null,
"draft_content": null,
"has_draft": true,
"auto_launch": true,
"start_date": "2019-08-24T14:15:22Z",
"end_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": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"updated_at": "2019-08-24T14:15:22Z",
"archived": true
}

Retrieve product tours draft status

Lightweight polling endpoint for draft change detection.

Required API key scopes

product_tour:read

Path parameters

  • id
    string
  • project_id
    string

Response


Example request

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

Example response

Status 200
RESPONSE
{
"updated_at": "2019-08-24T14:15:22Z",
"has_draft": true
}

Create product tours generate

Generate tour step content using AI.

Required API key scopes

product_tour:write

Path parameters

  • id
    string
  • project_id
    string

Request parameters

  • title
    string
    Default:
  • goal
    string
    Default:
  • steps
    array

Response


Example request

POST /api/projects/:project_id/product_tours/:id/generate
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/product_tours/:id/generate/\
-d title="string"

Example response

Status 200
RESPONSE
{
"steps": [
{
"step_id": "string",
"title": "string",
"description": "string"
}
]
}

Create product tours publish draft

Commit draft to live tour. Runs full validation and triggers side effects.

Accepts an optional body payload. If provided, merges it into the draft before publishing so the caller can save + publish in a single request.

Required API key scopes

product_tour:write

Path parameters

  • id
    string
  • project_id
    string

Request parameters

  • name
    string
  • description
    string
  • linked_flag_id
    integer
  • targeting_flag_filters
  • content
  • auto_launch
    boolean
  • start_date
    string
  • end_date
    string
  • archived
    boolean
  • creation_context
    Default: app

Response


Example request

POST /api/projects/:project_id/product_tours/:id/publish_draft
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/product_tours/:id/publish_draft/\
-d name="string"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"internal_targeting_flag": {
"id": 0,
"team_id": 0,
"name": "string",
"key": "string",
"filters": {
"property1": null,
"property2": null
},
"deleted": true,
"active": true,
"ensure_experience_continuity": true,
"has_encrypted_payloads": true,
"version": -2147483648,
"evaluation_runtime": "server",
"bucketing_identifier": "distinct_id",
"evaluation_tags": [
"string"
],
"evaluation_contexts": [
"string"
]
},
"linked_flag": {
"id": 0,
"team_id": 0,
"name": "string",
"key": "string",
"filters": {
"property1": null,
"property2": null
},
"deleted": true,
"active": true,
"ensure_experience_continuity": true,
"has_encrypted_payloads": true,
"version": -2147483648,
"evaluation_runtime": "server",
"bucketing_identifier": "distinct_id",
"evaluation_tags": [
"string"
],
"evaluation_contexts": [
"string"
]
},
"targeting_flag_filters": {
"property1": null,
"property2": null
},
"content": null,
"draft_content": null,
"has_draft": true,
"auto_launch": true,
"start_date": "2019-08-24T14:15:22Z",
"end_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": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"updated_at": "2019-08-24T14:15:22Z",
"archived": true
}

Community questions

Questions about this page? or post a community question.