Organizations
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
GET | |
POST | |
GET | |
PATCH | |
DELETE | |
POST | |
POST | |
GET | |
GET | |
POST | |
GET | |
PATCH | |
DELETE |
Retrieve
Required API key scopes
organization:readQuery parameters
- limitinteger
- offsetinteger
Response
Example request
GET /api /organizationsExample response
Status 200
Retrieve
Required API key scopes
organization:readQuery parameters
- limitinteger
- offsetinteger
Response
Example request
GET /api /organizationsExample response
Status 200
Create
Required API key scopes
organization:writeRequest parameters
- namestring
- logo_media_idstringnull
- enforce_2fabooleannull
- enforce_verified_domainsbooleannull
- members_can_invitebooleannull
- members_can_create_projectsbooleannull
- members_can_use_personal_api_keysboolean
- members_can_see_org_membersboolean
- allow_publicly_shared_resourcesboolean
- is_ai_data_processing_approvedbooleannull
- is_ai_training_opted_inbooleannull
- default_experiment_stats_method
- default_anonymize_ipsboolean
- default_role_idstringnull
Response
Example request
POST /api /organizationsExample response
Status 201
Create
Required API key scopes
organization:writeRequest parameters
- namestring
- logo_media_idstringnull
- enforce_2fabooleannull
- enforce_verified_domainsbooleannull
- members_can_invitebooleannull
- members_can_create_projectsbooleannull
- members_can_use_personal_api_keysboolean
- members_can_see_org_membersboolean
- allow_publicly_shared_resourcesboolean
- is_ai_data_processing_approvedbooleannull
- is_ai_training_opted_inbooleannull
- default_experiment_stats_method
- default_anonymize_ipsboolean
- default_role_idstringnull
Response
Example request
POST /api /organizationsExample response
Status 201
Retrieve
Required API key scopes
organization:readPath parameters
- idstring
Response
Example request
GET /api /organizations /:idExample response
Status 200
Retrieve
Required API key scopes
organization:readPath parameters
- idstring
Response
Example request
GET /api /organizations /:idExample response
Status 200
Update partial
Required API key scopes
organization:writePath parameters
- idstring
Request parameters
- namestring
- logo_media_idstringnull
- enforce_2fabooleannull
- enforce_verified_domainsbooleannull
- members_can_invitebooleannull
- members_can_create_projectsbooleannull
- members_can_use_personal_api_keysboolean
- members_can_see_org_membersboolean
- allow_publicly_shared_resourcesboolean
- is_ai_data_processing_approvedbooleannull
- is_ai_training_opted_inbooleannull
- default_experiment_stats_method
- default_anonymize_ipsboolean
- default_role_idstringnull
Response
Example request
PATCH /api /organizations /:idExample response
Status 200
Update partial
Required API key scopes
organization:writePath parameters
- idstring
Request parameters
- namestring
- logo_media_idstringnull
- enforce_2fabooleannull
- enforce_verified_domainsbooleannull
- members_can_invitebooleannull
- members_can_create_projectsbooleannull
- members_can_use_personal_api_keysboolean
- members_can_see_org_membersboolean
- allow_publicly_shared_resourcesboolean
- is_ai_data_processing_approvedbooleannull
- is_ai_training_opted_inbooleannull
- default_experiment_stats_method
- default_anonymize_ipsboolean
- default_role_idstringnull
Response
Example request
PATCH /api /organizations /:idExample response
Status 200
Delete
Required API key scopes
organization:writePath parameters
- idstring
Example request
DELETE /api /organizations /:idExample response
Status 204 No response body
Delete
Required API key scopes
organization:writePath parameters
- idstring
Example request
DELETE /api /organizations /:idExample response
Status 204 No response body
Create remove blocked members and enforce verified domains
Remove the members whose email domain is outside the organization's verified domains and turn
enforce_verified_domains on, in one transaction. Owners are never removed; they keep gated
access and can disable the setting themselves. Admin only.
Use this only when the caller has confirmed the removals. To turn the setting on without
touching memberships, PATCH enforce_verified_domains on the organization instead.
Path parameters
- idstring
Response
Example request
POST /api /organizations /:id /remove_blocked_members_and_enforce_verified_domainsExample response
Status 200
Create request ai access
Notify organization admins that a member is requesting PostHog AI be enabled.
Path parameters
- idstring
Response
Example request
POST /api /organizations /:id /request_ai_accessExample response
Status 200
Retrieve teams data freshness
When each project in the organization last received data, broken down by kind of data.
Path parameters
- idstring
Response
Example request
GET /api /organizations /:id /teams /data_freshnessExample response
Status 200
List all cimd verification tokens
Manage CIMD verification tokens for an organization.
A partner embeds the plaintext token in their CIMD metadata document as
verification_token inside the com.posthog object (the legacy top-level
posthog_verification_token field still works as a fallback). When PostHog fetches
the metadata, matching the token links the partner app to this organization and
grants a higher default rate limit for account provisioning.
Each token is scoped at creation to the one cimd_url it will be published at,
and verifies nowhere else. Two organizations may name the same URL; only the one
whose token is actually served there verifies, so claiming a URL cannot be used
to block a partner from verifying theirs.
The plaintext value is only available on creation; we store a hash.
Required API key scopes
organization:readQuery parameters
- limitinteger
- offsetinteger
Response
Example request
GET /api /organizations /:organization_id /cimd_verification_tokensExample response
Status 200
Create cimd verification tokens
Manage CIMD verification tokens for an organization.
A partner embeds the plaintext token in their CIMD metadata document as
verification_token inside the com.posthog object (the legacy top-level
posthog_verification_token field still works as a fallback). When PostHog fetches
the metadata, matching the token links the partner app to this organization and
grants a higher default rate limit for account provisioning.
Each token is scoped at creation to the one cimd_url it will be published at,
and verifies nowhere else. Two organizations may name the same URL; only the one
whose token is actually served there verifies, so claiming a URL cannot be used
to block a partner from verifying theirs.
The plaintext value is only available on creation; we store a hash.
Required API key scopes
organization:writeRequest parameters
- labelstring
- cimd_urlstring
Response
Example request
POST /api /organizations /:organization_id /cimd_verification_tokensExample response
Status 201
Retrieve cimd verification tokens
Manage CIMD verification tokens for an organization.
A partner embeds the plaintext token in their CIMD metadata document as
verification_token inside the com.posthog object (the legacy top-level
posthog_verification_token field still works as a fallback). When PostHog fetches
the metadata, matching the token links the partner app to this organization and
grants a higher default rate limit for account provisioning.
Each token is scoped at creation to the one cimd_url it will be published at,
and verifies nowhere else. Two organizations may name the same URL; only the one
whose token is actually served there verifies, so claiming a URL cannot be used
to block a partner from verifying theirs.
The plaintext value is only available on creation; we store a hash.
Required API key scopes
organization:readPath parameters
- idstring
Response
Example request
GET /api /organizations /:organization_id /cimd_verification_tokens /:idExample response
Status 200
Update cimd verification tokens
Manage CIMD verification tokens for an organization.
A partner embeds the plaintext token in their CIMD metadata document as
verification_token inside the com.posthog object (the legacy top-level
posthog_verification_token field still works as a fallback). When PostHog fetches
the metadata, matching the token links the partner app to this organization and
grants a higher default rate limit for account provisioning.
Each token is scoped at creation to the one cimd_url it will be published at,
and verifies nowhere else. Two organizations may name the same URL; only the one
whose token is actually served there verifies, so claiming a URL cannot be used
to block a partner from verifying theirs.
The plaintext value is only available on creation; we store a hash.
Required API key scopes
organization:writePath parameters
- idstring
Request parameters
- cimd_urlstring
Response
Example request
PATCH /api /organizations /:organization_id /cimd_verification_tokens /:idExample response
Status 200
Delete cimd verification tokens
Manage CIMD verification tokens for an organization.
A partner embeds the plaintext token in their CIMD metadata document as
verification_token inside the com.posthog object (the legacy top-level
posthog_verification_token field still works as a fallback). When PostHog fetches
the metadata, matching the token links the partner app to this organization and
grants a higher default rate limit for account provisioning.
Each token is scoped at creation to the one cimd_url it will be published at,
and verifies nowhere else. Two organizations may name the same URL; only the one
whose token is actually served there verifies, so claiming a URL cannot be used
to block a partner from verifying theirs.
The plaintext value is only available on creation; we store a hash.
Required API key scopes
organization:writePath parameters
- idstring
Example request
DELETE /api /organizations /:organization_id /cimd_verification_tokens /:id