Lists the organisation's happiness survey periods, newest first.
https://api.employmenthero.com/api/v1/organisations/:organisation_id/happiness_surveys/periodsPath Parameters
The ID of the organisation.
Query Parameters
Only return periods whose send date is on or after this date.
Only return periods whose send date is on or before this date. Must be on or after start_date.
Current page index
11Number of items per page
20100Response Body
A paginated list of the organisation's happiness survey periods, newest first. Items do not include questions. Use the get happiness survey period endpoint to retrieve them.
Unique identifier of the survey period.
The date the survey is sent.
The date the survey period closes.
The status of the survey period.
Overall average on a scale of 1 to 10. null when the period has no responses.
The percentage of invited employees who responded, from 0 to 100, rounded to 2 decimal places.
Current page index
11Number of items per page
20100Total items
Total pages
Example
curl -X GET \ "https://api.employmenthero.com/api/v1/organisations/:organisation_id/happiness_surveys/periods" \ -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ"Response
{ "data": { "items": [ { "id": "3f6c1a52-8b7d-4e29-a1c4-6d9e0b2f7a10", "send_date": "2027-06-01", "end_date": "2027-06-08", "status": "active", "average_score": 7.8, "response_rate": 62.5 } ], "page_index": 1, "item_per_page": 20, "total_items": 1, "total_pages": 1 }}Retrieves a survey period with the number of responses for each score from 1 to 10 for every rating question.
https://api.employmenthero.com/api/v1/organisations/:organisation_id/happiness_surveys/periods/:survey_period_idPath Parameters
The ID of the organisation.
The ID of the survey period.
Response Body
Unique identifier of the survey period.
The date the survey is sent.
The date the survey period closes.
The status of the survey period.
Overall average on a scale of 1 to 10. null when the period has no responses.
The percentage of invited employees who responded, from 0 to 100, rounded to 2 decimal places.
The questions of the survey period.
Example
curl -X GET \ "https://api.employmenthero.com/api/v1/organisations/:organisation_id/happiness_surveys/periods/:survey_period_id" \ -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ"Response
{ "data": { "id": "3f6c1a52-8b7d-4e29-a1c4-6d9e0b2f7a10", "send_date": "2027-06-01", "end_date": "2027-06-08", "status": "active", "average_score": 7.8, "response_rate": 62.5, "questions": [ { "question_text": "How happy are you at work?", "question_type": "rating", "score_counts": { "1": 0, "2": 0, "3": 1, "4": 0, "5": 2, "6": 3, "7": 5, "8": 8, "9": 6, "10": 4 } }, { "question_text": "Is there anything you would like to share?", "question_type": "text" } ] }}Lists the anonymous answers for a happiness survey period, newest first.
Anonymous answers
Answers never include a name, email, employee ID or team.
https://api.employmenthero.com/api/v1/organisations/:organisation_id/happiness_surveys/periods/:survey_period_id/answersPath Parameters
The ID of the organisation.
The ID of the survey period.
Query Parameters
Current page index
11Number of items per page
20100Response Body
A paginated list of anonymous answers for the survey period, newest first.
Unique identifier of the answer. Answers are anonymous and never include a name, email, employee ID or team.
The date and time the answer was submitted, in ISO 8601 format.
The score given, from 1 to 10.
The comment left with the answer. null when there is no comment.
Current page index
11Number of items per page
20100Total items
Total pages
Example
curl -X GET \ "https://api.employmenthero.com/api/v1/organisations/:organisation_id/happiness_surveys/periods/:survey_period_id/answers" \ -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ"Response
{ "data": { "items": [ { "id": "8a1d4c70-2e5b-4f93-b6a8-1c7e9d3f5b24", "submitted_at": "2027-06-02T03:15:00Z", "score": 9, "comment": "Great week, the team shipped on time." }, { "id": "5b9e2f81-7c3a-4d16-8e05-a2f4c6b8d913", "submitted_at": "2027-06-01T22:40:00Z", "score": 6, "comment": null } ], "page_index": 1, "item_per_page": 20, "total_items": 2, "total_pages": 1 }}Retrieves the organisation's happiness survey schedule and status. When no survey is configured, status is off and every other field is null.
https://api.employmenthero.com/api/v1/organisations/:organisation_id/happiness_surveys/configurationPath Parameters
The ID of the organisation.
Response Body
Whether the happiness survey is on.
How often the survey is sent.
The next or current send date.
Calculated by Employment Hero from the send date and duration.
The whole number of days the survey stays open.
Example
curl -X GET \ "https://api.employmenthero.com/api/v1/organisations/:organisation_id/happiness_surveys/configuration" \ -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ"Response
{ "data": { "status": "active", "frequency_type": "weekly", "send_date": "2027-06-01", "end_date": "2027-06-08", "survey_duration": 7 }}Updates the happiness survey schedule. Only the fields you send are changed. When no survey exists yet, send frequency_type, send_date and survey_duration to create one.
End date and open periods
end_date cannot be set; it is calculated from the send date and duration.
Changes apply to the next and future surveys. A survey period already open or
archived is not changed.
https://api.employmenthero.com/api/v1/organisations/:organisation_id/happiness_surveys/configurationPath Parameters
The ID of the organisation.
Request Body
How often the survey is sent. Required when no survey exists yet. If omitted, the existing frequency is kept.
Cannot be in the past. Required when no survey exists yet.
Whole number of days the survey stays open, 1 or more. Cannot exceed 6 days for weekly, 13 for fortnightly, 27 for monthly or 90 for quarterly, checked against the new frequency_type if supplied, otherwise the current one. Required when no survey exists yet.
active turns the survey on and it sends on its send date. Frequency, send date and duration must be set, or supplied in the same request.
Response Body
The updated configuration, including the calculated end date.
Whether the happiness survey is on.
How often the survey is sent.
The next or current send date.
Calculated by Employment Hero from the send date and duration.
The whole number of days the survey stays open.
Example
curl -X PATCH \ "https://api.employmenthero.com/api/v1/organisations/:organisation_id/happiness_surveys/configuration" \ -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ" \ -H "Content-Type: application/json" \ -d '{ "survey_duration": 7, "status": "active" }'Response
{ "data": { "status": "active", "frequency_type": "weekly", "send_date": "2027-06-01", "end_date": "2027-06-08", "survey_duration": 7 }}