Publish a survey
Opens a draft survey for responses and fixes who may answer it. Requires the hoa_surveys:write permission.
Authorization
AuthorizationstringrequiredPath parameters
surveyIdstringrequiredThe survey to act on.
Response
200 · The survey, now `Open`.
idstringThe survey. A 64-bit id sent as a decimal string.
titlestringThe survey's title.
descriptionstringWhat the survey is about.
audiencestringBoardMembers polls the seated board; CommunityMembers polls the wider community.
statusstringDraft while it is being written, Open once published, Closed once responses are shut off.
closesAtstring · date-timeWhen the survey is scheduled to close, in the company's timezone. Set to 30 days out when the survey is created without one, and it cannot be cleared afterwards.
questionsobject[]The survey's questions, sorted by order.
responseCountintegerAlways 0 on this endpoint — it is not computed here. Read the survey's results for the real number.
eligibleCountintegerNever returned by this endpoint, so it is always absent. Read the survey's results for it.
createdstring · date-timeWhen the survey was created, in the company's timezone.
updatedstring · date-timeWhen the survey last changed, in the company's timezone.
400 · The survey is not `Draft`, or it has no questions.
401 · The bearer token is missing, expired, or not valid.
403 · The token is valid but the caller does not hold the `hoa_surveys:write` permission.
404 · No survey with that id belongs to the calling company.
A survey that is already Open or Closed returns 400 Bad Request with the detail Only draft surveys can be published. There is no endpoint that turns a published survey back into a draft.
Publishing binds the questions to the survey, so from here on its question list is its own. It also decides who counts as a respondent:
BoardMembers— everyone holding an active board seat at the moment you publish is recorded as eligible. Appointing or deactivating a board member afterwards does not change that list, and it is whateligibleCountand the response rate are measured against.CommunityMembers— no eligible list is recorded, so the survey's results report aneligibleCountof0and a response rate of0.
The date is carried onto the vote so the owner portal can show it, but nothing closes the survey automatically. Call Close a survey when you are ready to stop taking responses.
This endpoint returns the survey shape with responseCount hard-set to 0 and eligibleCount omitted, whatever the real numbers are. Call Get survey results when you need them, or read them off the list.