Setu Recipes: reusable digital workers across every app.Browse templates

Integrations / Lever

Lever

Recruiting pipeline in Lever: opportunities, job postings, stages and notes.

10 actions API key 7 read3 write Calls api.lever.co

Connect

TypeScript
const conn = await setu.connections.initiate({ userId: "user_1", toolkit: "lever" });
console.log(conn.connectUrl); // show this to your user
await conn.waitUntilActive();

Permissions requested

This toolkit uses a single credential and requests no scopes.

Actions

Add notewritelever.add_noteAdd a note to a candidate opportunity. Use @username to mention and notify a teammate.
InputTypeDescription
opportunity_idstringRequiredOpportunity ID
valuestringRequiredThe note text
secretbooleanOptionalOnly visible to users with sensitive-information access
scoreintegerOptionalOptional score from 1 (strong no) to 4 (strong yes)
notify_followersbooleanOptionalNotify everyone following the candidate
perform_asstringOptionalOptional: ID of the Lever user to add the note as
TypeScript
await setu.execute({
  userId: "user_1",
  action: "lever.add_note",
  input: {
    "opportunity_id": "<opportunity_id>",
    "value": "<value>"
  },
});
Archive opportunitywritelever.archive_opportunityArchive a candidate opportunity with a reason (use list_archive_reasons).
InputTypeDescription
opportunity_idstringRequiredOpportunity ID
reasonstringRequiredArchive reason ID
clean_interviewsbooleanOptionalRemove pending interviews when archiving
perform_asstringOptionalOptional: ID of the Lever user to perform this as
TypeScript
await setu.execute({
  userId: "user_1",
  action: "lever.archive_opportunity",
  input: {
    "opportunity_id": "<opportunity_id>",
    "reason": "<reason>"
  },
});
Get opportunityreadlever.get_opportunityGet one candidate opportunity by ID: contact details, current stage, owner, tags, sources and links.
InputTypeDescription
opportunity_idstringRequiredOpportunity ID
TypeScript
await setu.execute({
  userId: "user_1",
  action: "lever.get_opportunity",
  input: {
    "opportunity_id": "<opportunity_id>"
  },
});
List archive reasonsreadlever.list_archive_reasonsList the reasons a candidate can be archived with (hired and non-hired), to use with archive_opportunity.
InputTypeDescription
typestringOptionalOnly this kind of reason
TypeScript
await setu.execute({
  userId: "user_1",
  action: "lever.list_archive_reasons",
  input: {},
});
List notesreadlever.list_notesList the notes on a candidate opportunity.
InputTypeDescription
opportunity_idstringRequiredOpportunity ID
TypeScript
await setu.execute({
  userId: "user_1",
  action: "lever.list_notes",
  input: {
    "opportunity_id": "<opportunity_id>"
  },
});
List opportunitiesreadlever.list_opportunitiesList candidate opportunities, optionally filtered by job posting, stage, email, tag or dates (Unix milliseconds). Returns one page; pass next as offset for more.
InputTypeDescription
posting_idstringOptionalOnly opportunities applied to this posting ID
stage_idstringOptionalOnly opportunities currently in this stage ID
emailstringOptionalOnly opportunities for this email address
tagstringOptionalOnly opportunities with this tag (case sensitive)
created_at_startintegerOptionalCreated at or after this Unix time in milliseconds
updated_at_startintegerOptionalUpdated at or after this Unix time in milliseconds
limitintegerOptionalPage size, 1 to 100
offsetstringOptionalThe next value from the previous page
TypeScript
await setu.execute({
  userId: "user_1",
  action: "lever.list_opportunities",
  input: {},
});
List job postingsreadlever.list_postingsList job postings in Lever, optionally filtered by state, team, department or location.
InputTypeDescription
statestringOptionalPosting state
teamstringOptionalTeam name (case sensitive)
departmentstringOptionalDepartment name (case sensitive)
locationstringOptionalLocation (case sensitive)
TypeScript
await setu.execute({
  userId: "user_1",
  action: "lever.list_postings",
  input: {},
});
List pipeline stagesreadlever.list_stagesList the hiring pipeline stages (IDs and names) so you can filter opportunities or move one to a stage.

No input.

TypeScript
await setu.execute({
  userId: "user_1",
  action: "lever.list_stages",
  input: {},
});
List usersreadlever.list_usersList Lever users (recruiters, hiring managers) with their IDs and emails, for owners and perform_as values.
InputTypeDescription
emailstringOptionalOnly the user with this exact email
TypeScript
await setu.execute({
  userId: "user_1",
  action: "lever.list_users",
  input: {},
});
Move opportunity to stagewritelever.update_opportunity_stageMove a candidate opportunity to another pipeline stage. Use list_stages to find stage IDs.
InputTypeDescription
opportunity_idstringRequiredOpportunity ID
stagestringRequiredID of the stage to move to
perform_asstringOptionalOptional: ID of the Lever user to perform this as
TypeScript
await setu.execute({
  userId: "user_1",
  action: "lever.update_opportunity_stage",
  input: {
    "opportunity_id": "<opportunity_id>",
    "stage": "<stage>"
  },
});