Custom Survey
Create, manage and read the results of the organisation's custom surveys.
Responses are wrapped in data, IDs are strings, and dates are RFC 3339 in UTC.
Lists the organisation's custom surveys, newest first. item_per_page defaults to 20 and page_index to 1. item_per_page must be between 1 and 100.
https://api.employmenthero.com/api/v1/organisations/:organisation_id/surveysPath Parameters
The ID of the organisation.
Query Parameters
Only return surveys with this status. Omit to return surveys of every status.
Current page index
11Number of items per page
20100Response Body
A paginated list of the organisation surveys, newest first. Items do not include questions or participants.
Unique identifier of the survey.
The name of the survey.
The status of the survey.
Whether responses are anonymous.
When the survey starts, in RFC 3339 UTC.
When the survey ends, in RFC 3339 UTC.
The number of responses received.
The member who created the survey.
When the survey was created, in RFC 3339 UTC.
When the survey was last updated, in RFC 3339 UTC.
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/surveys" \ -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ"Response
{ "data": { "items": [ { "id": "1042", "name": "Engagement pulse Q3", "status": "draft", "is_anonymous": false, "start_at": "2027-06-01T00:00:00Z", "end_at": "2027-06-15T00:00:00Z", "total_responses": 0, "author": { "id": "6ddbfb24", "full_name": "Jane Smith" }, "created_at": "2027-05-20T01:00:00Z", "updated_at": "2027-05-20T01:00:00Z" } ], "page_index": 1, "item_per_page": 20, "total_items": 1, "total_pages": 1 }}Retrieves one survey with its questions and participants.
https://api.employmenthero.com/api/v1/organisations/:organisation_id/surveys/:survey_idPath Parameters
The ID of the organisation.
The ID of the survey.
Response Body
The survey with its questions and participants.
Unique identifier of the survey.
The name of the survey.
The status of the survey.
Whether responses are anonymous.
When the survey starts, in RFC 3339 UTC.
When the survey ends, in RFC 3339 UTC.
The number of responses received.
The member who created the survey.
When the survey was created, in RFC 3339 UTC.
When the survey was last updated, in RFC 3339 UTC.
The questions of the survey, in display order.
Who the survey is sent to.
The number of participants the survey is sent to.
Example
curl -X GET \ "https://api.employmenthero.com/api/v1/organisations/:organisation_id/surveys/:survey_id" \ -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ"Response
{ "data": { "id": "1042", "name": "Engagement pulse Q3", "status": "draft", "is_anonymous": false, "start_at": "2027-06-01T00:00:00Z", "end_at": "2027-06-15T00:00:00Z", "total_responses": 0, "author": { "id": "6ddbfb24", "full_name": "Jane Smith" }, "created_at": "2027-05-20T01:00:00Z", "updated_at": "2027-05-20T01:00:00Z", "questions": [ { "text": "How was your week?", "type": "text", "choices": null }, { "text": "Would you recommend us as a place to work?", "type": "single_choice", "choices": [ "Yes", "No" ] } ], "participants": { "all_employees": false, "member_ids": [ "5001", "5002" ], "team_ids": [], "work_location_ids": [] }, "total_participants": 2 }}Creates a survey in draft status. Nobody is notified until the survey is published. To publish in the same request, set publish to true: the survey is published immediately and its participants are notified, or it becomes pending until start_at if that is in the future. Publishing on create needs at least one question and one participant.
https://api.employmenthero.com/api/v1/organisations/:organisation_id/surveysPath Parameters
The ID of the organisation.
Request Body
The name of the survey. Cannot be blank.
Whether responses are anonymous. Defaults to false on create.
The ID of a survey template to start from.
The questions of the survey, in display order. On update, the list replaces the existing questions.
Who the survey is sent to.
When the survey starts, in RFC 3339 format, for example 2027-06-01T00:00:00Z.
When the survey ends, in RFC 3339 format. Must be at least one hour after the start.
Set to true to publish the survey as soon as it is created, and notify its participants. Requires at least one question and one participant. If start_at is in the future, the survey is created as pending and starts then. Defaults to false, which creates a draft.
Response Body
The newly created survey. Its status is draft, or pending or published when publish is true. Returns HTTP 201 Created.
Unique identifier of the survey.
The name of the survey.
The status of the survey.
Whether responses are anonymous.
When the survey starts, in RFC 3339 UTC.
When the survey ends, in RFC 3339 UTC.
The number of responses received.
The member who created the survey.
When the survey was created, in RFC 3339 UTC.
When the survey was last updated, in RFC 3339 UTC.
The questions of the survey, in display order.
Who the survey is sent to.
The number of participants the survey is sent to.
Example
curl -X POST \ "https://api.employmenthero.com/api/v1/organisations/:organisation_id/surveys" \ -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ" \ -H "Content-Type: application/json" \ -d '{ "name": "Engagement pulse Q3", "is_anonymous": false, "questions": [ { "text": "How was your week?", "type": "text" }, { "text": "Would you recommend us as a place to work?", "type": "single_choice", "choices": [ "Yes", "No" ] } ], "participants": { "all_employees": false, "member_ids": [ "5001", "5002" ] }, "start_at": "2027-06-01T00:00:00Z", "end_at": "2027-06-15T00:00:00Z", "publish": false }'Response
{ "data": { "id": "1042", "name": "Engagement pulse Q3", "status": "draft", "is_anonymous": false, "start_at": "2027-06-01T00:00:00Z", "end_at": "2027-06-15T00:00:00Z", "total_responses": 0, "author": { "id": "6ddbfb24", "full_name": "Jane Smith" }, "created_at": "2027-05-20T01:00:00Z", "updated_at": "2027-05-20T01:00:00Z", "questions": [ { "text": "How was your week?", "type": "text", "choices": null }, { "text": "Would you recommend us as a place to work?", "type": "single_choice", "choices": [ "Yes", "No" ] } ], "participants": { "all_employees": false, "member_ids": [ "5001", "5002" ], "team_ids": [], "work_location_ids": [] }, "total_participants": 2 }}Updates a survey. Only the fields you send are changed, and questions replaces the whole list.
Published and archived surveys
Draft and pending surveys accept any field. A published survey only accepts new participants and a new end date. An archived survey cannot be updated.
https://api.employmenthero.com/api/v1/organisations/:organisation_id/surveys/:survey_idPath Parameters
The ID of the organisation.
The ID of the survey.
Request Body
The name of the survey.
Whether responses are anonymous. Defaults to false on create.
The ID of a survey template to start from.
The questions of the survey, in display order. On update, the list replaces the existing questions.
Who the survey is sent to.
When the survey starts, in RFC 3339 format, for example 2027-06-01T00:00:00Z.
When the survey ends, in RFC 3339 format. Must be at least one hour after the start.
Response Body
The updated survey. Returns HTTP 200.
Unique identifier of the survey.
The name of the survey.
The status of the survey.
Whether responses are anonymous.
When the survey starts, in RFC 3339 UTC.
When the survey ends, in RFC 3339 UTC.
The number of responses received.
The member who created the survey.
When the survey was created, in RFC 3339 UTC.
When the survey was last updated, in RFC 3339 UTC.
The questions of the survey, in display order.
Who the survey is sent to.
The number of participants the survey is sent to.
Example
curl -X PUT \ "https://api.employmenthero.com/api/v1/organisations/:organisation_id/surveys/:survey_id" \ -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ" \ -H "Content-Type: application/json" \ -d '{ "name": "Engagement pulse Q3 (revised)", "end_at": "2027-06-20T00:00:00Z" }'Response
{ "data": { "id": "1042", "name": "Engagement pulse Q3 (revised)", "status": "draft", "is_anonymous": false, "start_at": "2027-06-01T00:00:00Z", "end_at": "2027-06-20T00:00:00Z", "total_responses": 0, "author": { "id": "6ddbfb24", "full_name": "Jane Smith" }, "created_at": "2027-05-20T01:00:00Z", "updated_at": "2027-05-21T09:30:00Z", "questions": [ { "text": "How was your week?", "type": "text", "choices": null }, { "text": "Would you recommend us as a place to work?", "type": "single_choice", "choices": [ "Yes", "No" ] } ], "participants": { "all_employees": false, "member_ids": [ "5001", "5002" ], "team_ids": [], "work_location_ids": [] }, "total_participants": 2 }}Publishes a draft or pending survey and notifies its participants. A draft with a future start date becomes pending, otherwise the survey becomes published. A pending survey is published now and its start date is set to now. The survey needs at least one question and one participant, and an anonymous survey needs at least 5 participants. This endpoint takes no body.
https://api.employmenthero.com/api/v1/organisations/:organisation_id/surveys/:survey_id/publishPath Parameters
The ID of the organisation.
The ID of the survey.
Response Body
The survey after publishing. Returns HTTP 200.
Unique identifier of the survey.
The name of the survey.
The status of the survey.
Whether responses are anonymous.
When the survey starts, in RFC 3339 UTC.
When the survey ends, in RFC 3339 UTC.
The number of responses received.
The member who created the survey.
When the survey was created, in RFC 3339 UTC.
When the survey was last updated, in RFC 3339 UTC.
The questions of the survey, in display order.
Who the survey is sent to.
The number of participants the survey is sent to.
Example
curl -X PUT \ "https://api.employmenthero.com/api/v1/organisations/:organisation_id/surveys/:survey_id/publish" \ -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ"Response
{ "data": { "id": "1042", "name": "Engagement pulse Q3", "status": "published", "is_anonymous": false, "start_at": "2027-05-22T02:00:00Z", "end_at": "2027-06-15T00:00:00Z", "total_responses": 0, "author": { "id": "6ddbfb24", "full_name": "Jane Smith" }, "created_at": "2027-05-20T01:00:00Z", "updated_at": "2027-05-22T02:00:00Z", "questions": [ { "text": "How was your week?", "type": "text", "choices": null }, { "text": "Would you recommend us as a place to work?", "type": "single_choice", "choices": [ "Yes", "No" ] } ], "participants": { "all_employees": false, "member_ids": [ "5001", "5002" ], "team_ids": [], "work_location_ids": [] }, "total_participants": 2 }}Archives a published survey. This endpoint takes no body.
https://api.employmenthero.com/api/v1/organisations/:organisation_id/surveys/:survey_id/archivePath Parameters
The ID of the organisation.
The ID of the survey.
Response Body
The survey with status archived. Returns HTTP 200.
Unique identifier of the survey.
The name of the survey.
The status of the survey.
Whether responses are anonymous.
When the survey starts, in RFC 3339 UTC.
When the survey ends, in RFC 3339 UTC.
The number of responses received.
The member who created the survey.
When the survey was created, in RFC 3339 UTC.
When the survey was last updated, in RFC 3339 UTC.
The questions of the survey, in display order.
Who the survey is sent to.
The number of participants the survey is sent to.
Example
curl -X PUT \ "https://api.employmenthero.com/api/v1/organisations/:organisation_id/surveys/:survey_id/archive" \ -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ"Response
{ "data": { "id": "1042", "name": "Engagement pulse Q3", "status": "archived", "is_anonymous": false, "start_at": "2027-06-01T00:00:00Z", "end_at": "2027-06-15T00:00:00Z", "total_responses": 2, "author": { "id": "6ddbfb24", "full_name": "Jane Smith" }, "created_at": "2027-05-20T01:00:00Z", "updated_at": "2027-06-16T02:00:00Z", "questions": [ { "text": "How was your week?", "type": "text", "choices": null }, { "text": "Would you recommend us as a place to work?", "type": "single_choice", "choices": [ "Yes", "No" ] } ], "participants": { "all_employees": false, "member_ids": [ "5001", "5002" ], "team_ids": [], "work_location_ids": [] }, "total_participants": 2 }}Deletes a survey of any status together with all of its responses. This cannot be undone. This endpoint takes no body.
https://api.employmenthero.com/api/v1/organisations/:organisation_id/surveys/:survey_idPath Parameters
The ID of the organisation.
The ID of the survey.
Response Body
Returns HTTP 204 No Content with no body on success.
Example
curl -X DELETE \ "https://api.employmenthero.com/api/v1/organisations/:organisation_id/surveys/:survey_id" \ -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ"Response
This endpoint does not return a response body.
Returns the aggregated results of a survey, with the same totals as the Results tab. Free-text answers never show their author. Results of an anonymous survey are hidden until it has at least 5 responses.
https://api.employmenthero.com/api/v1/organisations/:organisation_id/surveys/:survey_id/resultsPath Parameters
The ID of the organisation.
The ID of the survey.
Response Body
Aggregated results with the same totals as the Results tab. Totals are zero if there are no responses.
The number of responses received.
The number of participants.
Whether the survey is anonymous.
Aggregated results for each question.
Example
curl -X GET \ "https://api.employmenthero.com/api/v1/organisations/:organisation_id/surveys/:survey_id/results" \ -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ"Response
{ "data": { "total_responses": 2, "total_participants": 2, "is_anonymous": false, "questions": [ { "id": "9001", "text": "How was your week?", "order": 1, "type": "text", "options": null, "responses": [ { "value": "Busy but good" }, { "value": "Quiet" } ] }, { "id": "9002", "text": "Would you recommend us as a place to work?", "order": 2, "type": "single_choice", "options": [ { "value": "Yes", "count": 2, "percentage": 100 }, { "value": "No", "count": 0, "percentage": 0 } ], "responses": null } ] }}Returns the responses of a survey, with the same answers as the "Download responses" file. item_per_page defaults to 20 and page_index to 1. item_per_page must be between 1 and 100. Responses of anonymous surveys never identify the respondent, and are hidden until the survey has at least 5 responses.
https://api.employmenthero.com/api/v1/organisations/:organisation_id/surveys/:survey_id/responsesPath Parameters
The ID of the organisation.
The ID of the survey.
Query Parameters
Current page index
11Number of items per page
20100Response Body
A paginated list of responses, with the same answers as the Download responses file. The list is empty if there are no responses.
Who responded. Not returned for anonymous surveys.
One entry per question, in display order.
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/surveys/:survey_id/responses" \ -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ"Response
{ "data": { "items": [ { "respondent": { "id": "5001", "full_name": "Alex Chen" }, "answers": [ { "question_id": "9001", "question_text": "How was your week?", "answer": "Busy but good" }, { "question_id": "9002", "question_text": "Would you recommend us as a place to work?", "answer": "Yes" } ] } ], "page_index": 1, "item_per_page": 20, "total_items": 1, "total_pages": 1 }}