Surveys
Introduction
Surveys collect one or more selections from targeted users and departments.
The description field uses the shared Rich Text HTML format.
Model Definition
Alias
survey
Computed Properties
hash- Hashed survey ID.url- Stable survey URL.answer_options_summary- Vote count per answer option when explicitly appended.current_vote- Current user's vote when explicitly appended.
Capabilities
Targetables - Explicit users and departments or a supported targetable parent define eligible voters.
Entity Permissions - Direct administration grants supplement module permissions.
URL Context - Survey URLs resolve to access-checked context.
Translations - Localizes
titleanddescription; examples useen-US.
Relations
targetable
Supported targetable entity
Morph to
targetable_type, targetable_id
Types
singleChoice- Allows one selected answer option per vote.multipleChoice- Allows multiple selected answer options per vote.
Show Votes Types
none- Does not expose vote results to voters.always- Exposes vote results while the survey is available.after_vote- Exposes vote results after the current voter has submitted a vote.after_survey_end- Exposes vote results after the survey has ended.
Targetable Types
chatMessage- Targets the audience of a ChatMessage.infoboardPost- Targets the audience of an InfoboardPost.manualEntry- Targets the audience of a ManualEntry.
List
List visible Surveys.
Definition
GET /api/surveys
Request Keys
selects
string
All fields
Comma-separated fields to return.
relations
string
Default relations
Pipe-separated relations to include.
appends
string
Default appends
Pipe-separated computed properties such as answer_options_summary or current_vote.
limit
integer
No limit
Maximum number of surveys.
Example Request
Example Response
Show
Show one visible Survey.
Definition
GET /api/surveys/{survey}
Route Parameters
survey
integer
Survey ID.
Request Keys
selects
string
All fields
Comma-separated fields to return.
relations
string
Default relations
Pipe-separated relations to include.
appends
string
Default appends
Pipe-separated computed properties.
Behavior
For anonymous surveys, voter-specific attributes and relations are removed from nested vote data.
Example Request
Example Response
Admin: List
List all Surveys in administration scope.
Definition
GET /api/administration/surveys
Request Keys
selects
string
All fields
Comma-separated fields to return.
relations
string
Default relations
Pipe-separated relations to include.
appends
string
Default appends
Pipe-separated computed properties such as answer_options_summary or current_vote.
limit
integer
No limit
Maximum number of surveys.
Behavior
Administration results can include inactive and soft-deleted surveys.
Example Request
Example Response
Admin: Show
Show one Survey in administration scope.
Definition
GET /api/administration/surveys/{survey}
Route Parameters
survey
integer
Survey ID.
Request Keys
selects
string
All fields
Comma-separated fields to return.
relations
string
Default relations
Pipe-separated relations to include.
appends
string
Default appends
Pipe-separated computed properties.
Example Request
Example Response
Admin: Create
Create a new Survey.
Definition
POST /api/administration/surveys
Request Keys
lang_id
string
System language
Language key. Use en-US for this example.
title*
string
-
Survey title.
description
string | null
null
HTML description.
active
boolean
false
Whether the survey can be answered.
user_ids
array | null
[]
Directly targeted user IDs.
department_ids
array | null
[]
Directly targeted department IDs.
targetable_type
string | null
null
Supported targetable morph alias.
targetable_id
integer | null
null
Targetable entity ID.
user_confirmation_required
boolean
false
Require confirmed user identity.
one_vote_per_department
boolean
false
Limit voting by department instead of user.
anonymous
boolean
false
Suppress voter information in permitted responses.
start_date
datetime | null
null
Voting start.
end_date
datetime | null
null
Voting end.
folder_id
integer | null
null
Folder ID.
sort_number
integer
Auto
Display order.
Keys with * are required for creation.
Example Request
Example Response
Admin: Update
Update an existing Survey.
Definition
PUT /api/administration/surveys/{survey}
Route Parameters
survey
integer
Survey ID.
Request Keys
lang_id
string
System language
Language key. Use en-US for this example.
title*
string
-
Survey title.
description
string | null
null
HTML description.
active
boolean
false
Whether the survey can be answered.
user_ids
array | null
[]
Directly targeted user IDs.
department_ids
array | null
[]
Directly targeted department IDs.
targetable_type
string | null
null
Supported targetable morph alias.
targetable_id
integer | null
null
Targetable entity ID.
user_confirmation_required
boolean
false
Require confirmed user identity.
one_vote_per_department
boolean
false
Limit voting by department instead of user.
anonymous
boolean
false
Suppress voter information in permitted responses.
start_date
datetime | null
null
Voting start.
end_date
datetime | null
null
Voting end.
folder_id
integer | null
null
Folder ID.
sort_number
integer
Auto
Display order.
Behavior
After the first vote, configured immutable attributes such as survey type cannot be changed. Use Reset when those settings must change and existing votes may be removed.
Example Request
Example Response
Admin: Reset
Reset an existing Survey.
Definition
PUT /api/administration/surveys/{survey}/reset
Route Parameters
survey
integer
Survey ID.
Request Keys
lang_id
string
System language
Language key. Use en-US for this example.
title*
string
-
Survey title.
description
string | null
null
HTML description.
active
boolean
false
Whether the survey can be answered.
user_ids
array | null
[]
Directly targeted user IDs.
department_ids
array | null
[]
Directly targeted department IDs.
targetable_type
string | null
null
Supported targetable morph alias.
targetable_id
integer | null
null
Targetable entity ID.
user_confirmation_required
boolean
false
Require confirmed user identity.
one_vote_per_department
boolean
false
Limit voting by department instead of user.
anonymous
boolean
false
Suppress voter information in permitted responses.
start_date
datetime | null
null
Voting start.
end_date
datetime | null
null
Voting end.
folder_id
integer | null
null
Folder ID.
sort_number
integer
Auto
Display order.
Behavior
Applies the supplied changes and soft-deletes every existing vote for the survey. Omitted settings keep their current values.
Example Request
Example Response
Admin: Delete
Delete an existing Survey.
Definition
DELETE /api/administration/surveys/{survey}
Route Parameters
survey
integer
Survey ID.
Example Request
Example Response
Admin: List Targeted Users
List users targeted by one Survey.
Definition
GET /api/administration/surveys/{survey}/targeted/users
Route Parameters
survey
integer
Survey ID.
Request Keys
selects
string
All fields
Comma-separated user fields to return.
limit
integer
No limit
Maximum number of users.
Example Request
Example Response
Admin: List Targeted Departments
List departments targeted by one Survey.
Definition
GET /api/administration/surveys/{survey}/targeted/departments
Route Parameters
survey
integer
Survey ID.
Request Keys
selects
string
All fields
Comma-separated department fields to return.
limit
integer
No limit
Maximum number of departments.
Example Request
Example Response
Last updated