Integrations-4

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

Endpoints

DELETE
PATCH
GET
POST
DELETE
GET
GET
POST
GET
DELETE
GET
GET
GET

Delete org organization integrations

ViewSet for organization-level integrations.

Provides access to integrations that are scoped to the entire organization (vs. project-level integrations). Examples include Vercel, AWS Marketplace, etc.

Creation is handled by the integration installation flows (e.g., Vercel marketplace installation). Users can disconnect integrations via the DELETE endpoint.

Required API key scopes

organization_integration:write

Path parameters

  • id
    string

Example request

DELETE /api/organizations/:organization_id/integrations/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X DELETE \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/organizations/:organization_id/integrations/:id/

Example response

Status 204 No response body

Update integrations environment mapping

ViewSet for organization-level integrations.

Provides access to integrations that are scoped to the entire organization (vs. project-level integrations). Examples include Vercel, AWS Marketplace, etc.

Creation is handled by the integration installation flows (e.g., Vercel marketplace installation). Users can disconnect integrations via the DELETE endpoint.

Path parameters

  • id
    string

Request parameters


    Response


    Example request

    PATCH /api/organizations/:organization_id/integrations/:id/environment-mapping
    export POSTHOG_PERSONAL_API_KEY=[your personal api key]
    curl -X PATCH \
    -H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
    <ph_app_host>/api/organizations/:organization_id/integrations/:id/environment-mapping/\
    -d kind=undefined

    Example response

    Status 200
    RESPONSE
    {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "kind": "vercel",
    "integration_id": "string",
    "config": null,
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "created_by": {
    "id": 0,
    "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
    "distinct_id": "string",
    "first_name": "string",
    "last_name": "string",
    "email": "user@example.com",
    "is_email_verified": true,
    "hedgehog_config": {},
    "role_at_organization": "engineering"
    }
    }

    List all role external references

    Required API key scopes

    organization:read

    Query parameters

    • limit
      integer
    • offset
      integer

    Response


    Example request

    GET /api/organizations/:organization_id/role_external_references
    export POSTHOG_PERSONAL_API_KEY=[your personal api key]
    curl \
    -H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
    <ph_app_host>/api/organizations/:organization_id/role_external_references/

    Example response

    Status 200
    RESPONSE
    {
    "count": 123,
    "next": "http://api.example.org/accounts/?offset=400&limit=100",
    "previous": "http://api.example.org/accounts/?offset=200&limit=100",
    "results": [
    {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "provider": "string",
    "provider_organization_id": "string",
    "provider_role_id": "string",
    "provider_role_slug": "string",
    "provider_role_name": "string",
    "role": "543e2fa5-dae3-497f-aa96-e06da8fcb379",
    "created_at": "2019-08-24T14:15:22Z",
    "created_by": {
    "id": 0,
    "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
    "distinct_id": "string",
    "first_name": "string",
    "last_name": "string",
    "email": "user@example.com",
    "is_email_verified": true,
    "hedgehog_config": {},
    "role_at_organization": "engineering"
    }
    }
    ]
    }

    Create role external references

    Required API key scopes

    organization:write

    Request parameters

    • provider
      string
    • provider_organization_id
      string
    • provider_role_id
      string
    • provider_role_slug
      stringnull
    • provider_role_name
      string
    • role
      string

    Response


    Example request

    POST /api/organizations/:organization_id/role_external_references
    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/organizations/:organization_id/role_external_references/\
    -d provider="string",\
    -d provider_organization_id="string",\
    -d provider_role_id="string",\
    -d provider_role_name="string",\
    -d role="string"

    Example response

    Status 201
    RESPONSE
    {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "provider": "string",
    "provider_organization_id": "string",
    "provider_role_id": "string",
    "provider_role_slug": "string",
    "provider_role_name": "string",
    "role": "543e2fa5-dae3-497f-aa96-e06da8fcb379",
    "created_at": "2019-08-24T14:15:22Z",
    "created_by": {
    "id": 0,
    "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
    "distinct_id": "string",
    "first_name": "string",
    "last_name": "string",
    "email": "user@example.com",
    "is_email_verified": true,
    "hedgehog_config": {},
    "role_at_organization": "engineering"
    }
    }

    Delete role external references

    Required API key scopes

    organization:write

    Path parameters

    • id
      string

    Example request

    DELETE /api/organizations/:organization_id/role_external_references/:id
    export POSTHOG_PERSONAL_API_KEY=[your personal api key]
    curl -X DELETE \
    -H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
    <ph_app_host>/api/organizations/:organization_id/role_external_references/:id/

    Example response

    Status 204 No response body

    Retrieve role external references lookup

    Query parameters

    • provider
      string
    • provider_organization_id
      string
    • provider_role_id
      string
    • provider_role_slug
      string

    Response


    Example request

    GET /api/organizations/:organization_id/role_external_references/lookup
    export POSTHOG_PERSONAL_API_KEY=[your personal api key]
    curl \
    -H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
    <ph_app_host>/api/organizations/:organization_id/role_external_references/lookup/

    Example response

    Status 200
    RESPONSE
    {
    "reference": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "provider": "string",
    "provider_organization_id": "string",
    "provider_role_id": "string",
    "provider_role_slug": "string",
    "provider_role_name": "string",
    "role": "543e2fa5-dae3-497f-aa96-e06da8fcb379",
    "created_at": "2019-08-24T14:15:22Z",
    "created_by": {
    "id": 0,
    "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
    "distinct_id": "string",
    "first_name": "string",
    "last_name": "string",
    "email": "user@example.com",
    "is_email_verified": true,
    "hedgehog_config": {},
    "role_at_organization": "engineering"
    }
    }
    }

    List all integrations

    Also available via the PostHog MCP server:

    • integrations-listList integrations

    Required API key scopes

    integration:read

    Query parameters

    • kind
      string
      One of: "anthropic""apns""azure-blob""bing-ads""clickup""customerio-app""customerio-track""customerio-webhook""databricks""email""firebase""github""gitlab""google-ads""google-cloud-service-account""google-cloud-storage""google-pubsub""google-sheets""hubspot""intercom""jira""linear""linkedin-ads""meta-ads""pinterest-ads""postgresql""reddit-ads""salesforce""slack""slack-posthog-code""snapchat""stripe""tiktok-ads""twilio""vercel"
    • limit
      integer
    • offset
      integer

    Response


    Example request

    GET /api/projects/:project_id/integrations
    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/

    Example response

    Status 200
    RESPONSE
    {
    "count": 123,
    "next": "http://api.example.org/accounts/?offset=400&limit=100",
    "previous": "http://api.example.org/accounts/?offset=200&limit=100",
    "results": [
    {
    "id": 0,
    "kind": "anthropic",
    "config": null,
    "created_at": "2019-08-24T14:15:22Z",
    "created_by": {
    "id": 0,
    "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
    "distinct_id": "string",
    "first_name": "string",
    "last_name": "string",
    "email": "user@example.com",
    "is_email_verified": true,
    "hedgehog_config": {},
    "role_at_organization": "engineering"
    },
    "errors": "string",
    "display_name": "string"
    }
    ]
    }

    List all integrations

    Also available via the PostHog MCP server:

    • integrations-listList integrations

    Required API key scopes

    integration:read

    Query parameters

    • kind
      string
      One of: "anthropic""apns""azure-blob""bing-ads""clickup""customerio-app""customerio-track""customerio-webhook""databricks""email""firebase""github""gitlab""google-ads""google-cloud-service-account""google-cloud-storage""google-pubsub""google-sheets""hubspot""intercom""jira""linear""linkedin-ads""meta-ads""pinterest-ads""postgresql""reddit-ads""salesforce""slack""slack-posthog-code""snapchat""stripe""tiktok-ads""twilio""vercel"
    • limit
      integer
    • offset
      integer

    Response


    Example request

    GET /api/projects/:project_id/integrations
    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/

    Example response

    Status 200
    RESPONSE
    {
    "count": 123,
    "next": "http://api.example.org/accounts/?offset=400&limit=100",
    "previous": "http://api.example.org/accounts/?offset=200&limit=100",
    "results": [
    {
    "id": 0,
    "kind": "anthropic",
    "config": null,
    "created_at": "2019-08-24T14:15:22Z",
    "created_by": {
    "id": 0,
    "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
    "distinct_id": "string",
    "first_name": "string",
    "last_name": "string",
    "email": "user@example.com",
    "is_email_verified": true,
    "hedgehog_config": {},
    "role_at_organization": "engineering"
    },
    "errors": "string",
    "display_name": "string"
    }
    ]
    }

    Create integrations

    Required API key scopes

    integration:write

    Request parameters

    • kind
    • config

    Response


    Example request

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

    Example response

    Status 201
    RESPONSE
    {
    "id": 0,
    "kind": "anthropic",
    "config": null,
    "created_at": "2019-08-24T14:15:22Z",
    "created_by": {
    "id": 0,
    "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
    "distinct_id": "string",
    "first_name": "string",
    "last_name": "string",
    "email": "user@example.com",
    "is_email_verified": true,
    "hedgehog_config": {},
    "role_at_organization": "engineering"
    },
    "errors": "string",
    "display_name": "string"
    }

    Create integrations

    Required API key scopes

    integration:write

    Request parameters

    • kind
    • config

    Response


    Example request

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

    Example response

    Status 201
    RESPONSE
    {
    "id": 0,
    "kind": "anthropic",
    "config": null,
    "created_at": "2019-08-24T14:15:22Z",
    "created_by": {
    "id": 0,
    "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
    "distinct_id": "string",
    "first_name": "string",
    "last_name": "string",
    "email": "user@example.com",
    "is_email_verified": true,
    "hedgehog_config": {},
    "role_at_organization": "engineering"
    },
    "errors": "string",
    "display_name": "string"
    }

    Retrieve integrations

    Required API key scopes

    integration:read

    Path parameters

    • id
      integer

    Response


    Example request

    GET /api/projects/:project_id/integrations/:id
    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/:id/

    Example response

    Status 200
    RESPONSE
    {
    "id": 0,
    "kind": "anthropic",
    "config": null,
    "created_at": "2019-08-24T14:15:22Z",
    "created_by": {
    "id": 0,
    "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
    "distinct_id": "string",
    "first_name": "string",
    "last_name": "string",
    "email": "user@example.com",
    "is_email_verified": true,
    "hedgehog_config": {},
    "role_at_organization": "engineering"
    },
    "errors": "string",
    "display_name": "string"
    }

    Retrieve integrations

    Required API key scopes

    integration:read

    Path parameters

    • id
      integer

    Response


    Example request

    GET /api/projects/:project_id/integrations/:id
    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/:id/

    Example response

    Status 200
    RESPONSE
    {
    "id": 0,
    "kind": "anthropic",
    "config": null,
    "created_at": "2019-08-24T14:15:22Z",
    "created_by": {
    "id": 0,
    "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
    "distinct_id": "string",
    "first_name": "string",
    "last_name": "string",
    "email": "user@example.com",
    "is_email_verified": true,
    "hedgehog_config": {},
    "role_at_organization": "engineering"
    },
    "errors": "string",
    "display_name": "string"
    }

    Delete integrations

    Required API key scopes

    integration:write

    Path parameters

    • id
      integer

    Example request

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

    Example response

    Status 204 No response body

    Delete integrations

    Required API key scopes

    integration:write

    Path parameters

    • id
      integer

    Example request

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

    Example response

    Status 204 No response body

    Retrieve integrations anthropic managed agent envs

    Required API key scopes

    integration:read

    Path parameters

    • id
      integer

    Example request

    GET /api/projects/:project_id/integrations/:id/anthropic_managed_agent_environments
    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/:id/anthropic_managed_agent_environments/

    Example response

    Status 200 No response body

    Retrieve integrations anthropic managed agent envs

    Required API key scopes

    integration:read

    Path parameters

    • id
      integer

    Example request

    GET /api/projects/:project_id/integrations/:id/anthropic_managed_agent_environments
    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/:id/anthropic_managed_agent_environments/

    Example response

    Status 200 No response body

    Retrieve integrations anthropic managed agent vaults

    Required API key scopes

    integration:read

    Path parameters

    • id
      integer

    Example request

    GET /api/projects/:project_id/integrations/:id/anthropic_managed_agent_vaults
    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/:id/anthropic_managed_agent_vaults/

    Example response

    Status 200 No response body

    Retrieve integrations anthropic managed agent vaults

    Required API key scopes

    integration:read

    Path parameters

    • id
      integer

    Example request

    GET /api/projects/:project_id/integrations/:id/anthropic_managed_agent_vaults
    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/:id/anthropic_managed_agent_vaults/

    Example response

    Status 200 No response body

    Retrieve integrations anthropic managed agents

    Required API key scopes

    integration:read

    Path parameters

    • id
      integer

    Example request

    GET /api/projects/:project_id/integrations/:id/anthropic_managed_agents
    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/:id/anthropic_managed_agents/

    Example response

    Status 200 No response body

    Retrieve integrations anthropic managed agents

    Required API key scopes

    integration:read

    Path parameters

    • id
      integer

    Example request

    GET /api/projects/:project_id/integrations/:id/anthropic_managed_agents
    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/:id/anthropic_managed_agents/

    Example response

    Status 200 No response body

    Community questions

    Questions about this page? or post a community question.