すべてのエンドポイント

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

Change an invite

PATCH/forms/{slug}/invites/{id}

Replaces the invite's name, email and code: a name or code you leave out is removed, so send the current values with your change. email is required, so codes without an email cannot be changed here. weight stays as it is when left out.

APIキーが必要です。

パラメーター

パス

  • slug string 必須 max. 20

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

  • id string (uuid) 必須

リクエストボディ application/json

  • name string
  • email string (email) 必須
  • code string
  • weight number

    How many times this person's answers count.

    デフォルト: 1

レスポンス

The invite.

  • id string (uuid)
  • formId string (uuid)
  • inviteListId string (uuid) | null
  • type string

    manual for unique codes.

    指定できる値: email manual

  • name string | null
  • email string | null
  • phone string | null
  • code string | null
  • invited boolean

    Whether the invite was emailed.

  • weight number

    How many times this person's answers count.

  • responseId string (uuid) | null

    Always null in a secret ballot.

  • createdAt string (date-time)
  • respondedAt string (date-time) | null

    Always null in a secret ballot.

  • responded boolean | null

    Whether the invite or code was used. Null while a secret ballot is open: which ones were used shows once it has closed, and until then the list only tells how many, as respondedCount next to data. Not on newly created ones.

試してみる

キーを作成

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

PATCH https://strawpoll.com/api/v4/forms/{slug}/invites/{id}

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

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