Archive opportunity
Archives an opportunity with an archive reason and can email the candidate.
POST https://cotlet.dev/api/v1/lever/opportunities/{opportunity_id}/archive
write Confirm
Archives only the opportunity you name, not the candidate's other active opportunities. With send_email the email goes out in the same step, as with Archive + Send Now in Lever, and it cannot be recalled. A reason that your account does not define fails with an error that lists the reasons. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| opportunity_id string required | string | Opportunity ID from list_opportunities. |
| reason string required | string | Archive reason name from list_archive_reasons. |
| send_email boolean | boolean | true sends an email to the candidate as part of archiving. Default: false. |
| email_body string | string | Text of the email. Required when send_email is true. |
Request
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."}' result = client.call("lever", "archive_opportunity", {"opportunity_id":"2d6f9b83-a41e-4c07-9e52-b8c3a0f17d64","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."}) const result = await cotlet.call('lever', 'archive_opportunity', {"opportunity_id":"2d6f9b83-a41e-4c07-9e52-b8c3a0f17d64","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."}); cotlet call lever archive_opportunity --data '{"opportunity_id":"2d6f9b83-a41e-4c07-9e52-b8c3a0f17d64","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
}