Organizations-2
For instructions on how to authenticate to use this endpoint, see API overview.
Pause a BatchExport.
Endpoints
Create batch exports pause
Required API key scopes
batch_export:write
Path parameters
- idstring
A UUID string identifying this batch export.
- organization_idstring
Request parameters
- namestring
A human-readable name for this BatchExport.
- model
Which model this BatchExport is exporting.
events
- Eventspersons
- Persons
- destination
- interval
- pausedboolean
Whether this BatchExport is paused or not.
- last_paused_atstring
The timestamp at which this BatchExport was last paused.
- start_atstring
Time before which any Batch Export runs won't be triggered.
- end_atstring
Time after which any Batch Export runs won't be triggered.
- hogql_querystring
Request
POST
/api /organizations /:organization_id /batch_exports /:id /pause
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/batch_exports/:id/pause/\-d name="string",\-d destination=undefined,\-d interval=undefined
Response
Status 200 No response body
Create batch exports unpause
Unpause a BatchExport.
Required API key scopes
batch_export:write
Path parameters
- idstring
A UUID string identifying this batch export.
- organization_idstring
Request parameters
- namestring
A human-readable name for this BatchExport.
- model
Which model this BatchExport is exporting.
events
- Eventspersons
- Persons
- destination
- interval
- pausedboolean
Whether this BatchExport is paused or not.
- last_paused_atstring
The timestamp at which this BatchExport was last paused.
- start_atstring
Time before which any Batch Export runs won't be triggered.
- end_atstring
Time after which any Batch Export runs won't be triggered.
- hogql_querystring
Request
POST
/api /organizations /:organization_id /batch_exports /:id /unpause
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/batch_exports/:id/unpause/\-d name="string",\-d destination=undefined,\-d interval=undefined
Response
Status 200 No response body
List all domains
Required API key scopes
organization:read
Path parameters
- organization_idstring
Query parameters
- limitinteger
Number of results to return per page.
- offsetinteger
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
{"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_idstring
Request parameters
- domainstring
- jit_provisioning_enabledboolean
- sso_enforcementstring
- saml_entity_idstring
- saml_acs_urlstring
- saml_x509_certstring
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
{"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
- idstring
A UUID string identifying this domain.
- organization_idstring
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
{"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
- idstring
A UUID string identifying this domain.
- organization_idstring
Request parameters
- domainstring
- jit_provisioning_enabledboolean
- sso_enforcementstring
- saml_entity_idstring
- saml_acs_urlstring
- saml_x509_certstring
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
{"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
- idstring
A UUID string identifying this domain.
- organization_idstring
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
- idstring
A UUID string identifying this domain.
- organization_idstring
Request parameters
- domainstring
- jit_provisioning_enabledboolean
- sso_enforcementstring
- saml_entity_idstring
- saml_acs_urlstring
- saml_x509_certstring
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
List all invites
Required API key scopes
organization_member:read
Path parameters
- organization_idstring
Query parameters
- limitinteger
Number of results to return per page.
- offsetinteger
The initial index from which to return the results.
Response
Request
GET
/api /organizations /:organization_id /invites
export POSTHOG_PERSONAL_API_KEY=[your personal api key]curl \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \<ph_app_host>/api/organizations/:organization_id/invites/
Response
Status 200
{"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","target_email": "user@example.com","first_name": "string","emailing_attempt_made": true,"level": 1,"is_expired": true,"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": {"property1": null,"property2": null}},"created_at": "2019-08-24T14:15:22Z","updated_at": "2019-08-24T14:15:22Z","message": "string","private_project_access": null,"send_email": true,"combine_pending_invites": false}]}
Create invites
Required API key scopes
organization_member:write
Path parameters
- organization_idstring
Request parameters
- target_emailstring
- first_namestring
- level
- messagestring
- private_project_access
List of team IDs and corresponding access levels to private projects.
- send_emailbooleanDefault:
- combine_pending_invitesboolean
Response
Request
POST
/api /organizations /:organization_id /invites
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/invites/\-d target_email="string"
Response
Status 201
{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","target_email": "user@example.com","first_name": "string","emailing_attempt_made": true,"level": 1,"is_expired": true,"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": {"property1": null,"property2": null}},"created_at": "2019-08-24T14:15:22Z","updated_at": "2019-08-24T14:15:22Z","message": "string","private_project_access": null,"send_email": true,"combine_pending_invites": false}
Delete invites
Required API key scopes
organization_member:write
Path parameters
- idstring
A UUID string identifying this organization invite.
- organization_idstring
Request
DELETE
/api /organizations /:organization_id /invites /: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/invites/:id/
Response
Status 204 No response body
Create invites bulk
Required API key scopes
organization_member:write
Path parameters
- organization_idstring
Request parameters
- target_emailstring
- first_namestring
- level
- messagestring
- private_project_access
List of team IDs and corresponding access levels to private projects.
- send_emailbooleanDefault:
- combine_pending_invitesboolean
Request
POST
/api /organizations /:organization_id /invites /bulk
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/invites/bulk/\-d target_email="string"
Response
Status 200 No response body
List all members
Required API key scopes
organization_member:read
Path parameters
- organization_idstring
Query parameters
- limitinteger
Number of results to return per page.
- offsetinteger
The initial index from which to return the results.
Response
Request
GET
/api /organizations /:organization_id /members
export POSTHOG_PERSONAL_API_KEY=[your personal api key]curl \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \<ph_app_host>/api/organizations/:organization_id/members/
Response
Status 200
{"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","user": {"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": {"property1": null,"property2": null}},"level": 1,"joined_at": "2019-08-24T14:15:22Z","updated_at": "2019-08-24T14:15:22Z","is_2fa_enabled": true,"has_social_auth": true,"last_login": "2019-08-24T14:15:22Z"}]}
Update members
Required API key scopes
organization_member:write
Path parameters
- organization_idstring
- user__uuidstring
Request parameters
- level
Response
Request
PATCH
/api /organizations /:organization_id /members /:user__uuid
Response
Status 200
{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","user": {"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": {"property1": null,"property2": null}},"level": 1,"joined_at": "2019-08-24T14:15:22Z","updated_at": "2019-08-24T14:15:22Z","is_2fa_enabled": true,"has_social_auth": true,"last_login": "2019-08-24T14:15:22Z"}
Delete members
Required API key scopes
organization_member:write
Path parameters
- organization_idstring
- user__uuidstring
Request
DELETE
/api /organizations /:organization_id /members /:user__uuid
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/members/:user__uuid/
Response
Status 204 No response body
Retrieve list
Projects for the current organization.
Required API key scopes
project:read
Path parameters
- organization_idstring
Query parameters
- limitinteger
Number of results to return per page.
- offsetinteger
The initial index from which to return the results.
Response
Request
GET
/api /organizations /:organization_id /projects
export POSTHOG_PERSONAL_API_KEY=[your personal api key]curl \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \<ph_app_host>/api/organizations/:organization_id/projects/
Response
Status 200
{"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,"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f","organization": "452c1a86-a0af-475b-b03f-724878b0f387","api_token": "string","name": "string","completed_snippet_onboarding": true,"has_completed_onboarding_for": null,"ingested_event": true,"is_demo": true,"timezone": "Africa/Abidjan","access_control": true}]}
Create create
Projects for the current organization.
Required API key scopes
project:write
Path parameters
- organization_idstring
Request parameters
- namestring
- product_descriptionstring
- app_urlsarray
- slack_incoming_webhookstring
- anonymize_ipsboolean
- completed_snippet_onboardingboolean
- test_account_filters
- test_account_filters_default_checkedboolean
- path_cleaning_filters
- is_demoboolean
- timezone
- data_attributes
- person_display_name_propertiesarray
- correlation_config
- autocapture_opt_outboolean
- autocapture_exceptions_opt_inboolean
- autocapture_web_vitals_opt_inboolean
- autocapture_web_vitals_allowed_metrics
- autocapture_exceptions_errors_to_ignore
- capture_console_log_opt_inboolean
- capture_performance_opt_inboolean
- session_recording_opt_inboolean
- session_recording_sample_ratestring
- session_recording_minimum_duration_millisecondsinteger
- session_recording_linked_flag
- session_recording_network_payload_capture_config
- session_replay_config
- survey_config
- access_controlboolean
- week_start_day
- primary_dashboardinteger
- live_events_columnsarray
- recording_domainsarray
- inject_web_appsboolean
- extra_settings
- modifiers
- has_completed_onboarding_for
- surveys_opt_inboolean
- heatmaps_opt_inboolean
Response
Request
POST
/api /organizations /:organization_id /projects
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/projects/\-d organization="string"
Response
Status 201
{"id": 0,"organization": "452c1a86-a0af-475b-b03f-724878b0f387","name": "string","product_description": "string","created_at": "2019-08-24T14:15:22Z","effective_membership_level": 1,"has_group_types": true,"live_events_token": "string","updated_at": "2019-08-24T14:15:22Z","uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f","api_token": "string","app_urls": ["string"],"slack_incoming_webhook": "string","anonymize_ips": true,"completed_snippet_onboarding": true,"ingested_event": true,"test_account_filters": null,"test_account_filters_default_checked": true,"path_cleaning_filters": null,"is_demo": true,"timezone": "Africa/Abidjan","data_attributes": null,"person_display_name_properties": ["string"],"correlation_config": null,"autocapture_opt_out": true,"autocapture_exceptions_opt_in": true,"autocapture_web_vitals_opt_in": true,"autocapture_web_vitals_allowed_metrics": null,"autocapture_exceptions_errors_to_ignore": null,"capture_console_log_opt_in": true,"capture_performance_opt_in": true,"session_recording_opt_in": true,"session_recording_sample_rate": "string","session_recording_minimum_duration_milliseconds": 15000,"session_recording_linked_flag": null,"session_recording_network_payload_capture_config": null,"session_replay_config": null,"survey_config": null,"access_control": true,"week_start_day": 0,"primary_dashboard": 0,"live_events_columns": ["string"],"recording_domains": ["string"],"person_on_events_querying_enabled": "string","inject_web_apps": true,"extra_settings": null,"modifiers": null,"default_modifiers": "string","has_completed_onboarding_for": null,"surveys_opt_in": true,"heatmaps_opt_in": true,"product_intents": "string"}
Retrieve retrieve
Projects for the current organization.
Required API key scopes
project:read
Path parameters
- idinteger
A unique value identifying this project.
- organization_idstring
Response
Request
GET
/api /organizations /:organization_id /projects /: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/projects/:id/
Response
Status 200
{"id": 0,"organization": "452c1a86-a0af-475b-b03f-724878b0f387","name": "string","product_description": "string","created_at": "2019-08-24T14:15:22Z","effective_membership_level": 1,"has_group_types": true,"live_events_token": "string","updated_at": "2019-08-24T14:15:22Z","uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f","api_token": "string","app_urls": ["string"],"slack_incoming_webhook": "string","anonymize_ips": true,"completed_snippet_onboarding": true,"ingested_event": true,"test_account_filters": null,"test_account_filters_default_checked": true,"path_cleaning_filters": null,"is_demo": true,"timezone": "Africa/Abidjan","data_attributes": null,"person_display_name_properties": ["string"],"correlation_config": null,"autocapture_opt_out": true,"autocapture_exceptions_opt_in": true,"autocapture_web_vitals_opt_in": true,"autocapture_web_vitals_allowed_metrics": null,"autocapture_exceptions_errors_to_ignore": null,"capture_console_log_opt_in": true,"capture_performance_opt_in": true,"session_recording_opt_in": true,"session_recording_sample_rate": "string","session_recording_minimum_duration_milliseconds": 15000,"session_recording_linked_flag": null,"session_recording_network_payload_capture_config": null,"session_replay_config": null,"survey_config": null,"access_control": true,"week_start_day": 0,"primary_dashboard": 0,"live_events_columns": ["string"],"recording_domains": ["string"],"person_on_events_querying_enabled": "string","inject_web_apps": true,"extra_settings": null,"modifiers": null,"default_modifiers": "string","has_completed_onboarding_for": null,"surveys_opt_in": true,"heatmaps_opt_in": true,"product_intents": "string"}