# Lever

Connect Lever so Suger AI can work with your opportunities, postings, and interview feedback.

---

## Overview

[Lever](https://www.lever.co) is a talent acquisition platform combining an applicant tracking system with CRM-style candidate nurturing. Connecting it lets the Suger AI agent read and update your hiring pipeline — opportunities, postings, requisitions, interviews, and feedback — from a Suger workflow or chat.

### Org-Level vs User-Level

> **Org-Level**: Supported. One Lever API key serves the whole organization.
>
> **User-Level**: Not currently available. Lever does support OAuth, but issuing an OAuth client requires acceptance into [Lever's partner integration program](https://hire.lever.co/developer/oauth) — Lever's own team creates the app and sends the credentials after a sandbox build and a live review. Until that completes, Lever is org-only.

### How the connection works

Lever authenticates with HTTP Basic, where the API key *is* the username and the password is empty. Suger stores the key and builds that header for you, so the connect form has a single field.

```d2
shape: sequence_diagram
admin: "Your Suger admin"
lever: "Lever"
suger: "Suger"
agent: "Suger AI agent"
admin -> lever: "Generate an API key (Super Admin)"
admin -> suger: "Paste it into the single User name field"
suger -> suger: "Store the key; Suger supplies the empty password half"
agent -> suger: "Run a Lever tool"
suger -> lever: "HTTP Basic — the key as the username, blank password"
lever -> agent: "Opportunities, postings, requisitions, feedback" { style.stroke-dash: 4 }
```

## Create Integration (Org-Level)

### Prerequisites

- A Lever account on a plan that includes API access.
- **Super Admin** on that Lever account. The API credentials page is not visible to other roles.
- The Suger **Admin** role — connecting, disconnecting, and running an integration's actions are all admin-only in Suger.

### Authenticate by API key

1. In Lever, go to [**Settings → Integrations and API**](https://hire.lever.co/settings/integrations) and open the **API credentials** tab.
2. Generate a new API key and copy it. See Lever's [Generating and using API credentials](https://help.lever.co/hc/en-us/articles/20087297592477-Generating-and-using-API-credentials) for the current walkthrough.
3. In the Suger console, open [Settings → Integrations](https://console.suger.io/settings?tab=integrations) and click **Connect** on **Lever**.
4. Paste the key into **User name** and save.

:::info
The one field is labelled **User name** because Lever authenticates with HTTP Basic where the API key *is* the username. Paste the API key there. There is no separate username, and no password field — Suger supplies the empty password half itself.
:::

<!-- screenshot needed: the "Connect to Lever" dialog showing its single User name field — BLOCKED: the Lever connector is provisioned by the deploy-time migration, so the dialog cannot be reached in a local dev environment on this branch -->

## Suger AI Tools

When Lever is connected, the Suger AI agent can work your hiring pipeline through Suger's built-in tools (61 actions).

> **Org-level**: All tools run under the org API key, so the agent's reach matches that key's permissions.

| Capability | What the agent can do |
|------------|-----------------------|
| **Opportunities** | Create opportunities and move them through the pipeline — stage, archive state, tags, sources, and links (e.g. `create-opportunity`, `update-opportunity-stage`, `update-opportunity-archived`) |
| **Candidate detail** | Read an opportunity's resumes, referrals, panels, file actions, and contact record (e.g. `get-opportunity-resumes`, `update-contact`) |
| **Postings** | Read, list, and update job postings, apply to one, and read posting users (e.g. `get-postings`, `update-posting`, `apply-posting`) |
| **Requisitions** | Full create/read/update/delete on requisitions, plus their configurable fields (e.g. `create-requisition`, `get-requisition-fields`) |
| **Interviews & panels** | Create panels, and update or delete scheduled interviews (e.g. `create-panel`, `update-interview`) |
| **Feedback** | Manage feedback forms and templates end to end (e.g. `create-feedback`, `update-feedback-template`) |
| **Notes** | Add, read, and delete notes on a candidate (e.g. `create-note`, `delete-note`) |
| **Users** | Create users, update them, and deactivate or reactivate accounts (e.g. `create-user`, `deactivate-user`) |
| **Webhooks** | Create, list, and delete Lever webhooks (e.g. `create-webhook`, `get-webhooks`) |
| **Reference data** | Read stages, archive reasons, disposition stages, sources, and tags (e.g. `get-stages`, `get-archive-reasons`) |
| **Compliance** | Read EEO survey responses — anonymous (`get-eeo-responses`) or including personally identifiable information (`get-eeo-responses-pii`) |
| **Deletion audit** | List records Lever has deleted — applications, opportunities, and postings (e.g. `get-opportunities-deleted`) |

:::warning
`get-eeo-responses-pii` returns EEO survey responses **including personally identifiable information**, where `get-eeo-responses` returns the anonymous set. Treat the first as regulated personal data, and only let an agent reach it when your own policy allows.
:::

:::tip
Open the integration from **Settings → Integrations** to see the exact tool list for your connection on its **Actions** tab, and to try a call on the **Playground** tab. The Playground pre-fills only the inputs an action *requires* — add optional ones yourself when you need them.
:::

## Edit Integration

Editing is not supported. To rotate the key or point Suger at a different Lever account, delete the integration and create it again.

## Delete Integration

Click the 🗑️ button next to **Lever** in the **Integrations** list. The stored key is destroyed with the integration record, and any workflow or agent depending on Lever tools stops working immediately. Revoke the key in Lever too if you want to cut access from that side.
