Employment Hero LogoEmployment Hero

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.

GET
https://api.employmenthero.com/api/v1/organisations/:organisation_id/surveys

Path Parameters

organisation_iduuidrequired

The ID of the organisation.

Query Parameters

statusenum<string>

Only return surveys with this status. Omit to return surveys of every status.

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 surveys, newest first. Items do not include questions or participants.

dataobject
itemsobject[]
idstring

Unique identifier of the survey.

namestring

The name of the survey.

statusenum<string>

The status of the survey.

is_anonymousboolean

Whether responses are anonymous.

start_atdatetime

When the survey starts, in RFC 3339 UTC.

end_atdatetime

When the survey ends, in RFC 3339 UTC.

total_responsesinteger

The number of responses received.

authorobject

The member who created the survey.

created_atdatetime

When the survey was created, in RFC 3339 UTC.

updated_atdatetime

When the survey was last updated, in RFC 3339 UTC.

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

GET
https://api.employmenthero.com/api/v1/organisations/:organisation_id/surveys/:survey_id

Path Parameters

organisation_iduuidrequired

The ID of the organisation.

survey_idstringrequired

The ID of the survey.

Response Body

The survey with its questions and participants.

dataobject
idstring

Unique identifier of the survey.

namestring

The name of the survey.

statusenum<string>

The status of the survey.

is_anonymousboolean

Whether responses are anonymous.

start_atdatetime

When the survey starts, in RFC 3339 UTC.

end_atdatetime

When the survey ends, in RFC 3339 UTC.

total_responsesinteger

The number of responses received.

authorobject

The member who created the survey.

created_atdatetime

When the survey was created, in RFC 3339 UTC.

updated_atdatetime

When the survey was last updated, in RFC 3339 UTC.

questionsobject[]

The questions of the survey, in display order.

participantsobject

Who the survey is sent to.

total_participantsinteger

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.

POST
https://api.employmenthero.com/api/v1/organisations/:organisation_id/surveys

Path Parameters

organisation_iduuidrequired

The ID of the organisation.

Request Body

namestringrequired

The name of the survey. Cannot be blank.

is_anonymousboolean

Whether responses are anonymous. Defaults to false on create.

template_idstring

The ID of a survey template to start from.

questionsobject[]

The questions of the survey, in display order. On update, the list replaces the existing questions.

participantsobject

Who the survey is sent to.

start_atdatetime

When the survey starts, in RFC 3339 format, for example 2027-06-01T00:00:00Z.

end_atdatetime

When the survey ends, in RFC 3339 format. Must be at least one hour after the start.

publishboolean

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.

dataobject
idstring

Unique identifier of the survey.

namestring

The name of the survey.

statusenum<string>

The status of the survey.

is_anonymousboolean

Whether responses are anonymous.

start_atdatetime

When the survey starts, in RFC 3339 UTC.

end_atdatetime

When the survey ends, in RFC 3339 UTC.

total_responsesinteger

The number of responses received.

authorobject

The member who created the survey.

created_atdatetime

When the survey was created, in RFC 3339 UTC.

updated_atdatetime

When the survey was last updated, in RFC 3339 UTC.

questionsobject[]

The questions of the survey, in display order.

participantsobject

Who the survey is sent to.

total_participantsinteger

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.

PUT
https://api.employmenthero.com/api/v1/organisations/:organisation_id/surveys/:survey_id

Path Parameters

organisation_iduuidrequired

The ID of the organisation.

survey_idstringrequired

The ID of the survey.

Request Body

namestring

The name of the survey.

is_anonymousboolean

Whether responses are anonymous. Defaults to false on create.

template_idstring

The ID of a survey template to start from.

questionsobject[]

The questions of the survey, in display order. On update, the list replaces the existing questions.

participantsobject

Who the survey is sent to.

start_atdatetime

When the survey starts, in RFC 3339 format, for example 2027-06-01T00:00:00Z.

end_atdatetime

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.

dataobject
idstring

Unique identifier of the survey.

namestring

The name of the survey.

statusenum<string>

The status of the survey.

is_anonymousboolean

Whether responses are anonymous.

start_atdatetime

When the survey starts, in RFC 3339 UTC.

end_atdatetime

When the survey ends, in RFC 3339 UTC.

total_responsesinteger

The number of responses received.

authorobject

The member who created the survey.

created_atdatetime

When the survey was created, in RFC 3339 UTC.

updated_atdatetime

When the survey was last updated, in RFC 3339 UTC.

questionsobject[]

The questions of the survey, in display order.

participantsobject

Who the survey is sent to.

total_participantsinteger

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.

PUT
https://api.employmenthero.com/api/v1/organisations/:organisation_id/surveys/:survey_id/publish

Path Parameters

organisation_iduuidrequired

The ID of the organisation.

survey_idstringrequired

The ID of the survey.

Response Body

The survey after publishing. Returns HTTP 200.

dataobject
idstring

Unique identifier of the survey.

namestring

The name of the survey.

statusenum<string>

The status of the survey.

is_anonymousboolean

Whether responses are anonymous.

start_atdatetime

When the survey starts, in RFC 3339 UTC.

end_atdatetime

When the survey ends, in RFC 3339 UTC.

total_responsesinteger

The number of responses received.

authorobject

The member who created the survey.

created_atdatetime

When the survey was created, in RFC 3339 UTC.

updated_atdatetime

When the survey was last updated, in RFC 3339 UTC.

questionsobject[]

The questions of the survey, in display order.

participantsobject

Who the survey is sent to.

total_participantsinteger

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.

PUT
https://api.employmenthero.com/api/v1/organisations/:organisation_id/surveys/:survey_id/archive

Path Parameters

organisation_iduuidrequired

The ID of the organisation.

survey_idstringrequired

The ID of the survey.

Response Body

The survey with status archived. Returns HTTP 200.

dataobject
idstring

Unique identifier of the survey.

namestring

The name of the survey.

statusenum<string>

The status of the survey.

is_anonymousboolean

Whether responses are anonymous.

start_atdatetime

When the survey starts, in RFC 3339 UTC.

end_atdatetime

When the survey ends, in RFC 3339 UTC.

total_responsesinteger

The number of responses received.

authorobject

The member who created the survey.

created_atdatetime

When the survey was created, in RFC 3339 UTC.

updated_atdatetime

When the survey was last updated, in RFC 3339 UTC.

questionsobject[]

The questions of the survey, in display order.

participantsobject

Who the survey is sent to.

total_participantsinteger

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.

DELETE
https://api.employmenthero.com/api/v1/organisations/:organisation_id/surveys/:survey_id

Path Parameters

organisation_iduuidrequired

The ID of the organisation.

survey_idstringrequired

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.

GET
https://api.employmenthero.com/api/v1/organisations/:organisation_id/surveys/:survey_id/results

Path Parameters

organisation_iduuidrequired

The ID of the organisation.

survey_idstringrequired

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.

dataobject
total_responsesinteger

The number of responses received.

total_participantsinteger

The number of participants.

is_anonymousboolean

Whether the survey is anonymous.

questionsobject[]

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.

GET
https://api.employmenthero.com/api/v1/organisations/:organisation_id/surveys/:survey_id/responses

Path Parameters

organisation_iduuidrequired

The ID of the organisation.

survey_idstringrequired

The ID of the survey.

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 responses, with the same answers as the Download responses file. The list is empty if there are no responses.

dataobject
itemsobject[]
respondentobject

Who responded. Not returned for anonymous surveys.

answersobject[]

One entry per question, in display order.

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