Lever automation · runs weekly

Archive rejected Lever candidates with a reason and email

After a screening round, a recruiter archives each rejected candidate in Lever by hand: open the profile, pick an archive reason, tick Send email, edit the email and send it.

Cotlet does it in your own Lever account with list_opportunities, list_archive_reasons, get_opportunity and archive_opportunity, called by your AI agent, an n8n workflow or a script.

Hosted · nothing to install or maintain

Can Lever do this on its own?

Lever's Data API archives an opportunity with a reason (PUT /opportunities/:opportunity/archived) for customers with an API key, and its reference has no field to email the candidate in that call (checked 22 Oct 2026). The Send email option exists only in the Lever app. Lever's developer docs list no MCP server.

How you do it in Lever today

  1. Open the candidate profile, select the opportunity and click Archive next to the stage field.
  2. Choose an archive reason from the menu. The list is managed under Settings > Pipeline and archive reasons > Archive reasons.
  3. Tick Send email below the menu and click Next to open the email editor, then click Archive + Send Now.
  4. If the candidate has more than one active opportunity, Lever offers to archive the others in the same action.
  5. For a batch, select the opportunities in the pipeline list, use the bulk action toolbar, choose an archive reason and decide which candidates get an email.
  6. Lever remembers the Send email tick and pre-fills the editor with the email from the last candidate you archived, so one unedited click sends the wrong name.

How to archive rejected Lever candidates with a reason and email

Prompt

Archive the Phone screen opportunities of the Senior Designer posting that I name below as Underqualified, and send each one a short, polite rejection email.
  1. 01

    List the stage

    list_opportunities runs with the posting and the stage you name and follows next_cursor to the end. Archived opportunities are left out, so a candidate another recruiter already closed never appears.

  2. 02

    Map each decision to a real reason

    list_archive_reasons returns the reasons your account defines. The agent matches your verdict ("Underqualified") to one of them by name and asks you when none fits; it never invents a reason.

  3. 03

    Check the profile again

    Right before archiving, get_opportunity confirms the candidate is still in that stage and shows the tags. A candidate moved forward in the meantime is skipped and reported.

  4. 04

    Archive and write the email

    archive_opportunity runs with send_email on and an email body written for that candidate by first name and role. The agent shows you the body, and each call waits for your OK until you switch confirmation off.

  5. 05

    Report who got what

    The agent lists every archived candidate with the reason used and whether an email went out, so you can answer a reply from the right profile.

What you get back

Example data

Phone screen, Senior Designer: 9 opportunities
Archived 6 as Underqualified, rejection email sent
Archived 1 as Withdrew, no email (you asked for none)
Left in stage 2: Marco Silva, Aisha Khan
Skipped 0 (nobody moved in the meantime)

Other ways to ask

  • Every Friday, archive opportunities in New applicant older than 30 days with the reason Timing and no email, and list them for me.
  • Archive Dana Whitfield as Underqualified and draft the email, but wait for my OK before sending anything.
  • Archive everyone I name in this list with the reason Position closed and send the closing-the-role email.

What Lever allows, and what to know first

  • Lever manages archive reasons under Settings > Pipeline and archive reasons > Archive reasons, so the reasons an agent can use are the ones your account defines.
  • Lever remembers whether Send email was ticked last time and pre-fills the editor with the previous email, so the agent writes the body for each candidate instead of reusing the editor text.
  • Archiving from a profile can archive the candidate's other active opportunities in the same action; archive_opportunity archives only the opportunity you name.
  • In a bulk archive, Lever still archives every selected candidate when you untick some of their emails, so skipping an email never skips the archive.

archive_opportunity asks for your OK by default. To run it weekly without you, switch confirmation off for that tool in your dashboard.

Sources: Lever Help: Archiving opportunities · Lever Developer: API Overview

Call archive_opportunity from a script

curl

curl -X POST https://cotlet.dev/api/v1/lever/opportunities/2d6f9b83-a41e-4c07-9e52-b8c3a0f17d64/archive \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reason":"Underqualified","send_email":true,"email_body":"Hi Dana, thank you for your time on the phone screen for Senior Designer. We have decided not to move forward, and we wish you the best in your search."}'

Example response

{
  "opportunity_id": "2d6f9b83-a41e-4c07-9e52-b8c3a0f17d64",
  "name": "Dana Whitfield",
  "previous_stage": "Phone screen",
  "archived": {
    "reason": "Underqualified",
    "archived_at": "2026-10-22T09:14:00Z"
  },
  "email_sent": true
}

MCP: add https://cotlet.dev/mcp/v1 with the same key; the call is lever_write → archive_opportunity. Example data.

Schedule it in n8n, Make, Zapier or cron

Lever tools this automation uses

Cotlet Lever tools used to archive rejected Lever candidates with a reason and email
Tool Parameters
list_opportunities posting_id, stage, tag, email, archived, cursor
list_archive_reasons none
get_opportunity opportunity_id
archive_opportunity opportunity_id, reason, send_email, email_body
All 12 Lever tools with descriptions

Frequently asked questions

Is it safe to connect Lever to Cotlet?

Yes. You sign in to Lever yourself, in your own Cloud Browser in the EU, and we never save your password. Your agents only get Lever once you enable it, every background request is listed, and the browser profile is stored encrypted with AES-256-GCM, the cipher 1Password uses for its vaults. The AI model never sees a login, posts and messages wait for your OK, and Disable for agents cuts access in one click. Independent scanners grade cotlet.dev A+ on Qualys SSL Labs, securityheaders.com and Mozilla Observatory; live results are on https://cotlet.dev/security.

Give your agent access to Lever.

Free 7-day trial with 2,000 credits, no card needed. Cotlet is independent and not affiliated with Lever.