すべてのエンドポイント

開発者向け / StrawPoll API / Codes and invites

Generate unique codes

POST/forms/{slug}/codes

For forms with responseDuplicateCheck: code. Each code allows one response. prefix is upper-cased. Codes too short for how many there are get 400 with weak_codes. The new codes come without responded.

APIキーが必要です。

パラメーター

パス

  • slug string 必須 max. 20

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

リクエストボディ application/json

  • count integer 必須 ≥ 1, ≤ 10000
  • length integer 必須 ≥ 4, ≤ 32
  • style string

    指定できる値: alphanumeric numeric letters

    デフォルト: alphanumeric

  • prefix string max. 20

レスポンス

The new codes.

  • data array of Invite

試してみる

キーを作成

ブラウザからAPIへ直接送られ、ほかには送られません。「記憶する」をオンにすると、このタブを閉じるまで保持されます。 読み取り専用キーなら、何も変更せずに試せます。

POST https://new.strawpoll.com/api/v4/forms/{slug}/codes

キーが必要なリクエストを送るには、APIキーを貼り付けてください。

キーを使ったリクエストは、プランの1日あたりのAPIリクエスト数に含まれます。