Get poll state
Returns poll state for the authorised account.
GET
/api/v1/social/widgets/{widgetId}/pollpoll: read1,000 requests/minute/key · all plansActive API keys: Free 1, Pro 5, Pro+ 5. The request rate is the same on every plan.
Parameters
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
widgetId | string (uuid) | Required | Identifier of the widget. |
Response schema
200
Successful response.
| Name | Type | Required | Description |
|---|---|---|---|
question | string | Required | Question. |
options | array<string> | Required | Options. |
allowMultipleSelections | boolean | Required | Allow Multiple Selections. |
optionCounts | array<number> | Required | Option Counts. |
distinctVoterCount | number | Required | Distinct Voter Count. |
myOptionIndices | array<number> | Required | My Option Indices. |
Errors
400· JSON errorRequest failed (BAD_REQUEST).
401· JSON errorMissing or invalid API key. Use Authorization: Bearer <token>.
403· JSON errorRequires poll: read; ownership or feature restrictions may also deny access.
404· JSON errorRequest failed (NOT_FOUND).
409· JSON errorRequest failed (CONFLICT).
429· JSON errorAPI rate limit exceeded (1000 requests per minute). Retry shortly.
503· JSON errorPostgreSQL is not configured (DATABASE_URL).
Request example
Set FLORALITY_KEY in your environment. These examples use demo identifiers.
curl --request GET 'https://floralitys.com/api/v1/social/widgets/11111111-1111-4111-8111-111111111111/poll' \
--header "Authorization: Bearer $FLORALITY_KEY"Responses
Successful response.
{
"question": "demo",
"options": [
"demo"
],
"allowMultipleSelections": false,
"optionCounts": [
0
],
"distinctVoterCount": 0,
"myOptionIndices": [
0
]
}Example values are illustrative demo data.
