Skip to main content

Ashby/surveys

@keeb/ashby/surveysv2026.10.29.1· MIT· 2d agoBEHAVIORS
01README

Ashby surveys: survey form definitions, survey requests and survey submissions

02Release Notes
  • Added: survey_form_definition, survey_request, survey_submission
03Behaviors3
@keeb/ashby/surveys/survey-form-definitionv2026.10.29.1survey_form_definition.ts

Global Arguments

ArgumentTypeDescription
apiKey?stringAshby API key, sent as the HTTP Basic username. Overrides the ASHBY_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
apiVersion?stringPin an Ashby API version (e.g. 2026-01-01) via the Ashby-Version header. Defaults to the version the API key was created on.
onBehalfOf?stringAshby user id to act as, sent in the X-On-Behalf-Of header. Only some endpoints honor it.
fn get(surveyFormDefinitionId: string)
Get a survey form definition and record it as this model's state (surveyFormDefinition.info). Returns details about a single survey form definition by id. Requires the `hiringProcessMetadataRead` permission.
ArgumentTypeDescription
surveyFormDefinitionIdstringThe unique identifier of the survey form definition to fetch
fn lookup(syncToken?: string, includeVisibilityConditions?: boolean, max_items?: number)
List survey form definition records and record each as a data artifact (surveyFormDefinition.list; capped at 500 by default; writes a survey_form_definition_lookup record with the coverage of the walk and the sync token)
ArgumentTypeDescription
syncToken?stringA sync token to retrieve only survey form definitions updated since the last sync. Obtained from a previous list response.
includeVisibilityConditions?booleanThis feature is in beta and may not be available for all organizations. When true, each form field's visibilityCondition tree is included. Defaults to false on this endpoint to keep responses small.
max_items?numberStop after this many results (default 500). Whole pages are kept, so the recorded next_cursor resumes exactly after the last row. When the walk stops with rows still on offer, the survey_form_definition_lookup record reports truncated: true.
fn sync()
Sync the stored survey form definition from Ashby (surveyFormDefinition.info); records status not_found when it is gone.

Resources

state(infinite)— Ashby survey form definition state
survey_form_definition_lookup(infinite)— Ashby survey form definition lookup coverage — whether the walk exhausted the collection, and the sync token for the next one
@keeb/ashby/surveys/survey-requestv2026.10.29.1survey_request.ts

Global Arguments

ArgumentTypeDescription
candidateId?stringThe id of the candidate to create a survey request for.
applicationId?stringThe id of the application to associate with the survey request.
surveyFormDefinitionId?stringThe 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.
apiKey?stringAshby API key, sent as the HTTP Basic username. Overrides the ASHBY_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
apiVersion?stringPin an Ashby API version (e.g. 2026-01-01) via the Ashby-Version header. Defaults to the version the API key was created on.
onBehalfOf?stringAshby user id to act as, sent in the X-On-Behalf-Of header. Only some endpoints honor it.
fn create()
Create a survey request from the model's global arguments (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. Requires the `candidatesWrite` permission.
fn lookup(surveyType: enum, applicationId?: string, candidateId?: string, syncToken?: string, createdAfter?: number, max_items?: number)
List survey request records and record each as a data artifact (surveyRequest.list; capped at 500 by default; writes a survey_request_lookup record with the coverage of the walk and the sync token)
ArgumentTypeDescription
surveyTypeenumReturns only the survey requests of the given type.
applicationId?stringIf provided, only returns the survey requests for the application with the supplied id.
candidateId?stringIf provided, only returns the survey requests for the candidate with the supplied id.
syncToken?stringA sync token to retrieve only survey requests updated since the last sync. Obtained from a previous list response.
createdAfter?numberReturn survey requests created at or after this date. Unix timestamp in milliseconds.
max_items?numberStop after this many results (default 500). Whole pages are kept, so the recorded next_cursor resumes exactly after the last row. When the walk stops with rows still on offer, the survey_request_lookup record reports truncated: true.

Resources

state(infinite)— Ashby survey request state
survey_request_lookup(infinite)— Ashby survey request lookup coverage — whether the walk exhausted the collection, and the sync token for the next one
@keeb/ashby/surveys/survey-submissionv2026.10.29.1survey_submission.ts

Global Arguments

ArgumentTypeDescription
surveyFormDefinitionId?stringThe unique identifier of the survey form definition to submit
candidateId?stringThe unique identifier of the candidate submitting the survey
applicationId?stringThe unique identifier of the associated application
submittedValues?recordA map of form field paths to submitted values
apiKey?stringAshby API key, sent as the HTTP Basic username. Overrides the ASHBY_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
apiVersion?stringPin an Ashby API version (e.g. 2026-01-01) via the Ashby-Version header. Defaults to the version the API key was created on.
onBehalfOf?stringAshby user id to act as, sent in the X-On-Behalf-Of header. Only some endpoints honor it.
fn create()
Create a survey submission from the model's global arguments (surveySubmission.create). Creates a survey submission for a candidate and application. Requires the `candidatesWrite` permission.
fn lookup(surveyType: enum, syncToken?: string, createdAfter?: number, includeVisibilityConditions?: boolean, max_items?: number)
List survey submission records and record each as a data artifact (surveySubmission.list; capped at 500 by default; writes a survey_submission_lookup record with the coverage of the walk and the sync token)
ArgumentTypeDescription
surveyTypeenumThe type of survey submissions to fetch. Supported values: CandidateExperience, Questionnaire, HiringManagerExperience.
syncToken?stringA sync token to retrieve only survey submissions updated since the last sync. Obtained from a previous list response.
createdAfter?numberReturn survey submissions created at or after this date. Unix timestamp in milliseconds.
includeVisibilityConditions?booleanThis feature is in beta and may not be available for all organizations. When true, each form field's visibilityCondition tree is included. Defaults to false on this endpoint to keep responses small.
max_items?numberStop after this many results (default 500). Whole pages are kept, so the recorded next_cursor resumes exactly after the last row. When the walk stops with rows still on offer, the survey_submission_lookup record reports truncated: true.

Resources

state(infinite)— Ashby survey submission state
survey_submission_lookup(infinite)— Ashby survey submission lookup coverage — whether the walk exhausted the collection, and the sync token for the next one
04Stats
A
100 / 100
Downloads
0
Archive size
17.9 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Docs keep secrets in a vault1/1earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License2/2earned
  • Verified public repository2/2earned
05Platforms
06Labels