Worlds / Hr and identity
Lever API
A local Lever with postings, opportunities, pipeline stages, interviews, feedback forms and requisitions. Test the recruiting agent that advances, archives and schedules candidates across postings.
- Base path
/v1- Auth
- API key over HTTP basic auth, the world key
- Endpoints
- 14
- Status
- Active today
This reference previews the surface the Lever world serves in the closed beta. Paths mirror the public Lever API; the exact subset is confirmed when your workflow is scoped.
Connect
The run gives your agent these bindings. Keep your SDK; change only where it sends requests.
| binding | meaning |
|---|---|
WORLDS_LEVER_URL | This world's origin followed by /v1 |
WORLDS_API_KEY | The world key, accepted wherever Lever expects a credential |
WORLDS_WORLD_ID | The isolated world's identity |
const base = process.env.WORLDS_LEVER_URL;
const auth = Buffer.from(process.env.WORLDS_API_KEY + ":").toString("base64");
const res = await fetch(base + "/v1/opportunities?limit=20", {
headers: { Authorization: "Basic " + auth },
});
const { data } = await res.json();API reference
Opportunities
A candidate's pursuit of a role, with stage and owner.
- GET
/v1/opportunitiesList opportunities - POST
/v1/opportunitiesCreate an opportunity - GET
/v1/opportunities/{id}Get an opportunity - PUT
/v1/opportunities/{id}/stageMove an opportunity to a stage - PUT
/v1/opportunities/{id}/archivedArchive an opportunity
Fields · 6
id | string | Opportunity id |
name | string | Candidate name |
emails | array | Email addresses |
stage | string | Current stage id |
owner | string | Owning user id |
archived | object | Archive reason and time |
Postings
Public job postings.
- GET
/v1/postingsList postings - GET
/v1/postings/{id}Get a posting - POST
/v1/postingsCreate a posting
Fields · 5
id | string | Posting id |
text | string | Title |
state | string | published, internal, closed, draft or pending |
team | string | Team |
categories | object | Location, commitment and department |
Feedback
Interview feedback forms and their ratings.
- GET
/v1/opportunities/{id}/feedbackList feedback for an opportunity - GET
/v1/opportunities/{id}/interviewsList interviews for an opportunity - POST
/v1/opportunities/{id}/notesAdd a note
Fields · 5
id | string | Feedback id |
type | string | interview or note |
user | string | Author user id |
fields | array | Form answers and scores |
completedAt | integer | Completion time in ms |
Stages and users
Pipeline stages and the users who work them.
- GET
/v1/stagesList stages - GET
/v1/usersList users - GET
/v1/users/{id}Get a user
Fields · 4
id | string | Stage or user id |
text | string | Stage name |
name | string | User name |
accessRole | string | Role of the user |
Test workflow
- Prepare. Select the Lever setup for your workflow and review its starting records, including opportunities, postings, feedback.
- Connect. Configure your agent with this world's URL and key using the SDK example. Check that it reaches the intended API before running a test.
- Define. Describe the task, expected final changes and records that must stay untouched. Keep expected outcomes separate from the agent's instructions.
- Run and inspect. Use the dashboard or your workflow's generated CLI setup. Review final records and changes, then rerun from the same starting setup with the relevant failure conditions. Use Deployment and CI to automate the same workflow.
What to verify
- opp 9f21 moved to On-site interview
- opp 9e88 archived with reason Withdrew
- opp 9e40 still at Offer
- opp 9f30 unchanged
- Requisition R-12 unchanged
Test file
A task file names the jobs, the policy your agent is given and what the grader reads back from the world's final state. The agent never sees the expected outcomes.
# worlds/tasks.yaml · Lever
version: 2
connector: lever
seed: lever-starter
mode: isolated
policy: >
Clean up the Product Designer pipeline. Advance anyone with complete
positive feedback and archive withdrawn candidates with reason Withdrew. Do
not touch anyone at Offer.
tasks:
- id: advance-opportunities-when-feedback-is-complete
prompt: Advance opportunities when feedback is complete
- id: archive-with-the-right-archive-reason
prompt: Archive with the right archive reason
- id: link-opportunities-to-the-correct-requisition
prompt: Link opportunities to the correct requisition
expected:
- opp 9f21 moved to On-site interview
- opp 9e88 archived with reason Withdrew
- opp 9e40 still at Offer
- opp 9f30 unchanged
- Requisition R-12 unchanged
scenarios:
- rate-limited
- missing-perform-as
- bad-stage-idSee Tasks and outcomes for every field, and Deployment and CI to run the file on every pull request.
Failure conditions
Each one fires before the handler, at the same step on every run.
| condition | what the agent sees |
|---|---|
rate-limited | The API returns 429 past its request rate |
missing-perform-as | Writes without perform_as are rejected |
bad-stage-id | Moving to an unknown stage returns 400 |
key-revoked | The API key is revoked and calls return 401 |
Starting data
Start each run from the same records and relationships. The overview below describes the Lever starter; use the setup supplied for your workflow when preparing your own snapshot.
| Records | Starting setup |
|---|---|
| postings | 10 published postings with owners and hiring managers |
| opportunities | 200 across New lead, Phone screen, On-site interview and Offer |
| feedback | Feedback forms, complete and outstanding |
| requisitions | 6 requisitions with headcount and status |
| archive reasons | Hired, Underqualified, Withdrew, Position filled |
The record shapes below reuse this world's API field definitions. They show illustrative values and placeholders, not an importable seed. API responses and seed input can differ; include all required records and references in the accepted import format for your workflow.
Opportunities records
Opportunities
A candidate's pursuit of a role, with stage and owner.
| Field | Type | Meaning / relationship |
|---|---|---|
id | string | Opportunity id |
name | string | Candidate name |
emails | array | Email addresses |
stage | string | Current stage id |
owner | string | Owning user id |
archived | object | Archive reason and time |
{
"id": "<Opportunity id>",
"name": "<Candidate name>",
"emails": [],
"stage": "<Current stage id>",
"owner": "<Owning user id>",
"archived": {}
}Postings records
Postings
Public job postings.
| Field | Type | Meaning / relationship |
|---|---|---|
id | string | Posting id |
text | string | Title |
state | string | published, internal, closed, draft or pending |
team | string | Team |
categories | object | Location, commitment and department |
{
"id": "<Posting id>",
"text": "<Title>",
"state": "<published, internal, closed, draft or pending>",
"team": "<Team>",
"categories": {}
}Feedback records
Feedback
Interview feedback forms and their ratings.
| Field | Type | Meaning / relationship |
|---|---|---|
id | string | Feedback id |
type | string | interview or note |
user | string | Author user id |
fields | array | Form answers and scores |
completedAt | integer | Completion time in ms |
{
"id": "<Feedback id>",
"type": "<interview or note>",
"user": "<Author user id>",
"fields": [],
"completedAt": 1
}Stages and users records
Stages and users
Pipeline stages and the users who work them.
| Field | Type | Meaning / relationship |
|---|---|---|
id | string | Stage or user id |
text | string | Stage name |
name | string | User name |
accessRole | string | Role of the user |
{
"id": "<Stage or user id>",
"text": "<Stage name>",
"name": "<User name>",
"accessRole": "<Role of the user>"
}