PostHog surveys API

The surveys API from PostHog — 14 operation(s) for surveys.

Operations 18

GET /api/projects/{project_id}/surveys/ #
POST /api/projects/{project_id}/surveys/ #
GET /api/projects/{project_id}/surveys/{id}/ #
PUT /api/projects/{project_id}/surveys/{id}/ #
PATCH /api/projects/{project_id}/surveys/{id}/ #
DELETE /api/projects/{project_id}/surveys/{id}/ #
GET /api/projects/{project_id}/surveys/{id}/activity/ #
GET /api/projects/{project_id}/surveys/{id}/archived-response-uuids/ #
POST /api/projects/{project_id}/surveys/{id}/duplicate_to_projects/ #
POST /api/projects/{project_id}/surveys/{id}/generate_translations/ #
POST /api/projects/{project_id}/surveys/{id}/responses/{response_uuid}/archive/ #
POST /api/projects/{project_id}/surveys/{id}/responses/{response_uuid}/unarchive/ #
GET /api/projects/{project_id}/surveys/{id}/stats/ #
POST /api/projects/{project_id}/surveys/{id}/summarize_responses/ #
POST /api/projects/{project_id}/surveys/{id}/summary_headline/ #
GET /api/projects/{project_id}/surveys/activity/ #
GET /api/projects/{project_id}/surveys/responses_count/ #
GET /api/projects/{project_id}/surveys/stats/ #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/posthog-surveys-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

posthog-surveys-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: PostHog actions Surveys API
  version: 1.0.0
  description: ''
