Organizations
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
GET | |
GET | |
POST | |
DELETE | |
GET | |
GET | |
POST | |
GET | |
PATCH | |
DELETE | |
GET | |
POST | |
GET | |
DELETE | |
GET |
Retrieve organizations projects settings as of
Return the project settings as of the provided timestamp. Query params:
- at: ISO8601 datetime (required)
- scope: optional, one or multiple keys to filter the returned settings
Path parameters
- idinteger
Response
Example request
GET /api /organizations /:organization_id /projects /:id /settings_as_ofExample response
Status 200
List all role external references
Required API key scopes
organization:readQuery parameters
- limitinteger
- offsetinteger
Response
Example request
GET /api /organizations /:organization_id /role_external_referencesExample response
Status 200
Create role external references
Required API key scopes
organization:writeRequest parameters
- providerstring
- provider_organization_idstring
- provider_role_idstring
- provider_role_slugstringnull
- provider_role_namestring
- rolestring
Response
Example request
POST /api /organizations /:organization_id /role_external_referencesExample response
Status 201
Delete role external references
Required API key scopes
organization:writePath parameters
- idstring
Example request
DELETE /api /organizations /:organization_id /role_external_references /:idExample response
Status 204 No response body
Retrieve role external references lookup
Query parameters
- providerstring
- provider_organization_idstring
- provider_role_idstring
- provider_role_slugstring
Response
Example request
GET /api /organizations /:organization_id /role_external_references /lookupExample response
Status 200
List all roles
Also available via the PostHog MCP server:
roles-list— List organization roles.
Role endpoints disclose member records, so they scope them the same way the members list does when the org restricts member list visibility.
Required API key scopes
organization:readQuery parameters
- limitinteger
- offsetinteger
Response
Example request
GET /api /organizations /:organization_id /rolesExample response
Status 200
Create roles
Role endpoints disclose member records, so they scope them the same way the members list does when the org restricts member list visibility.
Required API key scopes
organization:writeRequest parameters
- namestring
Response
Example request
POST /api /organizations /:organization_id /rolesExample response
Status 201
Retrieve roles
Role endpoints disclose member records, so they scope them the same way the members list does when the org restricts member list visibility.
Required API key scopes
organization:readPath parameters
- idstring
Response
Example request
GET /api /organizations /:organization_id /roles /:idExample response
Status 200
Update roles
Role endpoints disclose member records, so they scope them the same way the members list does when the org restricts member list visibility.
Required API key scopes
organization:writePath parameters
- idstring
Request parameters
- namestring
Response
Example request
PATCH /api /organizations /:organization_id /roles /:idExample response
Status 200
Delete roles
Role endpoints disclose member records, so they scope them the same way the members list does when the org restricts member list visibility.
Required API key scopes
organization:writePath parameters
- idstring
Example request
DELETE /api /organizations /:organization_id /roles /:idExample response
Status 204 No response body
List all roles role memberships
Role endpoints disclose member records, so they scope them the same way the members list does when the org restricts member list visibility.
Required API key scopes
organization:readPath parameters
- role_idstring
Query parameters
- limitinteger
- offsetinteger
Response
Example request
GET /api /organizations /:organization_id /roles /:role_id /role_membershipsExample response
Status 200
Create roles role memberships
Role endpoints disclose member records, so they scope them the same way the members list does when the org restricts member list visibility.
Required API key scopes
organization:writePath parameters
- role_idstring
Request parameters
- user_uuidstring
Response
Example request
POST /api /organizations /:organization_id /roles /:role_id /role_membershipsExample response
Status 201
Retrieve roles role memberships
Role endpoints disclose member records, so they scope them the same way the members list does when the org restricts member list visibility.
Required API key scopes
organization:readPath parameters
- idstring
- role_idstring
Response
Example request
GET /api /organizations /:organization_id /roles /:role_id /role_memberships /:idExample response
Status 200
Delete roles role memberships
Role endpoints disclose member records, so they scope them the same way the members list does when the org restricts member list visibility.
Required API key scopes
organization:writePath parameters
- idstring
- role_idstring
Example request
DELETE /api /organizations /:organization_id /roles /:role_id /role_memberships /:idExample response
Status 204 No response body
Retrieve welcome current
Aggregated payload for the invited-user welcome screen.
Response
Example request
GET /api /organizations /:organization_id /welcome /current