Organizations

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

Endpoints

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

Create cross project dashboards tiles

Tiles on one cross-project dashboard, edited one at a time.

Writes are per tile rather than a whole-set replace, so two people editing the same dashboard cannot overwrite each other's tiles.

Required API key scopes

cross_project_dashboard:write

Path parameters

  • dashboard_id
    string

Request parameters

  • project_id
    integer
  • insight_id
    integer
  • layouts
  • color
    string | null
  • filters_overrides

Response


Example request

POST /api/organizations/:organization_id/cross_project_dashboards/:dashboard_id/tiles
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/cross_project_dashboards/:dashboard_id/tiles/\
-d project_id="integer",\
-d insight_id="integer"

Example response

Status 201
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"project_id": 0,
"insight_id": 0,
"layouts": null,
"color": "string",
"filters_overrides": null
}

Retrieve cross project dashboards tiles

Tiles on one cross-project dashboard, edited one at a time.

Writes are per tile rather than a whole-set replace, so two people editing the same dashboard cannot overwrite each other's tiles.

Required API key scopes

cross_project_dashboard:read

Path parameters

  • dashboard_id
    string
  • id
    string

Response


Example request

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

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"project_id": 0,
"insight_id": 0,
"layouts": null,
"color": "string",
"filters_overrides": null
}

Update cross project dashboards tiles

Tiles on one cross-project dashboard, edited one at a time.

Writes are per tile rather than a whole-set replace, so two people editing the same dashboard cannot overwrite each other's tiles.

Required API key scopes

cross_project_dashboard:write

Path parameters

  • dashboard_id
    string
  • id
    string

Request parameters

  • layouts
  • color
    string | null
  • filters_overrides

Response


Example request

PATCH /api/organizations/:organization_id/cross_project_dashboards/:dashboard_id/tiles/:id
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/cross_project_dashboards/:dashboard_id/tiles/:id/\
-d layouts=undefined

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"project_id": 0,
"insight_id": 0,
"layouts": null,
"color": "string",
"filters_overrides": null
}

Delete cross project dashboards tiles

Tiles on one cross-project dashboard, edited one at a time.

Writes are per tile rather than a whole-set replace, so two people editing the same dashboard cannot overwrite each other's tiles.

Required API key scopes

cross_project_dashboard:write

Path parameters

  • dashboard_id
    string
  • id
    string

Example request

DELETE /api/organizations/:organization_id/cross_project_dashboards/:dashboard_id/tiles/: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/cross_project_dashboards/:dashboard_id/tiles/:id/

Example response

Status 204 No response body

Retrieve cross project dashboards

Dashboards the organization owns, holding insights from one or more projects.

Required API key scopes

cross_project_dashboard:read

Path parameters

  • id
    string

Response


Example request

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

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "",
"filters": null,
"tiles": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"project_id": 0,
"insight_id": 0,
"layouts": null,
"color": "string",
"filters_overrides": null
}
],
"created_by": {
"id": 0,
"first_name": "string",
"email": "user@example.com"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}

Update cross project dashboards

Dashboards the organization owns, holding insights from one or more projects.

Required API key scopes

cross_project_dashboard:write

Path parameters

  • id
    string

Request parameters

  • name
    string
  • description
    string
    Default:
  • filters

Response


Example request

PATCH /api/organizations/:organization_id/cross_project_dashboards/:id
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/cross_project_dashboards/:id/\
-d name="string"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "",
"filters": null,
"tiles": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"project_id": 0,
"insight_id": 0,
"layouts": null,
"color": "string",
"filters_overrides": null
}
],
"created_by": {
"id": 0,
"first_name": "string",
"email": "user@example.com"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}

Delete cross project dashboards

Dashboards the organization owns, holding insights from one or more projects.

Required API key scopes

cross_project_dashboard:write

Path parameters

  • id
    string

Example request

DELETE /api/organizations/:organization_id/cross_project_dashboards/: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/cross_project_dashboards/:id/

Example response

Status 204 No response body

List all org organizations desktop beta terms

Required API key scopes

organization:read

Response


Example request

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

Example response

Status 200
RESPONSE
{
"is_desktop_beta_terms_accepted": true
}

Create org organizations desktop beta terms

Required API key scopes

organization:write

Response


Example request

POST /api/organizations/:organization_id/desktop_beta_terms
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/desktop_beta_terms/

Example response

Status 200
RESPONSE
{
"is_desktop_beta_terms_accepted": true
}

List all domains

Required API key scopes

organization:read

Query parameters

  • limit
    integer
  • offset
    integer

Response


Example request

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

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",
"domain": "string",
"is_verified": true,
"verified_at": "2019-08-24T14:15:22Z",
"verification_challenge": "string",
"jit_provisioning_enabled": true,
"sso_enforcement": "string",
"scim_base_url": "string"
}
]
}

Create domains

Required API key scopes

organization:write

Request parameters

  • domain
    string
  • jit_provisioning_enabled
    boolean
  • sso_enforcement
    string

Response


Example request

POST /api/organizations/:organization_id/domains
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/domains/\
-d domain="string"

Example response

Status 201
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"domain": "string",
"is_verified": true,
"verified_at": "2019-08-24T14:15:22Z",
"verification_challenge": "string",
"jit_provisioning_enabled": true,
"sso_enforcement": "string",
"scim_base_url": "string"
}

