Domains

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

List all domains

Required API key scopes

organization:read

Path parameters

  • organization_id
    string

Query parameters

  • limit
    integer

    Number of results to return per page.

  • offset
    integer

    The initial index from which to return the results.

Response


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/

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",
"has_saml": true,
"saml_entity_id": "string",
"saml_acs_url": "string",
"saml_x509_cert": "string"
}
]
}

Create domains

Required API key scopes

organization:write

Path parameters

  • organization_id
    string

Request parameters

  • domain
    string
  • jit_provisioning_enabled
    boolean
  • sso_enforcement
    string
  • saml_entity_id
    string
  • saml_acs_url
    string
  • saml_x509_cert
    string

Response


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"

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",
"has_saml": true,
"saml_entity_id": "string",
"saml_acs_url": "string",
"saml_x509_cert": "string"
}

Retrieve domains

Required API key scopes

organization:read

Path parameters

  • id
    string

    A UUID string identifying this domain.

  • organization_id
    string

Response


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/

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",
"has_saml": true,
"saml_entity_id": "string",
"saml_acs_url": "string",
"saml_x509_cert": "string"
}

Update domains

Required API key scopes

organization:write

Path parameters

  • id
    string

    A UUID string identifying this domain.

  • organization_id
    string

Request parameters

  • domain
    string
  • jit_provisioning_enabled
    boolean
  • sso_enforcement
    string
  • saml_entity_id
    string
  • saml_acs_url
    string
  • saml_x509_cert
    string

Response


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"

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",
"has_saml": true,
"saml_entity_id": "string",
"saml_acs_url": "string",
"saml_x509_cert": "string"
}

Delete domains

Required API key scopes

organization:write

Path parameters

  • id
    string

    A UUID string identifying this domain.

  • organization_id
    string

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/

Response

Status 204 No response body

Create domains verify

Path parameters

  • id
    string

    A UUID string identifying this domain.

  • organization_id
    string

Request parameters

  • domain
    string
  • jit_provisioning_enabled
    boolean
  • sso_enforcement
    string
  • saml_entity_id
    string
  • saml_acs_url
    string
  • saml_x509_cert
    string

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"

Response

Status 200 No response body

Community questions

Was this page useful?