User Interview

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

Endpoints

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

List all user interview topics

Also available via the PostHog MCP server:

  • user-interview-topics-listList user interview topics

Planned user interview topics: who we want to target and what we want to ask about.

Required API key scopes

user_interview:read

Query parameters

  • limit
    integer
  • offset
    integer
  • search
    string

Response


Example request

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

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",
"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"
},
"created_at": "2019-08-24T14:15:22Z",
"interviewee_emails": [
"string"
],
"interviewee_distinct_ids": [
"string"
],
"topic": "string",
"agent_context": "string",
"questions": [
"string"
],
"invite_subject": "string",
"invite_message": "string"
}
]
}

Create user interview topics

Also available via the PostHog MCP server:

  • user-interview-topics-createCreate user interview topic

Planned user interview topics: who we want to target and what we want to ask about.

Required API key scopes

user_interview:write

Request parameters

  • interviewee_emails
    array
  • interviewee_distinct_ids
    array
  • topic
    string
  • agent_context
    string
  • questions
    array
  • invite_subject
    string
  • invite_message
    string

Response


Example request

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

Example response

Status 201
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"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"
},
"created_at": "2019-08-24T14:15:22Z",
"interviewee_emails": [
"string"
],
"interviewee_distinct_ids": [
"string"
],
"topic": "string",
"agent_context": "string",
"questions": [
"string"
],
"invite_subject": "string",
"invite_message": "string"
}

Retrieve user interview topics

Also available via the PostHog MCP server:

  • user-interview-topics-retrieveGet user interview topic

Planned user interview topics: who we want to target and what we want to ask about.

Required API key scopes

user_interview:read

Path parameters

  • id
    string

Response


Example request

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

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"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"
},
"created_at": "2019-08-24T14:15:22Z",
"interviewee_emails": [
"string"
],
"interviewee_distinct_ids": [
"string"
],
"topic": "string",
"agent_context": "string",
"questions": [
"string"
],
"invite_subject": "string",
"invite_message": "string"
}

Update user interview topics

Also available via the PostHog MCP server:

  • user-interview-topics-partial-updateUpdate a user interview topic

Planned user interview topics: who we want to target and what we want to ask about.

Required API key scopes

user_interview:write

Path parameters

  • id
    string

Request parameters

  • interviewee_emails
    array
  • interviewee_distinct_ids
    array
  • topic
    string
  • agent_context
    string
  • questions
    array
  • invite_subject
    string
  • invite_message
    string

Response


Example request

PATCH /api/projects/:project_id/user_interview_topics/: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/user_interview_topics/:id/\
-d created_by=undefined

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"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"
},
"created_at": "2019-08-24T14:15:22Z",
"interviewee_emails": [
"string"
],
"interviewee_distinct_ids": [
"string"
],
"topic": "string",
"agent_context": "string",
"questions": [
"string"
],
"invite_subject": "string",
"invite_message": "string"
}

Delete user interview topics

Planned user interview topics: who we want to target and what we want to ask about.

Required API key scopes

user_interview:write

Path parameters

  • id
    string

Example request

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

Example response

Status 204 No response body

Create user interview topics add interviewee

Add a single interviewee to this topic. Email-shaped identifiers (including the Display Name <email@host> form) are appended to interviewee_emails; everything else is appended to interviewee_distinct_ids. Idempotent — adding an identifier that's already present leaves the topic unchanged. Returns the updated topic.

Required API key scopes

user_interview:write

Path parameters

  • id
    string

Request parameters

  • identifier
    string

Response


Example request

POST /api/projects/:project_id/user_interview_topics/:id/add_interviewee
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/user_interview_topics/:id/add_interviewee/\
-d identifier="string"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"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"
},
"created_at": "2019-08-24T14:15:22Z",
"interviewee_emails": [
"string"
],
"interviewee_distinct_ids": [
"string"
],
"topic": "string",
"agent_context": "string",
"questions": [
"string"
],
"invite_subject": "string",
"invite_message": "string"
}

