---
title: "Update a survey"
method: PATCH
path: "/api/surveys/{id_or_slug}"
tags: ["surveys"]
---

# Update a survey

`PATCH /api/surveys/{id_or_slug}`

Update an existing survey, including its polls and options. Requires Administrator privileges.

## Path parameters

- `id_or_slug` string, required

## Request body

- SurveyInput — Parameters for creating or updating a survey
  - `survey` object, required
    - `title` string — Title of the survey
    - `survey_type_of` 'community_pulse' | 'industry' | 'fun' — Survey category
    - `type_of` 'community_pulse' | 'industry' | 'fun' — Survey category (alias of survey_type_of)
    - `active` boolean — Whether the survey is active
    - `display_title` boolean — Whether to show the title to respondents
    - `allow_resubmission` boolean — Whether users can submit multiple times
    - `daily_email_distributions` integer — Daily email distributions count
    - `extra_email_context_paragraph` string, nullable — Optional context paragraph for emails
    - `target_response_count` integer — Target response count
    - `target_completion_date` string, date-time, nullable — Target completion date in the future
    - `polls` object[]
      - `id` integer — ID of the poll to update, omit for new polls
      - `prompt_markdown` string — Question text in markdown
      - `poll_type_of` 'single_choice' | 'multiple_choice' | 'scale' | 'text_input' — Poll type
      - `type_of` 'single_choice' | 'multiple_choice' | 'scale' | 'text_input' — Poll type (alias of poll_type_of)
      - `position` integer — Display order within survey
      - `scale_min` integer — Minimum value for scale polls
      - `scale_max` integer — Maximum value for scale polls
      - `_destroy` boolean — Set to true to destroy this poll
      - `poll_options` object[]
        - `id` integer — ID of the option to update, omit for new options
        - `markdown` string — Option markdown text
        - `supplementary_text` string — Optional supplementary text
        - `position` integer — Display order within poll
        - `_destroy` boolean — Set to true to destroy this option

## Response `200`

Successful

- SurveyWithPolls — Representation of a survey
  - `type_of` 'survey', required — Resource discriminator
  - `id` integer, required
  - `title` string, required
  - `slug` string, required
  - `survey_type_of` 'community_pulse' | 'industry' | 'fun', required — Survey category
  - `active` boolean, nullable — Whether the survey is currently active
  - `display_title` boolean, required — Whether to show the title to respondents
  - `allow_resubmission` boolean, required — Whether users can submit multiple times
  - `daily_email_distributions` integer — Daily email distributions count
  - `extra_email_context_paragraph` string, nullable — Optional context paragraph for emails
  - `target_response_count` integer — Target response count
  - `target_completion_date` string, date-time, nullable — Target completion date in the future
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `polls` Poll[], required — All polls in the survey, ordered by position
    - `type_of` 'poll', required — Resource discriminator
    - `id` integer, required
    - `prompt_markdown` string, nullable, required — Question text in markdown
    - `prompt_html` string, nullable, required — Question text rendered as HTML
    - `poll_type_of` 'single_choice' | 'multiple_choice' | 'scale' | 'text_input', required — Poll question type: single_choice, multiple_choice, scale, or text_input
    - `position` integer, required — Display order within the survey
    - `poll_votes_count` integer, required — Total number of votes across all options
    - `poll_skips_count` integer, required — Number of users who skipped this poll
    - `poll_options_count` integer, required — Number of options in this poll
    - `scale_min` integer, nullable — Minimum value for scale polls
    - `scale_max` integer, nullable — Maximum value for scale polls
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `poll_options` PollOption[], required — The available options for this poll
      - `type_of` 'poll_option', required — Resource discriminator
      - `id` integer, required
      - `markdown` string, nullable, required — Option text in markdown
      - `processed_html` string, nullable, required — Option text rendered as HTML
      - `position` integer, required — Display order within the poll
      - `poll_votes_count` integer, required — Number of votes for this option
      - `supplementary_text` string, nullable — Additional descriptive text for the option

## Other responses

- `401` — Unauthorized
- `404` — Not Found
- `422` — Unprocessable Entity

## Changes

> 59 revisions in range; 8 could not be searched.

- **2026-07-21** (v1) `ffddb865fa73` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/forem/apis/forem-api-v1/changes/api/surveys/:id_or_slug/patch.md)

---

[API](https://skmtc.dev/forem/apis/forem-api-v1.md) · [All operations](https://skmtc.dev/forem/apis/forem-api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/forem/forem-api-v1/revisions/1f64f71fc2a7/schema)
