Integrations-4

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

Endpoints

GET
POST
GET
POST
POST
POST

Retrieve integrations authorize

Example request

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

Example response

Status 200 No response body

Create integrations domain connect apply url

Unified endpoint for generating Domain Connect apply URLs.

Accepts a context ("email" or "proxy") and the relevant resource ID. The backend resolves the domain, template variables, and service ID based on context, then builds the signed apply URL.

Request parameters

  • kind
  • config

Example request

POST /api/projects/:project_id/integrations/domain-connect/apply-url
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/integrations/domain-connect/apply-url/\
-d kind=undefined

Example response

Status 200 No response body

Retrieve integrations domain connect check

Example request

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

Example response

Status 200 No response body

Create integrations github link existing

Reuse a GitHub installation already linked to a sibling team in the same organization.

Required API key scopes

integration:write

Request parameters

  • kind
  • config

Example request

POST /api/projects/:project_id/integrations/github/link_existing
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/integrations/github/link_existing/\
-d kind=undefined

Example response

Status 200 No response body

Create integrations github oauth authorize

Mint a User OAuth URL to bootstrap a fresh code when the install flow returns without one.

Required API key scopes

integration:write

Request parameters

  • kind
  • config

Example request

POST /api/projects/:project_id/integrations/github/oauth_authorize
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/integrations/github/oauth_authorize/\
-d kind=undefined

Example response

Status 200 No response body

Create integrations request access

Notify project admins that a member is requesting an integration be connected.

Required API key scopes

integration:write

Request parameters

  • kind
  • reason
    string

Response


Example request

POST /api/projects/:project_id/integrations/request_access
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/integrations/request_access/\
-d kind=undefined,\
-d reason="string"

Example response

Status 200
RESPONSE
{
"success": true
}

Community questions

Questions about this page? or post a community question.