Employment Hero LogoEmployment Hero

Happiness Survey

Lists the organisation's happiness survey periods, newest first.

GET
https://api.employmenthero.com/api/v1/organisations/:organisation_id/happiness_surveys/periods

Path Parameters

organisation_iduuidrequired

The ID of the organisation.

Query Parameters

start_datedate

Only return periods whose send date is on or after this date.

end_datedate

Only return periods whose send date is on or before this date. Must be on or after start_date.

page_indexnumber

Current page index

Default1
Min1
item_per_pagenumber

Number of items per page

Default20
Max100

Response 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.

dataobject
itemsobject[]
iduuid

Unique identifier of the survey period.

send_datedate

The date the survey is sent.

end_datedate

The date the survey period closes.

statusenum<string>

The status of the survey period.

average_scorenumber

Overall average on a scale of 1 to 10. null when the period has no responses.

response_ratenumber

The percentage of invited employees who responded, from 0 to 100, rounded to 2 decimal places.

page_indexnumber

Current page index

Default1
Min1
item_per_pagenumber

Number of items per page

Default20
Max100
total_itemsnumber

Total items

total_pagesnumber

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.

GET
https://api.employmenthero.com/api/v1/organisations/:organisation_id/happiness_surveys/periods/:survey_period_id

Path Parameters

organisation_iduuidrequired

The ID of the organisation.

survey_period_iduuidrequired

The ID of the survey period.

Response Body

dataobject
iduuid

Unique identifier of the survey period.

send_datedate

The date the survey is sent.

end_datedate

The date the survey period closes.

statusenum<string>

The status of the survey period.

average_scorenumber

Overall average on a scale of 1 to 10. null when the period has no responses.

response_ratenumber

The percentage of invited employees who responded, from 0 to 100, rounded to 2 decimal places.

questionsobject[]

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.

GET
https://api.employmenthero.com/api/v1/organisations/:organisation_id/happiness_surveys/periods/:survey_period_id/answers

Path Parameters

organisation_iduuidrequired

The ID of the organisation.

survey_period_iduuidrequired

The ID of the survey period.

Query Parameters

page_indexnumber

Current page index

Default1
Min1
item_per_pagenumber

Number of items per page

Default20
Max100

Response Body

A paginated list of anonymous answers for the survey period, newest first.

dataobject
itemsobject[]
iduuid

Unique identifier of the answer. Answers are anonymous and never include a name, email, employee ID or team.

submitted_atdatetime

The date and time the answer was submitted, in ISO 8601 format.

scoreinteger

The score given, from 1 to 10.

commentstring

The comment left with the answer. null when there is no comment.

page_indexnumber

Current page index

Default1
Min1
item_per_pagenumber

Number of items per page

Default20
Max100
total_itemsnumber

Total items

total_pagesnumber

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.

GET
https://api.employmenthero.com/api/v1/organisations/:organisation_id/happiness_surveys/configuration

Path Parameters

organisation_iduuidrequired

The ID of the organisation.

Response Body

dataobject
statusenum<string>

Whether the happiness survey is on.

frequency_typeenum<string>

How often the survey is sent.

send_datedate

The next or current send date.

end_datedate

Calculated by Employment Hero from the send date and duration.

survey_durationinteger

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.

PATCH
https://api.employmenthero.com/api/v1/organisations/:organisation_id/happiness_surveys/configuration

Path Parameters

organisation_iduuidrequired

The ID of the organisation.

Request Body

frequency_typeenum<string>

How often the survey is sent. Required when no survey exists yet. If omitted, the existing frequency is kept.

send_datedate

Cannot be in the past. Required when no survey exists yet.

survey_durationinteger

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.

statusenum<string>

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.

dataobject
statusenum<string>

Whether the happiness survey is on.

frequency_typeenum<string>

How often the survey is sent.

send_datedate

The next or current send date.

end_datedate

Calculated by Employment Hero from the send date and duration.

survey_durationinteger

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  }}