v1

latestOpenAPI 3.1.02026-07-24181585937.4 KB
Survey Request

surveyRequest.create

This endpoint generates a survey request and returns a survey URL. You can send this URL to a candidate to allow them to complete a survey.

Note that calling this endpoint will not automatically email the survey to the candidate. It simply creates the request and gives you a URL to share with a candidate.

Requires the candidatesWrite permission.

post/surveyRequest.create

Request body

candidateIdstring uuid required

The id of the candidate to create a survey request for.

applicationIdstring uuid required

The id of the application to associate with the survey request.

surveyFormDefinitionIdstring uuid required

The ID of the survey form that the candidate will see when they visit the URL returned in the surveyURL property of the API response. Survey forms IDs can be obtained using the surveyFormDefinition.list endpoint.

Example request

{
  "candidateId": "e9ed20fd-d45f-4aad-8a00-a19bfba0083e",
  "applicationId": "e9ed20fd-d45f-4aad-8a00-a19bfba0083e",
  "surveyFormDefinitionId": "e9ed20fd-d45f-4aad-8a00-a19bfba0083e"
}

Response

Responses from the surveyRequest.create endpoint

OR

Example response

{
  "success": true,
  "results": {
    "id": "e9ed20fd-d45f-4aad-8a00-a19bfba0083e",
    "surveyUrl": "https://example.ashbyhq.com/acme/survey/e9ed20fd-d45f-4aad-8a00-a19bfba0083e",
    "surveyFormDefinitionId": "49e621fa-b342-413a-b876-5d924689c23b",
    "applicationId": "38fdb18a-5753-48e0-8a55-d8a124c346b2",
    "candidateId": "d13f3430-d0de-4305-b41c-444d02f19954"
  }
}