# Ashby

> Read and manage Ashby recruiting - candidates, applications, jobs, offers, interviews.

Lets an agent read and manage your Ashby applicant tracking system - candidates, applications, jobs and postings, offers, interviews, feedback, and reference data.

## What it can do

| Method | What it does |
| --- | --- |
| `ashby_list_candidates` | List candidates; paginate with cursor / sync_token, filter created_after. |
| `ashby_get_candidate` | Get one candidate by id or external mapping. |
| `ashby_search_candidates` | Search candidates by email and/or name (de-duplication). |
| `ashby_create_candidate` | Create a candidate - WRITE action. |
| `ashby_update_candidate` | Update a candidate's fields - WRITE action. |
| `ashby_list_candidate_notes` | List a candidate's notes. |
| `ashby_create_candidate_note` | Add a note to a candidate - WRITE action. |
| `ashby_add_candidate_tag` | Add a tag to a candidate - WRITE action. |
| `ashby_list_candidate_tags` | List candidate tags. |
| `ashby_upload_candidate_resume` | Attach and parse a resume on a candidate via a file upload handle - WRITE action. |
| `ashby_upload_candidate_file` | Attach a file to a candidate via a file upload handle - WRITE action. |
| `ashby_list_applications` | List applications; cursor / sync_token pagination. |
| `ashby_get_application` | Get one application by id. |
| `ashby_create_application` | Apply a candidate to a job - WRITE action. |
| `ashby_update_application` | Update an application's source / credit / createdAt - WRITE action. |
| `ashby_change_application_stage` | Move an application to a different interview stage - WRITE action. |
| `ashby_change_application_source` | Change an application's source - WRITE action. |
| `ashby_list_application_feedback` | List submitted feedback (scorecards) for an application. |
| `ashby_submit_application_feedback` | Submit feedback (a scorecard) for an application - WRITE action. |
| `ashby_list_jobs` | List jobs; filter by status. |
| `ashby_get_job` | Get one job by id. |
| `ashby_search_jobs` | Search jobs by title. |
| `ashby_create_job` | Create a job - WRITE action. |
| `ashby_update_job` | Update a job - WRITE action. |
| `ashby_set_job_status` | Set a job's status (Draft/Open/Closed/Archived) - WRITE action. |
| `ashby_list_job_postings` | List job postings. |
| `ashby_get_job_posting` | Get one job posting by id. |
| `ashby_list_offers` | List offers. |
| `ashby_get_offer` | Get one offer by id. |
| `ashby_create_offer` | Create an offer for an application - WRITE action. |
| `ashby_list_interviews` | List interviews. |
| `ashby_list_interview_schedules` | List interview schedules; filter by application. |
| `ashby_create_interview_schedule` | Create an interview schedule with events and interviewers - WRITE action. |
| `ashby_update_interview_schedule` | Update or cancel events on an interview schedule - WRITE action. |
| `ashby_cancel_interview_schedule` | Cancel an interview schedule - WRITE action. |
| `ashby_list_interview_plans` | List published interview plans. |
| `ashby_list_interview_stages` | List the ordered interview stages of a plan (to get stage ids). |
| `ashby_get_interview_stage` | Get one interview stage by id. |
| `ashby_list_feedback_form_definitions` | List feedback form (scorecard) templates. |
| `ashby_get_feedback_form_definition` | Get one feedback form definition by id. |
| `ashby_list_users` | List users (team members). |
| `ashby_get_user` | Get one user by id or email. |
| `ashby_list_custom_fields` | List custom fields. |
| `ashby_set_custom_field_value` | Set a custom field value on an object - WRITE action. |
| `ashby_list_sources` | List sources. |
| `ashby_list_departments` | List departments / teams. |
| `ashby_get_department` | Get one department by id. |
| `ashby_list_locations` | List locations. |
| `ashby_list_archive_reasons` | List archive (rejection) reasons. |
| `ashby_list_openings` | List openings (headcount/reqs); cursor / sync_token pagination. |
| `ashby_get_opening` | Get one opening by id. |
| `ashby_search_openings` | Search openings by identifier. |
| `ashby_create_opening` | Create an opening - WRITE action. |
| `ashby_update_opening` | Update an opening's fields - WRITE action. |
| `ashby_add_opening_job` | Add a job to an opening - WRITE action. |
| `ashby_remove_opening_job` | Remove a job from an opening - WRITE action. |
| `ashby_set_opening_state` | Set an opening's state (Draft/Approved/Open/Closed) - WRITE action. |
| `ashby_set_opening_archived` | Archive or unarchive an opening - WRITE action. |

## How to get credentials

You need an Ashby API key. Creating one requires the Admin role.

1. Open [app.ashbyhq.com/admin/api-keys](https://app.ashbyhq.com/admin/api-keys) (Admin > API keys).
2. Click **Create API key**, give it a name (e.g. *FlyMyAI Agent*).
3. Grant the scopes the agent needs - typically read on candidates, jobs, interviews and write where you want the agent to create or update records.
4. Copy the generated key. You will not be able to see it again, so store it securely.

The key authenticates over HTTP Basic auth - it is used as the username with a blank password. FlyMyAI handles that for you.

## Fields to fill in FlyMyAI

| FlyMyAI field | Where it comes from |
| --- | --- |
| `ASHBY_API_KEY` | Admin > API keys > Create API key |

## Links

- [Ashby API keys](https://app.ashbyhq.com/admin/api-keys)
- [API reference](https://developers.ashbyhq.com/reference)
