All endpoints

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

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

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

    One of: alphanumeric numeric letters

    Default: alphanumeric

  • prefix string max. 20

Responses

The new codes.

  • data array of Invite

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.

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

Paste an API key to send requests that need one.

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