Retrieve domains

Required API key scopes

organization:read

Path parameters

  • id
    string

Response


Example request

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

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"domain": "string",
"is_verified": true,
"verified_at": "2019-08-24T14:15:22Z",
"verification_challenge": "string",
"jit_provisioning_enabled": true,
"sso_enforcement": "string",
"scim_base_url": "string"
}

Update domains

Required API key scopes

organization:write

Path parameters

  • id
    string

Request parameters

  • domain
    string
  • jit_provisioning_enabled
    boolean
  • sso_enforcement
    string

Response


Example request

PATCH /api/organizations/:organization_id/domains/:id
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/domains/:id/\
-d domain="string"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"domain": "string",
"is_verified": true,
"verified_at": "2019-08-24T14:15:22Z",
"verification_challenge": "string",
"jit_provisioning_enabled": true,
"sso_enforcement": "string",
"scim_base_url": "string"
}

Delete domains

Required API key scopes

organization:write

Path parameters

  • id
    string

Example request

DELETE /api/organizations/:organization_id/domains/: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/domains/:id/

Example response

Status 204 No response body

Retrieve domains scim logs

Path parameters

  • id
    string

Query parameters

  • after
    string
  • before
    string
  • page
    integer
  • page_size
    integer
  • search
    string
  • status_max
    integer
  • status_min
    integer

Response


Example request

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

Example response

Status 200
RESPONSE
{
"count": 0,
"next": "http://example.com",
"previous": "http://example.com",
"results": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"request_method": "string",
"request_path": "string",
"request_headers": null,
"request_body": null,
"response_status": 0,
"response_body": null,
"identity_provider": "string",
"duration_ms": 0,
"created_at": "2019-08-24T14:15:22Z"
}
]
}

Create domains verify

Path parameters

  • id
    string

Request parameters

  • domain
    string
  • jit_provisioning_enabled
    boolean
  • sso_enforcement
    string

Example request

POST /api/organizations/:organization_id/domains/:id/verify
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/domains/:id/verify/\
-d domain="string"

Example response

Status 200 No response body

List all identity provider configs

Required API key scopes

organization:read

Query parameters

  • limit
    integer
  • offset
    integer

Response


Example request

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

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",
"name": "string",
"domain_scope": "all",
"config_scope": "saml",
"organization_domain_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"has_saml": true,
"has_oidc": true,
"has_oidc_client_secret": true,
"oidc_issuer_url": "http://example.com",
"oidc_client_id": "string",
"oidc_client_secret": "string",
"saml_relay_state": "string",
"saml_entity_id": "string",
"saml_acs_url": "string",
"saml_x509_cert": "string",
"has_scim": true,
"scim_enabled": true,
"scim_base_url": "string",
"scim_bearer_token": "string",
"has_id_jag": true,
"id_jag_issuer_url": "string",
"id_jag_jwks_url": "string",
"id_jag_allowed_clients": [
"string"
]
}
]
}

Create identity provider configs

Required API key scopes

organization:write

Request parameters

  • name
    string
  • domain_scope
  • config_scope
  • organization_domain_ids
    array
  • oidc_issuer_url
  • oidc_client_id
    string
  • oidc_client_secret
    string
  • saml_entity_id
    string | null
  • saml_acs_url
    string | null
  • saml_x509_cert
    string | null
  • scim_enabled
    boolean
  • id_jag_issuer_url
    string | null
  • id_jag_jwks_url
    string | null
  • id_jag_allowed_clients
    array

Response


Example request

POST /api/organizations/:organization_id/identity_provider_configs
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/identity_provider_configs/\
-d name="string"

Example response

Status 201
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"domain_scope": "all",
"config_scope": "saml",
"organization_domain_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"has_saml": true,
"has_oidc": true,
"has_oidc_client_secret": true,
"oidc_issuer_url": "http://example.com",
"oidc_client_id": "string",
"oidc_client_secret": "string",
"saml_relay_state": "string",
"saml_entity_id": "string",
"saml_acs_url": "string",
"saml_x509_cert": "string",
"has_scim": true,
"scim_enabled": true,
"scim_base_url": "string",
"scim_bearer_token": "string",
"has_id_jag": true,
"id_jag_issuer_url": "string",
"id_jag_jwks_url": "string",
"id_jag_allowed_clients": [
"string"
]
}

Retrieve identity provider configs

Required API key scopes

organization:read

Path parameters

  • id
    string

Response


Example request

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

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"domain_scope": "all",
"config_scope": "saml",
"organization_domain_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"has_saml": true,
"has_oidc": true,
"has_oidc_client_secret": true,
"oidc_issuer_url": "http://example.com",
"oidc_client_id": "string",
"oidc_client_secret": "string",
"saml_relay_state": "string",
"saml_entity_id": "string",
"saml_acs_url": "string",
"saml_x509_cert": "string",
"has_scim": true,
"scim_enabled": true,
"scim_base_url": "string",
"scim_bearer_token": "string",
"has_id_jag": true,
"id_jag_issuer_url": "string",
"id_jag_jwks_url": "string",
"id_jag_allowed_clients": [
"string"
]
}