surveys

Update a survey

Changed on

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

patch/api/surveys/{id_or_slug}

Request

  • Base URL
    https://dev.to
  • Auth
    • API key in header api-key
    • or HTTP bearer

Path parameters

id_or_slugstring required

The ID or slug of the survey.

Request body

Response

Successful

type_of'survey' required

Resource discriminator

idinteger required
titlestring required
slugstring required
survey_type_of'community_pulse' | 'industry' | 'fun' | 'beta_testing' required

Survey category

activeboolean nullable

Whether the survey is currently active

display_titleboolean required

Whether to show the title to respondents

allow_resubmissionboolean required

Whether users can submit multiple times

daily_email_distributionsinteger

Daily email distributions count

extra_email_context_paragraphstring nullable

Optional context paragraph for emails

target_response_countinteger

Target response count

target_completion_datestring date-time nullable

Target completion date in the future

created_atstring date-time required
updated_atstring date-time required

Changes

    • warning

      added the new beta_testing enum value to the //// response property for the response status

    • info

      added the new beta_testing enum value to the request property /

    • info

      added the new beta_testing enum value to the request property /

    • info

      endpoint added