surveys

Mixin for ViewSets to handle approval-gate exceptions raised from decorated serializers.

Intercepts ApprovalRequired (409) and PolicyConflict (400) raised by the @approval_gate decorator on serializer methods and converts them into the same responses the viewset path produces (see decorators._result_to_response), so both paths share one contract.

get/api/projects/{project_id}/surveys/{id}/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/surveys/{id}/
  • Auth: HTTP bearer

Path parameters

idstring uuid required

A UUID string identifying this survey.

project_idstring required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Response

idstring uuid required
namestring required
descriptionstring
type'popover' | 'widget' | 'external_survey' | 'api' required
  • popover - popover
  • widget - widget
  • external_survey - external survey
  • api - api
schedulestring nullable
linked_flag_idinteger nullable
linked_insight_idinteger nullable
questionsunknown
conditionsobject nullable required
appearanceunknown
created_atstring date-time required
start_datestring date-time nullable
end_datestring date-time nullable
archivedboolean
responses_limitinteger nullable
feature_flag_keysobject[] required
iteration_countinteger nullable
iteration_frequency_daysinteger nullable
iteration_start_datesstring[] nullable
current_iterationinteger nullable
current_iteration_start_datestring date-time nullable
response_sampling_start_datestring date-time nullable
response_sampling_intervalinteger nullable
response_sampling_limitinteger nullable
response_sampling_daily_limitsunknown
enable_partial_responsesboolean nullable
enable_iframe_embeddingboolean nullable
base_languagestring

BCP-47 language code (e.g. 'en', 'es', 'es-MX') describing the language of the survey's untranslated text. Defaults to 'en'. Cannot also appear as a key in translations.

translationsunknown
user_access_levelstring nullable required

The effective access level the user has for this object

form_contentunknown

Changes

No recorded changes to this operation across all 1 revision of this API.