Create user interview topics generate links

Generate one public interview link per targeted interviewee. Materializes an IntervieweeContext row for every identifier on the topic (without overwriting existing per-person context), and an enabled SharingConfiguration with a unique access token. The URL resolves to the public interview viewer with no PostHog auth required.

Required API key scopes

user_interview:write

Path parameters

  • id
    string

Response


Example request

POST /api/projects/:project_id/user_interview_topics/:id/generate_links
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/user_interview_topics/:id/generate_links/

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": [
{
"interviewee_identifier": "string",
"user_name": "string",
"interview_url": "http://example.com",
"agent_context": "string"
}
]
}

Create user interview topics links csv

Same materialization as generate_links, returned as a downloadable CSV. Intended for users who want to mail-merge the per-person interview links into their own email tooling.

Required API key scopes

user_interview:write

Path parameters

  • id
    string

Example request

POST /api/projects/:project_id/user_interview_topics/:id/links_csv
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/user_interview_topics/:id/links_csv/

Example response

Status 200 CSV with columns: interviewee_identifier, interviewee_email, user_name, interview_url. One row per targeted interviewee.

Create user interview topics preview invite

Render the invite email exactly as a specific targeted interviewee would receive it — personalized subject and body — without sending anything and without creating or reading any share links. Pass interviewee_identifier to preview for a particular person, or omit it to preview for the first targeted interviewee. The body always shows an illustrative placeholder link (is_preview_link: true), never a live interview URL.

Required API key scopes

user_interview:read

Path parameters

  • id
    string

Request parameters

  • interviewee_identifier
    string

Response


Example request

POST /api/projects/:project_id/user_interview_topics/:id/preview_invite
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/user_interview_topics/:id/preview_invite/\
-d interviewee_identifier="string"

Example response

Status 200
RESPONSE
{
"interviewee_identifier": "string",
"user_name": "string",
"email": "user@example.com",
"subject": "string",
"html": "string",
"interview_url": "http://example.com",
"emailable": true,
"is_preview_link": true
}

Create user interview topics remove interviewee

Remove an interviewee from this topic. Drops the identifier from both interviewee_emails and interviewee_distinct_ids, and disables any active SharingConfiguration linked to an IntervieweeContext for that identifier on this topic so the removed person can no longer open their interview link. Idempotent — removing an identifier that isn't present is a no-op. Returns the updated topic.

Required API key scopes

user_interview:write

Path parameters

  • id
    string

Request parameters

  • identifier
    string

Response


Example request

POST /api/projects/:project_id/user_interview_topics/:id/remove_interviewee
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/user_interview_topics/:id/remove_interviewee/\
-d identifier="string"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"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"
},
"created_at": "2019-08-24T14:15:22Z",
"interviewee_emails": [
"string"
],
"interviewee_distinct_ids": [
"string"
],
"topic": "string",
"agent_context": "string",
"questions": [
"string"
],
"invite_subject": "string",
"invite_message": "string"
}

Create user interview topics send invites

Generate (if needed) and email a personalized public interview link to every targeted interviewee on this topic whose identifier is an email address. Distinct-ID-only interviewees are skipped and surfaced in the response. Each invite is keyed on the underlying SharingConfiguration so re-runs after token rotation produce a fresh send.

Required API key scopes

user_interview:write

Path parameters

  • id
    string

Request parameters

  • subject
    string
  • reply_to
    string
  • send_async
    boolean
    Default: true

Response


Example request

POST /api/projects/:project_id/user_interview_topics/:id/send_invites
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/user_interview_topics/:id/send_invites/\
-d subject="string"

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": [
{
"interviewee_identifier": "string",
"email": "user@example.com",
"interview_url": "http://example.com",
"sent": true,
"reason": "string"
}
]
}


List all user interview topics interviewees

