Todos os endpoints

Desenvolvedores / StrawPoll API / Publishing

Save a draft

PUT/forms/{slug}/draft

Saves changes respondents do not see until you publish. The draft holds title, themeId, properties and sections; the form's name is not part of it (rename with PATCH /forms/{slug}).

Requer uma chave de API.

Parâmetros

Caminho

  • slug string obrigatório max. 20

    The form's public id, as in https://strawpoll.com/r/{slug}.

Corpo da requisição application/json

  • title string
  • themeId string (uuid) | null
  • properties FormProperties

    Form-wide settings. Unknown keys are dropped, unknown values fall back to the default. A request's properties replaces the saved ones: missing keys get their defaults.

  • sections array of SectionInput

Respostas

The saved draft. Sections come back as sent.

  • title string
  • themeId string | null
  • properties FormProperties

    Form-wide settings. Unknown keys are dropped, unknown values fall back to the default. A request's properties replaces the saved ones: missing keys get their defaults.

  • sections array of SectionInput

Experimente

Criar uma chave

Enviada do seu navegador direto para a API, para nenhum outro lugar. Com “Lembrar”, fica até você fechar esta aba. Uma chave somente leitura permite explorar sem alterar nada.

PUT https://new.strawpoll.com/api/v4/forms/{slug}/draft

Cole uma chave de API para enviar as requisições que precisam de uma.

Requisições com chave contam para as requisições de API diárias do seu plano.