Conversations-2
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
POST | |
PATCH | |
POST | |
GET | |
POST | |
PATCH | |
DELETE | |
POST | |
GET | |
POST | |
GET | |
PATCH | |
DELETE | |
GET | |
POST | |
POST | |
POST | |
POST | |
GET |
Create conversations append message
Appends a message to an existing conversation without triggering AI processing. This is used for client-side generated messages that need to be persisted (e.g., support ticket confirmation messages).
Path parameters
- conversationstring
Request parameters
- contentstring
Response
Example request
POST /api /projects /:project_id /conversations /:conversation /append_messageExample response
Status 200
Update conversations cancel
Cancel the conversation's in-progress LangGraph run.
Path parameters
- conversationstring
Request parameters
Example request
PATCH /api /projects /:project_id /conversations /:conversation /cancelExample response
Status 204 Cancellation accepted, or already cancelling.
Status 422 Failed to cancel the conversation.
Create conversations open
Create-or-resume a sandbox conversation — the single sandbox session opener. With content, processes the turn (first message, in-progress follow-up, or terminal resume); without content, warms a sandbox that idles awaiting the first message. Returns the (task, run) handle the frontend opens SSE against. The conversation row is created on first use from the URL id.
Path parameters
- conversationstring
Request parameters
- contentstringnull
- trace_idstring
- attached_contextarray
- initial_permission_mode
- task_idstring
Response
Example request
POST /api /projects /:project_id /conversations /:conversation /openExample response
Status 200
Status 204 Warm request that provisioned nothing (pool full / released).
Status 400 Conversation is not on the sandbox runtime.
Retrieve conversations queue
Path parameters
- conversationstring
Response
Example request
GET /api /projects /:project_id /conversations /:conversation /queueExample response
Status 200
Create conversations queue
Path parameters
- conversationstring
Request parameters
Response
Example request
POST /api /projects /:project_id /conversations /:conversation /queueExample response
Status 200
Update conversations queue
Path parameters
- conversationstring
- queue_idstring
Request parameters
Response
Example request
PATCH /api /projects /:project_id /conversations /:conversation /queue /:queue_idExample response
Status 200
Delete conversations queue
Path parameters
- conversationstring
- queue_idstring
Example request
DELETE /api /projects /:project_id /conversations /:conversation /queue /:queue_idExample response
Status 204 No response body
Create conversations queue clear
Path parameters
- conversationstring
Request parameters
Response
Example request
POST /api /projects /:project_id /conversations /:conversation /queue /clearExample response
Status 200
List all conversations tickets
Also available via the PostHog MCP server:
conversations-tickets-list— List support tickets
List tickets with person data attached.
Required API key scopes
ticket:readQuery parameters
- assigneestring
- channel_detailstringOne of:
"github_issue""slack_bot_mention""slack_channel_message""slack_emoji_reaction""teams_bot_mention""teams_channel_message""widget_api""widget_embedded" - channel_sourcestringOne of:
"email""github""slack""teams""widget" - date_fromstring
- date_tostring
- distinct_idsstring
- limitinteger
- offsetinteger
- order_bystringOne of:
"-created_at""-sla_due_at""-ticket_number""-updated_at""created_at""sla_due_at""ticket_number""updated_at" - prioritystring
- searchstring
- slastringOne of:
"at-risk""breached""on-track" - statusstring
- tagsstring
- tags_allstring
- tags_excludestring
Response
Example request
GET /api /projects /:project_id /conversations /ticketsExample response
Status 200
Create conversations tickets
Required API key scopes
ticket:writeRequest parameters
- status
- priority
- anonymous_traits
- ai_resolvedboolean
- escalation_reasonstringnull
- sla_due_atstringnull
- snoozed_untilstringnull
- tagsarray
Response
Example request
POST /api /projects /:project_id /conversations /ticketsExample response
Status 201
Retrieve conversations tickets
Also available via the PostHog MCP server:
conversations-tickets-retrieve— Get support ticket
Get single ticket and mark as read by team.
Required API key scopes
ticket:readPath parameters
- idstring
Response
Example request
GET /api /projects /:project_id /conversations /tickets /:idExample response
Status 200
Update conversations tickets
Required API key scopes
ticket:writePath parameters
- idstring
Request parameters
- status
- priority
- anonymous_traits
- ai_resolvedboolean
- escalation_reasonstringnull
- sla_due_atstringnull
- snoozed_untilstringnull
- tagsarray
Response
Example request
PATCH /api /projects /:project_id /conversations /tickets /:idExample response
Status 200
Delete conversations tickets
Path parameters
- idstring
Example request
DELETE /api /projects /:project_id /conversations /tickets /:idExample response
Status 204 No response body
List all conversations tickets messages
Return the message thread for a ticket, ordered chronologically (paginated).
Required API key scopes
ticket:readPath parameters
- idstring
Query parameters
- limitinteger
- offsetinteger
Response
Example request
GET /api /projects /:project_id /conversations /tickets /:id /messagesExample response
Status 200
Create conversations tickets reply
Post a reply or internal note to a ticket.
With is_private=false, the reply is delivered to the customer via the ticket's channel (email, Slack, Teams, GitHub). With is_private=true, the message is stored as an internal note only visible to team members.
Required API key scopes
ticket:writePath parameters
- idstring
Request parameters
- messagestring
- is_privatebooleanDefault:
false - rich_content
Response
Example request
POST /api /projects /:project_id /conversations /tickets /:id /replyExample response
Status 201
Create conversations tickets bulk update status
Update the status of multiple tickets in a single request.
Only tickets belonging to the current team are affected; other-team UUIDs are silently ignored. Tickets already in the requested status are skipped.
Request parameters
- idsarray
- status
Response
Example request
POST /api /projects /:project_id /conversations /tickets /bulk_update_statusExample response
Status 200
Create conversations tickets bulk update tags
Bulk update tags on multiple objects.
PAT access: this action has no required_scopes= on the decorator —
inheriting viewsets must add "bulk_update_tags" to their
scope_object_write_actions list to accept personal API keys.
Without that opt-in, APIScopePermission rejects PAT requests with
"This action does not support personal API key access". Done per-viewset
so granting <scope>:write for one resource doesn't leak access to
sibling resources that share this mixin.
Accepts:
- {"ids": [...], "action": "add"|"remove"|"set", "tags": ["tag1", "tag2"]}
Actions:
- "add": Add tags to existing tags on each object
- "remove": Remove specific tags from each object
- "set": Replace all tags on each object with the provided list
Request parameters
- idsarray
- action
- tagsarray
Response
Example request
POST /api /projects /:project_id /conversations /tickets /bulk_update_tagsExample response
Status 200
Create conversations tickets compose
Create a new outbound ticket and send the first message to the customer.
Required API key scopes
ticket:writeRequest parameters
- recipient_emailstring
- recipient_distinct_idstring
- email_subjectstring
- email_config_idstring
- messagestring
- rich_content
Response
Example request
POST /api /projects /:project_id /conversations /tickets /composeExample response
Status 201
Status 400
Retrieve conversations tickets unread count
Get total unread ticket count for the team.
Returns the sum of unread_team_count for all non-resolved tickets. Cached in Redis for 30 seconds, invalidated on changes.
Required API key scopes
ticket:readResponse
Example request
GET /api /projects /:project_id /conversations /tickets /unread_count