Also available via the PostHog MCP server:

  • user-interview-topics-interviewees-listList per-interviewee contexts for a topic

Per-interviewee extra context for a user interview topic. At most one row per (topic, interviewee_identifier).

Required API key scopes

user_interview:read

Path parameters

  • topic_id
    string

Query parameters

  • limit
    integer
  • offset
    integer

Response


Example request

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

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",
"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"
},
"created_at": "2019-08-24T14:15:22Z",
"interviewee_identifier": "string",
"agent_context": "string"
}
]
}

Create user interview topics interviewees

Also available via the PostHog MCP server:

  • user-interview-topics-interviewees-createAdd per-interviewee context to a topic

Per-interviewee extra context for a user interview topic. At most one row per (topic, interviewee_identifier).

Required API key scopes

user_interview:write

Path parameters

  • topic_id
    string

Request parameters

  • interviewee_identifier
    string
  • agent_context
    string

Response


Example request

POST /api/projects/:project_id/user_interview_topics/:topic_id/interviewees
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/user_interview_topics/:topic_id/interviewees/\
-d interviewee_identifier="string",\
-d agent_context="string"

Example response

Status 201
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"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"
},
"created_at": "2019-08-24T14:15:22Z",
"interviewee_identifier": "string",
"agent_context": "string"
}

Retrieve user interview topics interviewees

Per-interviewee extra context for a user interview topic. At most one row per (topic, interviewee_identifier).

Required API key scopes

user_interview:read

Path parameters

  • id
    string
  • topic_id
    string

Response


Example request

GET /api/projects/:project_id/user_interview_topics/:topic_id/interviewees/: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/user_interview_topics/:topic_id/interviewees/:id/

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"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"
},
"created_at": "2019-08-24T14:15:22Z",
"interviewee_identifier": "string",
"agent_context": "string"
}

Update user interview topics interviewees

Also available via the PostHog MCP server:

  • user-interview-topics-interviewees-partial-updateUpdate a per-interviewee context row

Per-interviewee extra context for a user interview topic. At most one row per (topic, interviewee_identifier).

Required API key scopes

user_interview:write

Path parameters

  • id
    string
  • topic_id
    string

Request parameters

  • interviewee_identifier
    string
  • agent_context
    string

Response


Example request

PATCH /api/projects/:project_id/user_interview_topics/:topic_id/interviewees/: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/user_interview_topics/:topic_id/interviewees/:id/\
-d created_by=undefined

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"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"
},
"created_at": "2019-08-24T14:15:22Z",
"interviewee_identifier": "string",
"agent_context": "string"
}

Delete user interview topics interviewees

Also available via the PostHog MCP server:

  • user-interview-topics-interviewees-destroyDelete a per-interviewee context row

Per-interviewee extra context for a user interview topic. At most one row per (topic, interviewee_identifier).

Required API key scopes

user_interview:write

Path parameters

  • id
    string
  • topic_id
    string

Example request

DELETE /api/projects/:project_id/user_interview_topics/:topic_id/interviewees/: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/user_interview_topics/:topic_id/interviewees/:id/

Example response

Status 204 No response body

Create user interview topics interviewees bulk

Create up to 500 interviewee context rows for a topic in a single request. Rows whose (topic, interviewee_identifier) already exists are skipped — the response surfaces an inserted_count, a skipped_count, and the skipped_identifiers so the caller can reconcile. Items must have unique interviewee_identifier values within the batch.

Required API key scopes

user_interview:write

Path parameters

  • topic_id
    string

Request parameters

  • items
    Click to open
    array

Response


Example request

POST /api/projects/:project_id/user_interview_topics/:topic_id/interviewees/bulk
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/user_interview_topics/:topic_id/interviewees/bulk/\
-d items="array"

Example response

Status 200
RESPONSE
{
"inserted_count": 0,
"skipped_count": 0,
"skipped_identifiers": [
"string"
]
}

Community questions

Questions about this page? or post a community question.