surveys

Duplicate a survey to multiple projects in a single transaction.

Accepts a list of target team IDs and creates a copy of the survey in each project. Uses an all-or-nothing approach - if any duplication fails, all changes are rolled back.

post/api/projects/{project_id}/surveys/{id}/duplicate_to_projects/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/surveys/{id}/duplicate_to_projects/
  • 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/.

Request body

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
targeting_flag_idinteger
targeting_flag_filtersunknown
remove_targeting_flagboolean nullable
questionsunknown
conditionsunknown
appearanceunknown
created_atstring date-time required
start_datestring date-time nullable
end_datestring date-time nullable
archivedboolean
responses_limitinteger nullable
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
_create_in_folderstring
form_contentunknown

Response

No response body

Changes

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