Mida Surveys API

The Surveys API from Mida — 6 operation(s) for surveys.

GitHub OpenAPI

Operations 8

POST /v2/project/{project_key}/create-survey Create Survey #
DELETE /v2/project/{project_key}/survey/{survey_id} Delete Survey #
GET /v2/project/{project_key}/survey/{survey_id} Get Survey Details #
PATCH /v2/project/{project_key}/survey/{survey_id} Update Survey #
GET /v2/project/{project_key}/survey/{survey_id}/responses Get Survey Responses #
GET /v2/project/{project_key}/survey/{survey_id}/results Get Survey Results #
GET /v2/project/{project_key}/surveys List Surveys #
PATCH /v2/project/{project_key}/survey/{survey_id}/status Update Survey Status #

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/mida-so:mida-so-surveys-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

mida-so-surveys-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Mida Surveys API
  version: 2.0.0
  description: 'Manage Mida A/B tests, goals, events, hypotheses, surveys and personalization campaigns. Accounts live in one region: call the US or EU server your account is hosted in (Dashboard → Settings shows which). Generated from https://docs.mida.so.'
  contact:
    name: Mida
    url: https://www.mida.so
servers:
- url: https://api-us.mida.so
  description: US region
- url: https://api-eu.mida.so
  description: EU region
