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-list— List 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:readQuery parameters
- limitinteger
- offsetinteger
- searchstring
Response
Example request
GET /api /projects /:project_id /user_interview_topicsExample response
Status 200
Create user interview topics
Also available via the PostHog MCP server:
user-interview-topics-create— Create 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:writeRequest parameters
- interviewee_emailsarray
- interviewee_distinct_idsarray
- topicstring
- agent_contextstring
- questionsarray
- invite_subjectstring
- invite_messagestring
Response
Example request
POST /api /projects /:project_id /user_interview_topicsExample response
Status 201
Retrieve user interview topics
Also available via the PostHog MCP server:
user-interview-topics-retrieve— Get 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:readPath parameters
- idstring
Response
Example request
GET /api /projects /:project_id /user_interview_topics /:idExample response
Status 200
Update user interview topics
Also available via the PostHog MCP server:
user-interview-topics-partial-update— Update 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:writePath parameters
- idstring
Request parameters
- interviewee_emailsarray
- interviewee_distinct_idsarray
- topicstring
- agent_contextstring
- questionsarray
- invite_subjectstring
- invite_messagestring
Response
Example request
PATCH /api /projects /:project_id /user_interview_topics /:idExample response
Status 200
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:writePath parameters
- idstring
Example request
DELETE /api /projects /:project_id /user_interview_topics /:idExample 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:writePath parameters
- idstring
Request parameters
- identifierstring
Response
Example request
POST /api /projects /:project_id /user_interview_topics /:id /add_intervieweeExample response
Status 200
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:writePath parameters
- idstring
Response
Example request
POST /api /projects /:project_id /user_interview_topics /:id /generate_linksExample response
Status 200
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:writePath parameters
- idstring
Example request
POST /api /projects /:project_id /user_interview_topics /:id /links_csvExample 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:readPath parameters
- idstring
Request parameters
- interviewee_identifierstring
Response
Example request
POST /api /projects /:project_id /user_interview_topics /:id /preview_inviteExample response
Status 200
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:writePath parameters
- idstring
Request parameters
- identifierstring
Response
Example request
POST /api /projects /:project_id /user_interview_topics /:id /remove_intervieweeExample response
Status 200
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:writePath parameters
- idstring
Request parameters
- subjectstring
- reply_tostring
- send_asyncbooleanDefault:
true
Response
Example request
POST /api /projects /:project_id /user_interview_topics /:id /send_invitesExample response
Status 200
Retrieve user interview topics test link
Return the calling user's personal dogfood interview link for this topic, plus the latest test interview they have recorded against it. Lazily get-or-creates a per-caller IntervieweeContext + enabled SharingConfiguration the first time it's called, then returns the same stable URL on subsequent calls. The caller's identifier is intentionally not added to the topic's targeting arrays — each user dogfoods under their own row, so test calls never mint a public share token on someone else's behalf.
Required API key scopes
user_interview:writePath parameters
- idstring
Response
Example request
GET /api /projects /:project_id /user_interview_topics /:id /test_linkExample response
Status 200
List all user interview topics interviewees
Also available via the PostHog MCP server:
user-interview-topics-interviewees-list— List 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:readPath parameters
- topic_idstring
Query parameters
- limitinteger
- offsetinteger
Response
Example request
GET /api /projects /:project_id /user_interview_topics /:topic_id /intervieweesExample response
Status 200
Create user interview topics interviewees
Also available via the PostHog MCP server:
user-interview-topics-interviewees-create— Add 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:writePath parameters
- topic_idstring
Request parameters
- interviewee_identifierstring
- agent_contextstring
Response
Example request
POST /api /projects /:project_id /user_interview_topics /:topic_id /intervieweesExample response
Status 201
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:readPath parameters
- idstring
- topic_idstring
Response
Example request
GET /api /projects /:project_id /user_interview_topics /:topic_id /interviewees /:idExample response
Status 200
Update user interview topics interviewees
Also available via the PostHog MCP server:
user-interview-topics-interviewees-partial-update— Update 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:writePath parameters
- idstring
- topic_idstring
Request parameters
- interviewee_identifierstring
- agent_contextstring
Response
Example request
PATCH /api /projects /:project_id /user_interview_topics /:topic_id /interviewees /:idExample response
Status 200
Delete user interview topics interviewees
Also available via the PostHog MCP server:
user-interview-topics-interviewees-destroy— Delete 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:writePath parameters
- idstring
- topic_idstring
Example request
DELETE /api /projects /:project_id /user_interview_topics /:topic_id /interviewees /:idExample 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:writePath parameters
- topic_idstring
Request parameters
- itemsarray
Response
Example request
POST /api /projects /:project_id /user_interview_topics /:topic_id /interviewees /bulk