{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "#/components/schemas/SurveySerializerCreateUpdateOnly", "title": "SurveySerializerCreateUpdateOnly", "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "readOnly": true }, "name": { "type": "string", "maxLength": 400 }, "description": { "type": "string" }, "type": { "$ref": "#/components/schemas/SurveyType" }, "schedule": { "type": "string", "nullable": true }, "linked_flag": { "allOf": [ { "$ref": "#/components/schemas/MinimalFeatureFlag" } ], "readOnly": true }, "linked_flag_id": { "type": "integer", "writeOnly": true, "nullable": true }, "linked_insight_id": { "type": "integer", "writeOnly": true, "nullable": true }, "targeting_flag_id": { "type": "integer", "writeOnly": true }, "targeting_flag": { "allOf": [ { "$ref": "#/components/schemas/MinimalFeatureFlag" } ], "readOnly": true }, "internal_targeting_flag": { "allOf": [ { "$ref": "#/components/schemas/MinimalFeatureFlag" } ], "readOnly": true }, "targeting_flag_filters": { "writeOnly": true, "nullable": true }, "remove_targeting_flag": { "type": "boolean", "writeOnly": true, "nullable": true }, "questions": { "nullable": true, "description": "\n The `array` of questions included in the survey. Each question must conform to one of the defined question types: Basic, Link, Rating, or Multiple Choice.\n\n Basic (open-ended question)\n - `id`: The question ID\n - `type`: `open`\n - `question`: The text of the question.\n - `description`: Optional description of the question.\n - `descriptionContentType`: Content type of the description (`html` or `text`).\n - `optional`: Whether the question is optional (`boolean`).\n - `buttonText`: Text displayed on the submit button.\n - `branching`: Branching logic for the question. See branching types below for details.\n\n Link (a question with a link)\n - `id`: The question ID\n - `type`: `link`\n - `question`: The text of the question.\n - `description`: Optional description of the question.\n - `descriptionContentType`: Content type of the description (`html` or `text`).\n - `optional`: Whether the question is optional (`boolean`).\n - `buttonText`: Text displayed on the submit button.\n - `link`: The URL associated with the question.\n - `branching`: Branching logic for the question. See branching types below for details.\n\n Rating (a question with a rating scale)\n - `id`: The question ID\n - `type`: `rating`\n - `question`: The text of the question.\n - `description`: Optional description of the question.\n - `descriptionContentType`: Content type of the description (`html` or `text`).\n - `optional`: Whether the question is optional (`boolean`).\n - `buttonText`: Text displayed on the submit button.\n - `display`: Display style of the rating (`number` or `emoji`).\n - `scale`: The scale of the rating (`number`).\n - `lowerBoundLabel`: Label for the lower bound of the scale.\n - `upperBoundLabel`: Label for the upper bound of the scale.\n - `isNpsQuestion`: Whether the question is an NPS rating.\n - `branching`: Branching logic for the question. See branching types below for details.\n\n Multiple choice\n - `id`: The question ID\n - `type`: `single_choice` or `multiple_choice`\n - `question`: The text of the question.\n - `description`: Optional description of the question.\n - `descriptionContentType`: Content type of the description (`html` or `text`).\n - `optional`: Whether the question is optional (`boolean`).\n - `buttonText`: Text displayed on the submit button.\n - `choices`: An array of choices for the question.\n - `shuffleOptions`: Whether to shuffle the order of the choices (`boolean`).\n - `hasOpenChoice`: Whether the question allows an open-ended response (`boolean`).\n - `branching`: Branching logic for the question. See branching types below for details.\n\n Branching logic can be one of the following types:\n\n Next question: Proceeds to the next question\n ```json\n {\n \"type\": \"next_question\"\n }\n ```\n\n End: Ends the survey, optionally displaying a confirmation message.\n ```json\n {\n \"type\": \"end\"\n }\n ```\n\n Response-based: Branches based on the response values. Available for the `rating` and `single_choice` question types.\n ```json\n {\n \"type\": \"response_based\",\n \"responseValues\": {\n \"responseKey\": \"value\"\n }\n }\n ```\n\n Specific question: Proceeds to a specific question by index.\n ```json\n {\n \"type\": \"specific_question\",\n \"index\": 2\n }\n ```\n\n Translations: Each question can include inline translations.\n - `translations`: Object mapping language codes to translated fields.\n - Language codes: Any string - allows customers to use their own language keys (e.g., \"es\", \"es-MX\", \"english\", \"french\")\n - Translatable fields: `question`, `description`, `buttonText`, `choices`, `lowerBoundLabel`, `upperBoundLabel`, `link`\n\n Example with translations:\n ```json\n {\n \"id\": \"uuid\",\n \"type\": \"rating\",\n \"question\": \"How satisfied are you?\",\n \"lowerBoundLabel\": \"Not satisfied\",\n \"upperBoundLabel\": \"Very satisfied\",\n \"translations\": {\n \"es\": {\n \"question\": \"\u00bfQu\u00e9 tan satisfecho est\u00e1s?\",\n \"lowerBoundLabel\": \"No satisfecho\",\n \"upperBoundLabel\": \"Muy satisfecho\"\n },\n \"fr\": {\n \"question\": \"Dans quelle mesure \u00eates-vous satisfait?\"\n }\n }\n }\n ```\n " }, "conditions": { "nullable": true }, "appearance": { "nullable": true }, "created_at": { "type": "string", "format": "date-time", "readOnly": true }, "created_by": { "allOf": [ { "$ref": "#/components/schemas/UserBasic" } ], "readOnly": true }, "start_date": { "type": "string", "format": "date-time", "nullable": true }, "end_date": { "type": "string", "format": "date-time", "nullable": true }, "archived": { "type": "boolean" }, "responses_limit": { "type": "integer", "maximum": 2147483647, "minimum": 0, "nullable": true }, "iteration_count": { "type": "integer", "maximum": 500, "minimum": 0, "nullable": true }, "iteration_frequency_days": { "type": "integer", "maximum": 2147483647, "minimum": 0, "nullable": true }, "iteration_start_dates": { "type": "array", "items": { "type": "string", "format": "date-time", "nullable": true }, "nullable": true }, "current_iteration": { "type": "integer", "maximum": 2147483647, "minimum": 0, "nullable": true }, "current_iteration_start_date": { "type": "string", "format": "date-time", "nullable": true }, "response_sampling_start_date": { "type": "string", "format": "date-time", "nullable": true }, "response_sampling_interval_type": { "nullable": true, "oneOf": [ { "$ref": "#/components/schemas/ResponseSamplingIntervalTypeEnum" }, { "$ref": "#/components/schemas/BlankEnum" }, { "$ref": "#/components/schemas/NullEnum" } ] }, "response_sampling_interval": { "type": "integer", "maximum": 2147483647, "minimum": 0, "nullable": true }, "response_sampling_limit": { "type": "integer", "maximum": 2147483647, "minimum": 0, "nullable": true }, "response_sampling_daily_limits": { "nullable": true }, "enable_partial_responses": { "type": "boolean", "nullable": true }, "enable_iframe_embedding": { "type": "boolean", "nullable": true }, "translations": { "nullable": true }, "_create_in_folder": { "type": "string", "writeOnly": true, "title": " create in folder" }, "form_content": { "nullable": true } }, "required": [ "created_at", "created_by", "id", "internal_targeting_flag", "linked_flag", "name", "targeting_flag", "type" ] }