security:
- bearerAuth: []
- apiKeyHeader: []
tags:
- name: Surveys
paths:
  /v2/project/{project_key}/create-survey:
    post:
      operationId: createSurvey
      summary: Create Survey
      description: Create an on-site survey as a draft. Nobody sees it until you set it live.
      tags:
      - Surveys
      externalDocs:
        url: https://docs.mida.so/docs/v2/create-survey
      parameters:
      - name: project_key
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Only your team sees it. Max 120 characters
                questions:
                  type: array
                  items: {}
                  description: 1 to 10 questions. See Questions and branching
                trigger:
                  type: string
                  description: 'When to ask: `time` (after `delay` seconds on the page, the default), `pageviews` (on page views `pageviews.from` to `pageviews.to` of a visit) or `js` (when the site calls `mdq.push([''showSurvey'', SURVEY_ID])`)'
                delay:
                  type: integer
                  description: Seconds on the page before asking, 0 to 600. Default `10`
                pageviews:
                  type: object
                  description: '`{ "from", "to" }` for `trigger: "pageviews"`'
                repeat:
                  type: string
                  description: '`once` (default): each visitor is asked once. `until_answered`: asked again on later visits until they answer'
                sample:
                  type: integer
                  description: Percent of matching visitors asked, 1 to 100. Default `100`
                limit:
                  type: object
                  description: '`{ "total", "per_day" }` respondents. `total` ends the survey when reached; `per_day` stops it for the rest of the UTC day. `0` means no limit'
                targeting:
                  type: object
                  description: 'Which pages and visitors, with the same rules as an experiment: `url_rule`, `parameter_rule`, `cookie_rule` and segment rules. Leave it out to ask on every page'
                intro:
                  type: string
                  description: Optional line above the first question. Max 200 characters
                thanks:
                  type: string
                  description: Thank-you message. Default "Thanks for your feedback!"
                accent:
                  type: string
                  description: Hex color, like `#4f46e5`
                position:
                  type: string
                  description: '`br` (bottom right, default), `bl`, `bc` or `center` (a pop-up)'
                layout:
                  type: string
                  description: '`card` shows two or three rating questions on one card. Anything else, and any survey that branches, asks one question at a time'
      responses:
        '200':
          description: Success
          content:
            application/json:
              example:
                success: true
                survey:
                  survey_id: 42
                  name: Who is visiting
                  status: draft
                  questions:
                  - qid: 1
                    type: choice
                    text: Are you visiting as a student or instructor?
                    options:
                    - id: 0
                      text: Student
                      positive: false
                    - id: 1
                      text: Instructor
                      positive: false
                      next: 3
                    multi: false
                    save_as: visitor_role
                  - qid: 2
                    type: yesno
                    text: Would you use a free Education Plan?
                    next: end
                  - qid: 3
                    type: yesno
                    text: Would you teach your class with Mida?
                  trigger: time
                  delay: 10
                  sample: 100
                  accent: '#4f46e5'
                  thanks: Thanks for your feedback!
                  intro: ''
                  position: br
                  layout: steps
                  pageviews:
                    from: 1
                    to: 25
                  repeat: once
                  targeting:
                    url_rule:
                    - type: contains
                      value: /blog/
                  created_at: '2026-10-28T09:12:00.000Z'
                  updated_at: '2026-10-28T09:12:00.000Z'
                  started_at: null
                  ended_at: null
        '401':
          description: Missing or invalid API key
  /v2/project/{project_key}/survey/{survey_id}:
    delete:
      operationId: deleteSurvey
      summary: Delete Survey
      description: 'Archive a survey: off the site and off the list. Its answers stay.'
      tags:
      - Surveys
      externalDocs:
        url: https://docs.mida.so/docs/v2/delete-survey
      parameters:
      - name: project_key
        in: path
        required: true
        schema:
          type: string
      - name: survey_id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              example:
                success: true
                survey_id: 42
                status: archived
        '401':
          description: Missing or invalid API key
    get:
      operationId: getSurveyDetails
      summary: Get Survey Details
      description: 'One survey: its questions and branching, when it asks, its look, limits and page targeting.'
      tags:
      - Surveys
      externalDocs:
        url: https://docs.mida.so/docs/v2/get-survey-details
      parameters:
      - name: project_key
        in: path
        required: true
        schema:
          type: string
      - name: survey_id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              example:
                success: true
                survey:
                  survey_id: 42
                  name: Who is visiting
                  status: live
                  questions:
                  - qid: 1
                    type: choice
                    text: Are you visiting as a student or instructor?
                    options:
                    - id: 0
                      text: Student
                      positive: false
                    - id: 1
                      text: Instructor
                      positive: false
                      next: 3
                    multi: false
                    save_as: visitor_role
                  - qid: 2
                    type: yesno
                    text: Would you use a free Education Plan?
                    next: end
                  - qid: 3
                    type: yesno
                    text: Would you teach your class with Mida?
                  trigger: time
                  delay: 10
                  sample: 100
                  accent: '#4f46e5'
                  thanks: Thanks for your feedback!
                  intro: ''
                  position: br
                  layout: steps
                  pageviews:
                    from: 1
                    to: 25
                  repeat: once
                  targeting:
                    url_rule:
                    - type: contains
                      value: /blog/
                  created_at: '2026-10-28T09:12:00.000Z'
                  updated_at: '2026-10-28T09:12:00.000Z'
                  started_at: null
                  ended_at: null
                  answers_per_question:
                    '1': 8
                    '2': 5
                    '3': 2
        '401':
          description: Missing or invalid API key
    patch:
      operationId: updateSurvey
      summary: Update Survey
      description: Change a survey's questions, settings or targeting. Only the fields you send change.
      tags:
      - Surveys
      externalDocs:
        url: https://docs.mida.so/docs/v2/update-survey
      parameters:
      - name: project_key
        in: path
        required: true
        schema:
          type: string
      - name: survey_id
        in: path
        required: true
        schema:
          type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Only your team sees it. Max 120 characters
                questions:
                  type: array
                  items: {}
                  description: 1 to 10 questions. See Questions and branching
                trigger:
                  type: string
                  description: 'When to ask: `time` (after `delay` seconds on the page, the default), `pageviews` (on page views `pageviews.from` to `pageviews.to` of a visit) or `js` (when the site calls `mdq.push([''showSurvey'', SURVEY_ID])`)'
                delay:
                  type: integer
                  description: Seconds on the page before asking, 0 to 600. Default `10`
                pageviews:
                  type: object
                  description: '`{ "from", "to" }` for `trigger: "pageviews"`'
                repeat:
                  type: string
                  description: '`once` (default): each visitor is asked once. `until_answered`: asked again on later visits until they answer'
                sample:
                  type: integer
                  description: Percent of matching visitors asked, 1 to 100. Default `100`
                limit:
                  type: object
                  description: '`{ "total", "per_day" }` respondents. `total` ends the survey when reached; `per_day` stops it for the rest of the UTC day. `0` means no limit'
                targeting:
                  type: object
                  description: 'Which pages and visitors, with the same rules as an experiment: `url_rule`, `parameter_rule`, `cookie_rule` and segment rules. Leave it out to ask on every page'
                intro:
                  type: string
                  description: Optional line above the first question. Max 200 characters
                thanks:
                  type: string
                  description: Thank-you message. Default "Thanks for your feedback!"
                accent:
                  type: string
                  description: Hex color, like `#4f46e5`
                position:
                  type: string
                  description: '`br` (bottom right, default), `bl`, `bc` or `center` (a pop-up)'
                layout:
                  type: string
                  description: '`card` shows two or three rating questions on one card. Anything else, and any survey that branches, asks one question at a time'
      responses:
        '200':
          description: Success
        '401':
          description: Missing or invalid API key
  /v2/project/{project_key}/survey/{survey_id}/responses:
    get:
      operationId: getSurveyResponses
      summary: Get Survey Responses
      description: One row per person who answered, newest first, with where they came from.
      tags:
      - Surveys
      externalDocs:
        url: https://docs.mida.so/docs/v2/get-survey-responses
      parameters:
      - name: project_key
        in: path
        required: true
        schema:
          type: string
      - name: survey_id
        in: path
        required: true
        schema:
          type: integer
      - name: limit
        in: query
        required: false
        schema:
          type: integer
        description: Rows per page, 1 to 100. Default 50
      - name: offset
        in: query
        required: false
        schema:
          type: integer
        description: Rows to skip, for paging
      - name: filters
        in: query
        required: false
        schema:
          type: string
        description: 'Only people who gave all of these answers, up to 5. Each `{ "question", "is" }`: a question number and the answer: a choice answer''s `id`, `"yes"` / `"no"`, an NPS group (`"promoter"`, `"passive"`, `"detractor"`) or a score. Open-text questions can''t be filtered on'
      - name: start_date
        in: query
        required: false
        schema:
          type: string
        description: '`YYYY-MM-DD`, in the timezone of the `tz` header (hours from UTC, default 0)'
      - name: end_date
        in: query
        required: false
        schema:
          type: string
        description: '`YYYY-MM-DD`'
      - name: segment
        in: query
        required: false
        schema:
          type: string
        description: 'A quick segment, as on the experiment report: `new`, `returning`, `desktop`, `mobile`, `direct`, `referral`, `social`, or `country-XX`'
      responses:
        '200':
          description: Success
          content:
            application/json:
              example:
                success: true
                responses:
                - answered_at: '2026-10-27 21:08:54'
                  answers:
                    '1': Instructor
                    '3': 'Yes'
                  device: Mobile
                  source: chatgpt.com
                  country: DZ
                  email: ''
                - answered_at: '2026-10-27 13:07:51'
                  answers:
                    '1': Student
                    '2': 'No'
                  device: Desktop
                  source: google.com
                  country: US
                  email: ''
                more: true
        '401':
          description: Missing or invalid API key
  /v2/project/{project_key}/survey/{survey_id}/results:
    get:
      operationId: getSurveyResults
      summary: Get Survey Results
      description: 'The survey''s report: the funnel and every question''s answers, filtered to a group or compared across groups.'
      tags:
      - Surveys
      externalDocs:
        url: https://docs.mida.so/docs/v2/get-survey-results
      parameters:
      - name: project_key
        in: path
        required: true
        schema:
          type: string
      - name: survey_id
        in: path
        required: true
        schema:
          type: integer
      - name: filters
        in: query
        required: false
        schema:
          type: string
        description: 'Only people who gave all of these answers, up to 5. Each `{ "question", "is" }`: a question number and the answer: a choice answer''s `id`, `"yes"` / `"no"`, an NPS group (`"promoter"`, `"passive"`, `"detractor"`) or a score. Open-text questions can''t be filtered on'
      - name: start_date
        in: query
        required: false
        schema:
          type: string
        description: '`YYYY-MM-DD`, in the timezone of the `tz` header (hours from UTC, default 0)'
      - name: end_date
        in: query
        required: false
        schema:
          type: string
        description: '`YYYY-MM-DD`'
      - name: segment
        in: query
        required: false
        schema:
          type: string
        description: 'A quick segment, as on the experiment report: `new`, `returning`, `desktop`, `mobile`, `direct`, `referral`, `social`, or `country-XX`'
      - name: compare
        in: query
        required: false
        schema:
          type: integer
        description: A question number. Every other question's answers are split by that question's answers, for example students versus instructors. Works with choice, Yes / No, NPS and rating questions
      responses:
        '200':
          description: Success
          content:
            application/json:
              example:
                success: true
                funnel:
                  shown: 2
                  answered: 2
                  completed: 2
                questions:
                - question: 1
                  qid: 1
                  type: choice
                  text: Are you visiting as a student or instructor?
                  n: 2
                  multi: false
                  options:
                  - id: 0
                    text: Student
                    n: 0
                  - id: 1
                    text: Instructor
                    n: 2
                - question: 2
                  qid: 2
                  type: yesno
                  text: Would you use a free Education Plan?
                  n: 0
                  'yes': 0
                  'no': 0
                - question: 3
                  qid: 3
                  type: yesno
                  text: Would you teach your class with Mida?
                  n: 2
                  'yes': 1
                  'no': 1
                written_answers: []
                filters:
                - question: 1
                  is: 1
        '401':
          description: Missing or invalid API key
  /v2/project/{project_key}/surveys:
    get:
      operationId: listSurveys
      summary: List Surveys
      description: The project's on-site surveys, with how many people saw and answered each.
      tags:
      - Surveys
      externalDocs:
        url: https://docs.mida.so/docs/v2/list-surveys
      parameters:
      - name: project_key
        in: path
        required: true
        schema:
          type: string
      - name: status
        in: query
        required: false
        schema:
          type: string
        description: 'Only surveys in this status: `draft`, `live`, `paused`, `ended` or `archived`'
      - name: include_archived
        in: query
        required: false
        schema:
          type: boolean
        description: '`true` also lists archived surveys. They are left out otherwise'
      responses:
        '200':
          description: Success
          content:
            application/json:
              example:
                success: true
                allowed: true
                reason: ''
                surveys:
                - survey_id: 42
                  name: Who is visiting
                  status: live
                  questions: 3
                  trigger: time
                  shown: 299
                  answered: 8
                  created_at: '2026-10-22T03:10:00.000Z'
                  started_at: '2026-10-22T03:15:00.000Z'
                  ended_at: null
        '401':
          description: Missing or invalid API key
  /v2/project/{project_key}/survey/{survey_id}/status:
    patch:
      operationId: updateSurveyStatus
      summary: Update Survey Status
      description: Set a survey live, pause it, or end it.
      tags:
      - Surveys
      externalDocs:
        url: https://docs.mida.so/docs/v2/update-survey-status
      parameters:
      - name: project_key
        in: path
        required: true
        schema:
          type: string
      - name: survey_id
        in: path
        required: true
        schema:
          type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  type: string
                  description: '`live`, `paused` or `ended`'
              required:
              - status
      responses:
        '200':
          description: Success
        '401':
          description: Missing or invalid API key
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'An API key generated in the Mida dashboard, sent as `Authorization: Bearer <key>`.'
    apiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: 'The same API key, sent as `x-api-key: <key>`.'
externalDocs:
  url: https://docs.mida.so/docs/intro