All endpoints

Developers / 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}).

Needs an API key.

Parameters

Path

  • slug string required max. 20

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

Request body 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

Responses

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

Try it

Create a key

Sent from your browser straight to the API, nowhere else. With “Remember” on it stays until you close this tab. A read-only key lets you look around without changing anything.

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

Paste an API key to send requests that need one.

Requests with a key count against your plan’s daily API requests.