provider agent_platformagent_applications POST /api/projects/{project_id}/agent_applications/{id}/preview-proxy/{rest}/
@utdk/posthog /api/projects/{project_id}/agent_applications/{id}/preview-proxy/{rest}/
agent_applications_preview_proxy
Authoring-side proxy for invoking a *draft* (or any non-live) revision. Closes the anonymous-draft-invoke gap: the public ingress URL refuses non-live invokes that don't carry the `x-agent-preview-secret` header; this proxy attaches it after authenticating the Django caller. URL: `/api/projects/<team>/agent_applications/<app>/preview-proxy/<rest>` Auth: standard PAT / session — `agents:write` scope (POST run/send/cancel is a mutating invoke; the read-only `listen` GET is `agents:read`).
format query
enum: json, sse
id path required
A UUID string identifying this agent application.
string
project_id path required
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
string
rest path required
Ingress sub-path under the agent slug. One of: `run`, `send`, `cancel`, `listen`.
string
revision_id query required
Target draft revision. Must belong to this application and not be live.
string

Try it

Authentication
Configure credentials for PostHog API
agentApplicationsPreviewProxy
POST/api/projects/{project_id}/agent_applications/{id}/preview-proxy/{rest}/
Authoring-side proxy for invoking a *draft* (or any non-live) revision. Closes the anonymous-draft-invoke gap: the public ingress URL refuses non-live invokes that don't carry the `x-agent-preview-secret` header; this proxy attaches it after authenticating the Django caller. URL: `/api/projects/<team>/agent_applications/<app>/preview-proxy/<rest>` Auth: standard PAT / session — `agents:write` scope (POST run/send/cancel is a mutating invoke; the read-only `listen` GET is `agents:read`).

Parameters

required

A UUID string identifying this agent application.

required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

required

Ingress sub-path under the agent slug. One of: `run`, `send`, `cancel`, `listen`.

required

Target draft revision. Must belong to this application and not be live.

Input

User message to deliver to the agent. Required for `run` (starts the session) and `send` (appends to it); ignored for `cancel` / `listen`.

Target session id for `send` — the running session to append the message to. Omit for `run` (a fresh session is created).

Configure credentials above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import posthog from '@utdk/posthog';

await posthog.agentApplicationsPreviewProxy()