servers:
- url: https://app.posthog.com/api
  description: Base URL declared by the provider in apis.yml (roadmap#122).
tags:
- name: surveys
paths:
  /api/projects/{project_id}/surveys/:
    get:
      operationId: surveys_list
      parameters:
      - in: query
        name: archived
        schema:
          type: boolean
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      - $ref: '#/components/parameters/ProjectIdPath'
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      tags:
      - surveys
      security:
      - PersonalAPIKeyAuth:
        - survey:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedSurveyList'
          description: ''
      x-explicit-tags:
      - surveys
    post:
      operationId: surveys_create
      parameters:
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - surveys
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SurveySerializerCreateUpdateOnlySchema'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/SurveySerializerCreateUpdateOnlySchema'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/SurveySerializerCreateUpdateOnlySchema'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - survey:write
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SurveySerializerCreateUpdateOnly'
          description: ''
      x-explicit-tags:
      - surveys
  /api/projects/{project_id}/surveys/{id}/:
    get:
      operationId: surveys_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this survey.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - surveys
      security:
      - PersonalAPIKeyAuth:
        - survey:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Survey'
          description: ''
      x-explicit-tags:
      - surveys
    put:
      operationId: surveys_update
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this survey.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - surveys
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Survey'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Survey'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Survey'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - survey:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Survey'
          description: ''
      x-explicit-tags:
      - surveys
    patch:
      operationId: surveys_partial_update
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this survey.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - surveys
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedSurveySerializerCreateUpdateOnlySchema'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedSurveySerializerCreateUpdateOnlySchema'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedSurveySerializerCreateUpdateOnlySchema'
      security:
      - PersonalAPIKeyAuth:
        - survey:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SurveySerializerCreateUpdateOnly'
          description: ''
      x-explicit-tags:
      - surveys
    delete:
      operationId: surveys_destroy
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this survey.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - surveys
      security:
      - PersonalAPIKeyAuth:
        - survey:write
      responses:
        '204':
          description: No response body
      x-explicit-tags:
      - surveys
  /api/projects/{project_id}/surveys/{id}/activity/:
    get:
      operationId: surveys_activity_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this survey.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - surveys
      security:
      - PersonalAPIKeyAuth:
        - activity_log:read
      responses:
        '200':
          description: No response body
      x-explicit-tags:
      - surveys
  /api/projects/{project_id}/surveys/{id}/archived-response-uuids/:
    get:
      operationId: surveys_archived_response_uuids_retrieve
      description: 'Get list of archived response UUIDs for HogQL filtering.


        Returns list of UUIDs that the frontend can use to filter out archived responses

        in HogQL queries.'
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this survey.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - surveys
      security:
      - PersonalAPIKeyAuth:
        - survey:read
      responses:
        '200':
          description: No response body
      x-explicit-tags:
      - surveys
  /api/projects/{project_id}/surveys/{id}/duplicate_to_projects/:
    post:
      operationId: surveys_duplicate_to_projects_create
      description: '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.'
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this survey.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - surveys
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SurveySerializerCreateUpdateOnly'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/SurveySerializerCreateUpdateOnly'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/SurveySerializerCreateUpdateOnly'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - survey:write
      responses:
        '200':
          description: No response body
      x-explicit-tags:
      - surveys
  /api/projects/{project_id}/surveys/{id}/generate_translations/:
    post:
      operationId: surveys_generate_translations_create
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this survey.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - surveys
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateSurveyTranslationsRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/GenerateSurveyTranslationsRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/GenerateSurveyTranslationsRequest'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - survey:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateSurveyTranslationsResponse'
          description: ''
      x-explicit-tags:
      - surveys
  /api/projects/{project_id}/surveys/{id}/responses/{response_uuid}/archive/:
    post:
      operationId: surveys_responses_archive_create
      description: Archive a single survey response.
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this survey.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      - in: path
        name: response_uuid
        schema:
          type: string
          pattern: ^[^/]+$
        required: true
      tags:
      - surveys
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SurveySerializerCreateUpdateOnly'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/SurveySerializerCreateUpdateOnly'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/SurveySerializerCreateUpdateOnly'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - survey:write
      responses:
        '200':
          description: No response body
      x-explicit-tags:
      - surveys
  /api/projects/{project_id}/surveys/{id}/responses/{response_uuid}/unarchive/:
    post:
      operationId: surveys_responses_unarchive_create
      description: Unarchive a single survey response.
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this survey.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      - in: path
        name: response_uuid
        schema:
          type: string
          pattern: ^[^/]+$
        required: true
      tags:
      - surveys
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SurveySerializerCreateUpdateOnly'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/SurveySerializerCreateUpdateOnly'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/SurveySerializerCreateUpdateOnly'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - survey:write
      responses:
        '200':
          description: No response body
      x-explicit-tags:
      - surveys
  /api/projects/{project_id}/surveys/{id}/stats/:
    get:
      operationId: surveys_stats_retrieve
      description: "Get survey response statistics for a specific survey.\n\nArgs:\n    date_from: Optional ISO timestamp for start date (e.g. 2024-01-01T00:00:00Z)\n    date_to: Optional ISO timestamp for end date (e.g. 2024-01-31T23:59:59Z)\n    exclude_archived: Optional boolean to exclude archived responses (default: false, includes archived)\n\nReturns:\n    Survey statistics including event counts, unique respondents, and conversion rates"
      parameters:
      - in: query
        name: date_from
        schema:
          type: string
          format: date-time
        description: Optional ISO timestamp for start date (e.g. 2024-01-01T00:00:00Z)
      - in: query
        name: date_to
        schema:
          type: string
          format: date-time
        description: Optional ISO timestamp for end date (e.g. 2024-01-31T23:59:59Z)
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this survey.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - surveys
      security:
      - PersonalAPIKeyAuth:
        - survey:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SurveyStatsResponse'
          description: ''
      x-explicit-tags:
      - surveys
  /api/projects/{project_id}/surveys/{id}/summarize_responses/:
    post:
      operationId: surveys_summarize_responses_create
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this survey.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - surveys
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SurveySerializerCreateUpdateOnly'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/SurveySerializerCreateUpdateOnly'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/SurveySerializerCreateUpdateOnly'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - survey:read
      responses:
        '200':
          description: No response body
      x-explicit-tags:
      - surveys
  /api/projects/{project_id}/surveys/{id}/summary_headline/:
    post:
      operationId: surveys_summary_headline_create
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this survey.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - surveys
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SurveySerializerCreateUpdateOnly'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/SurveySerializerCreateUpdateOnly'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/SurveySerializerCreateUpdateOnly'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - survey:read
      responses:
        '200':
          description: No response body
      x-explicit-tags:
      - surveys
  /api/projects/{project_id}/surveys/activity/:
    get:
      operationId: surveys_all_activity_retrieve
      parameters:
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - surveys
      security:
      - PersonalAPIKeyAuth:
        - activity_log:read
      responses:
        '200':
          description: No response body
      x-explicit-tags:
      - surveys
  /api/projects/{project_id}/surveys/responses_count/:
    get:
      operationId: surveys_responses_count_retrieve
      description: "Get response counts for all surveys.\n\nArgs:\n    exclude_archived: Optional boolean to exclude archived responses (default: false, includes archived)\n    survey_ids: Optional comma-separated list of survey IDs to filter by\n\nReturns:\n    Dictionary mapping survey IDs to response counts"
      parameters:
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - surveys
      security:
      - PersonalAPIKeyAuth:
        - survey:read
      responses:
        '200':
          description: No response body
      x-explicit-tags:
      - surveys
  /api/projects/{project_id}/surveys/stats/:
    get:
      operationId: surveys_global_stats_retrieve
      description: "Get aggregated response statistics across all surveys.\n\nArgs:\n    date_from: Optional ISO timestamp for start date (e.g. 2024-01-01T00:00:00Z)\n    date_to: Optional ISO timestamp for end date (e.g. 2024-01-31T23:59:59Z)\n\nReturns:\n    Aggregated statistics across all surveys including total counts and rates"
      parameters:
      - in: query
        name: date_from
        schema:
          type: string
          format: date-time
        description: Optional ISO timestamp for start date (e.g. 2024-01-01T00:00:00Z)
      - in: query
        name: date_to
        schema:
          type: string
          format: date-time
        description: Optional ISO timestamp for end date (e.g. 2024-01-31T23:59:59Z)
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - surveys
      security:
      - PersonalAPIKeyAuth:
        - survey:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SurveyGlobalStatsResponse'
          description: ''
      x-explicit-tags:
      - surveys
components:
  schemas:
    GeneratedSurveyRootTranslation:
      type: object
      properties:
        name:
          type: string
          description: Translated survey name.
        thankYouMessageHeader:
          type: string
          description: Translated thank-you header.
        thankYouMessageDescription:
          type: string
          description: Translated thank-you description.
        thankYouMessageCloseButtonText:
          type: string
          description: Translated thank-you close button text.
    SurveyMultipleChoiceQuestionSchemaTypeEnum:
      enum:
      - multiple_choice
      type: string
      description: '* `multiple_choice` - multiple_choice'
    NullEnum:
      enum:
      - null
    FeatureFlagMultivariateSchema:
      type: object
      properties:
        variants:
          type: array
          items:
            $ref: '#/components/schemas/FeatureFlagMultivariateVariantSchema'
          description: Variant definitions for multivariate feature flags.
      required:
      - variants
    SurveyOpenQuestionSchema:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/SurveyOpenQuestionSchemaTypeEnum'
        question:
          type: string
          description: Question text shown to respondents.
        description:
          type: string
          description: Optional helper text.
        descriptionContentType:
          allOf:
          - $ref: '#/components/schemas/DescriptionContentTypeEnum'
          description: 'Format for the description field.


            * `text` - text

            * `html` - html'
        optional:
          type: boolean
          description: Whether respondents may skip this question.
        buttonText:
          type: string
          description: Custom button label.
      required:
      - question
      - type
    SurveyRatingQuestionSchemaDisplayEnum:
      enum:
      - number
      - emoji
      type: string
      description: '* `number` - number

        * `emoji` - emoji'
    Survey:
      type: object
      description: Mixin for serializers to add user access control fields
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          maxLength: 400
        description:
          type: string
        type:
          $ref: '#/components/schemas/SurveyType'
        schedule:
          type:
          - string
          - 'null'
        linked_flag:
          allOf:
          - $ref: '#/components/schemas/MinimalFeatureFlag'
          readOnly: true
        linked_flag_id:
          type:
          - integer
          - 'null'
        linked_insight_id:
          type:
          - integer
          - 'null'
        targeting_flag:
          allOf:
          - $ref: '#/components/schemas/MinimalFeatureFlag'
          readOnly: true
        internal_targeting_flag:
          allOf:
          - $ref: '#/components/schemas/MinimalFeatureFlag'
          readOnly: true
        questions:
          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\": \"¿Qué tan satisfecho estás?\",\n                    \"lowerBoundLabel\": \"No satisfecho\",\n                    \"upperBoundLabel\": \"Muy satisfecho\"\n                },\n                \"fr\": {\n                    \"question\": \"Dans quelle mesure êtes-vous satisfait?\"\n                }\n            }\n        }\n        ```\n        "
        conditions:
          type:
          - object
          - 'null'
          additionalProperties: true
          readOnly: true
        appearance: {}
        created_at:
          type: string
          format: date-time
          readOnly: true
        created_by:
          allOf:
          - $ref: '#/components/schemas/UserBasic'
          readOnly: true
        start_date:
          type:
          - string
          - 'null'
          format: date-time
        end_date:
          type:
          - string
          - 'null'
          format: date-time
        archived:
          type: boolean
        responses_limit:
          type:
          - integer
          - 'null'
          maximum: 2147483647
          minimum: 0
        feature_flag_keys:
          type: array
          items:
            type: object
            additionalProperties:
              type:
              - string
              - 'null'
          readOnly: true
        iteration_count:
          type:
          - integer
          - 'null'
          maximum: 500
          minimum: 0
        iteration_frequency_days:
          type:
          - integer
          - 'null'
          maximum: 2147483647
          minimum: 0
        iteration_start_dates:
          type:
          - array
          - 'null'
          items:
            type:
            - string
            - 'null'
            format: date-time
        current_iteration:
          type:
          - integer
          - 'null'
          maximum: 2147483647
          minimum: 0
        current_iteration_start_date:
          type:
          - string
          - 'null'
          format: date-time
        response_sampling_start_date:
          type:
          - string
          - 'null'
          format: date-time
        response_sampling_interval_type:
          oneOf:
          - $ref: '#/components/schemas/ResponseSamplingIntervalTypeEnum'
          - $ref: '#/components/schemas/BlankEnum'
          - $ref: '#/components/schemas/NullEnum'
        response_sampling_interval:
          type:
          - integer
          - 'null'
          maximum: 2147483647
          minimum: 0
        response_sampling_limit:
          type:
          - integer
          - 'null'
          maximum: 2147483647
          minimum: 0
        response_sampling_daily_limits: {}
        enable_partial_responses:
          type:
          - boolean
          - 'null'
        enable_iframe_embedding:
          type:
          - boolean
          - 'null'
        translations: {}
        user_access_level:
          type:
          - string
          - 'null'
          readOnly: true
          description: The effective access level the user has for this object
        form_content: {}
      required:
      - conditions
      - created_at
      - created_by
      - feature_flag_keys
      - id
      - internal_targeting_flag
      - linked_flag
      - name
      - targeting_flag
      - type
      - user_access_level
    SurveyConditionsSchema:
      type: object
      properties:
        url:
          type: string
        selector:
          type: string
        seenSurveyWaitPeriodInDays:
          type: integer
          minimum: 0
          description: Don't show this survey to users who saw any survey in the last x days.
        urlMatchType:
          allOf:
          - $ref: '#/components/schemas/StringMatchOperatorEnum'
          description: 'URL/device matching types: ''regex'' (matches regex pattern), ''not_regex'' (does not match regex pattern), ''exact'' (exact string match), ''is_not'' (not exact match), ''icontains'' (case-insensitive contains), ''not_icontains'' (case-insensitive does not contain).


            * `regex` - regex

            * `not_regex` - not_regex

            * `exact` - exact

            * `is_not` - is_not

            * `icontains` - icontains

            * `not_icontains` - not_icontains'
        events:
          $ref: '#/components/schemas/SurveyEventsConditionSchema'
        deviceTypes:
          type: array
          items:
            $ref: '#/components/schemas/DeviceTypesEnum'
          description: Device types that should match for this survey to be shown.
        deviceTypesMatchType:
          allOf:
          - $ref: '#/components/schemas/StringMatchOperatorEnum'
          description: 'URL/device matching types: ''regex'' (matches regex pattern), ''not_regex'' (does not match regex pattern), ''exact'' (exact string match), ''is_not'' (not exact match), ''icontains'' (case-insensitive contains), ''not_icontains'' (case-insensitive does not contain).


            * `regex` - regex

            * `not_regex` - not_regex

            * `exact` - exact

            * `is_not` - is_not

            * `icontains` - icontains

            * `not_icontains` - not_icontains'
        linkedFlagVariant:
          type: string
          description: The variant of the feature flag linked to this survey.
    FeatureFlagFilterPropertyFlagEvaluatesSchemaOperatorEnum:
      enum:
      - flag_evaluates_to
      type: string
      description: '* `flag_evaluates_to` - flag_evaluates_to'
    SurveyConditionEventValueSchema:
      type: object
      properties:
        name:
          type: string
          description: Event name that triggers the survey.
      required:
      - name
    FeatureFlagFiltersSchema:
      type: object
      properties:
        groups:
          type: array
          items:
            $ref: '#/components/schemas/FeatureFlagConditionGroupSchema'
          description: Release condition groups for the feature flag.
        multivariate:
          allOf:
          - $ref: '#/components/schemas/FeatureFlagMultivariateSchema'
          description: Multivariate configuration for variant-based rollouts.
        aggregation_group_type_index:
          type:
          - integer
          - 'null'
          description: Group type index for group-based feature flags.
        payloads:
          type: object
          additionalProperties:
            type: string
          description: Optional payload values keyed by variant key.
        super_groups:
          type: array
          items:
            type: object
            additionalProperties: true
          description: Additional super condition groups used by experiments.
        feature_enrollment:
          type:
          - boolean
          - 'null'
          description: Whether this flag has early access feature enrollment enabled. When true, the flag is evaluated against the person property $feature_enrollment/{flag_key}.
    PropertyGroupTypeEnum:
      enum:
      - cohort
      - person
      - group
      type: string
      description: '* `cohort` - cohort

        * `person` - person

        * `group` - group'
    SurveyEndBranching:
      type: object
      properties:
        type:
          allOf:
          - $ref: '#/components/schemas/SurveyEndBranchingTypeEnum'
          description: 'End the survey.


            * `

# --- truncated at 32 KB (98 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/posthog/refs/heads/main/openapi/posthog-surveys-api-openapi.yml