Alle Endpunkte

Entwickler / 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.

Braucht einen API-Schlüssel.

Parameter

Pfad

  • slug string Pflicht max. 20

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

  • id string (uuid) Pflicht

Request-Body application/json

  • name string
  • email string (email) Pflicht
  • code string
  • weight number

    How many times this person's answers count.

    Standard: 1

Antworten

The invite.

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

    manual for unique codes.

    Einer von: 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.

Ausprobieren

Schlüssel erstellen

Wird von deinem Browser direkt an die API gesendet und an keine andere Stelle. Mit „Merken“ bleibt er gespeichert, bis du diesen Tab schließt. Mit einem Nur-Lesen-Schlüssel kannst du die API erkunden, ohne Daten zu ändern.

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

Füge einen API-Schlüssel ein, um Anfragen zu senden, die einen brauchen.

Anfragen mit Schlüssel zählen gegen die täglichen API-Anfragen deines Tarifs.