Ashby/surveys
@keeb/ashby/surveysv2026.10.29.1
01README
Ashby surveys: survey form definitions, survey requests and survey submissions
02Release Notes
- Added: survey_form_definition, survey_request, survey_submission
03Behaviors
@keeb/ashby/surveys/survey-form-definitionv2026.10.29.1survey_form_definition.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| apiKey? | string | Ashby 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? | string | Pin 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? | string | Ashby 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.
| Argument | Type | Description |
|---|---|---|
| surveyFormDefinitionId | string | The 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)
| Argument | Type | Description |
|---|---|---|
| syncToken? | string | A sync token to retrieve only survey form definitions updated since the last sync. Obtained from a previous list response. |
| includeVisibilityConditions? | boolean | This 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? | number | Stop 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
| Argument | Type | Description |
|---|---|---|
| candidateId? | string | The id of the candidate to create a survey request for. |
| applicationId? | string | The id of the application to associate with the survey request. |
| surveyFormDefinitionId? | string | 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. |
| apiKey? | string | Ashby 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? | string | Pin 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? | string | Ashby 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)
| Argument | Type | Description |
|---|---|---|
| surveyType | enum | Returns only the survey requests of the given type. |
| applicationId? | string | If provided, only returns the survey requests for the application with the supplied id. |
| candidateId? | string | If provided, only returns the survey requests for the candidate with the supplied id. |
| syncToken? | string | A sync token to retrieve only survey requests updated since the last sync. Obtained from a previous list response. |
| createdAfter? | number | Return survey requests created at or after this date. Unix timestamp in milliseconds. |
| max_items? | number | Stop 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
| Argument | Type | Description |
|---|---|---|
| surveyFormDefinitionId? | string | The unique identifier of the survey form definition to submit |
| candidateId? | string | The unique identifier of the candidate submitting the survey |
| applicationId? | string | The unique identifier of the associated application |
| submittedValues? | record | A map of form field paths to submitted values |
| apiKey? | string | Ashby 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? | string | Pin 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? | string | Ashby 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)
| Argument | Type | Description |
|---|---|---|
| surveyType | enum | The type of survey submissions to fetch. Supported values: CandidateExperience, Questionnaire, HiringManagerExperience. |
| syncToken? | string | A sync token to retrieve only survey submissions updated since the last sync. Obtained from a previous list response. |
| createdAfter? | number | Return survey submissions created at or after this date. Unix timestamp in milliseconds. |
| includeVisibilityConditions? | boolean | This 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? | number | Stop 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
Repository
https://github.com/keeb/swamp-ashby05Platforms
06Labels