Posthog

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

Endpoints

POST
GET

Create posthog connections forward

Replay an API request against the connected PostHog project. The server injects the connection's token; the response is passed through.

Required API key scopes

integration:write

Path parameters

  • id
    string

Request parameters

  • method
  • path
    string
  • query
    object
  • data

Response


Example request

POST /api/projects/:project_id/posthog_connections/:id/forward
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/posthog_connections/:id/forward/\
-d method=undefined,\
-d path="string"

Example response

Status 200
RESPONSE
{
"status": 0,
"data": null
}

Retrieve posthog connections target

Resolve which project, organization and region a PostHog connection points at, so callers can build target API paths without reading api/users/@me/ through the connection first.

Required API key scopes

integration:read

Path parameters

  • id
    string

Response


Example request

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

Example response

Status 200
RESPONSE
{
"project_id": 0,
"project_name": "string",
"organization_id": "string",
"organization_name": "string",
"region": "string",
"base_url": "string"
}
Status 502
RESPONSE
{
"error": "string"
}