Closing a job preserves all the configurations made on the job while restricting users from adding candidates to the job, visiting the job dashboard, or submitting scorecards to the job on Greenhouse Recruiting. Additionally, this action unpublishes the job's job posts from all of your organization's job boards.
There are many reasons you may close a job:
- Making the necessary new headcount or backfill hires
- The job is placed on hold while your organization priorities other roles
- Your organization has implemented a hiring freeze
- The job is temporarily not being filled
The Greenhouse Harvest API allows your team to close jobs in your Greenhouse Recruiting account programmatically.
In this article, we will cover:
Create a Harvest API key
In order to close a job in Greenhouse Recruiting via Harvest API, you'll first need to generate an API key with the proper permissions.
To generate a Harvest API key, click the Configure icon in the upper-right corner. Navigate to Dev Center on the left panel.
From the Dev Center page, click API Credential Management.
From the API Credential Management page, click Create New API Key.
In the Create New Credential dialog box, make the following selections:
- API Type: Harvest
- Partner: Leave blank
- Description: Harvest API
When finished, click Manage Permissions to generate the Harvest API key.
In the subsequent dialog box, click Copy to save your API key to your clipboard. Store the API key in a secure location to share with your developers. Click I have stored the API Key once you have copied and saved the key.
On the subsequent page, assign the following permissions:
- GET: List Jobs
- GET: List Openings For a Job
- PATCH: Edit job openings
When you've finished selecting the appropriate endpoints, click Save at the bottom of the page.
You have successfully created a Harvest API key! Provide the key to your internal development team as appropriate.
Close a job in Greenhouse Recruiting via Harvest API
Now that your API key is generated, your development team can use it to close a job in Greenhouse Recruiting using Harvest API.
There are a few API endpoints that are useful to programmatically close jobs in Greenhouse Recruiting.
1. GET: List Jobs
Use the GET: List Jobs Harvest API endpoint to retrieve the Greenhouse
job_ID value on the job you wish to close.
- You may filter the GET: List Jobs endpoint by a specific job using the
2. GET List Job Openings
Use the GET: List Job Openings Harvest API endpoint on the
job_ID from the previous step to retrieve all of the job openings for the job that you would like to close.
3. PATCH: Edit Openings
Use the PATCH: Edit Openings Harvest API endpoint to close all open openings in Greenhouse Recruiting on the job you wish to close.
- After the last opening on a job is closed, Greenhouse will automatically close the job.
- The PATCH: Edit Openings endpoint requires both the Greenhouse
job_IDand the Greenhouse
You can access Greenhouse Developer Resources to learn more about Harvest API calls, and the endpoints referenced in this article.