# Lever 400 "posting must be published" when the agent posts candidates to a draft req

## TL;DR

The req is still a draft, and Lever refuses candidates on unpublished postings. Either publish the req (if it is ready) or point the agent at the correct published req. Draft reqs are not hiring targets.

```text
400 Bad Request: "posting must be published"
```

## Steps

1. Check the posting's state in Lever: draft vs published.
   Expected: It is a draft.

2. Decide: if the req is ready, publish it; if not, find the correct published req for these candidates.
   Expected: The target is a real, published posting.

3. Point the agent at the published posting ID.
   Expected: Candidate posts succeed.

4. Add a pre-post check: verify the posting is published before creating candidates against it.
   Expected: Draft targets fail fast with a clear message.

5. Review how the agent got a draft ID: stale config, wrong environment, or a copy-paste.
   Expected: The source of the bad ID is fixed.

## When to use

- Lever 400s with "posting must be published"
- the agent posts to a specific req
- reqs have a draft workflow

## When not to use

- the posting is published (check for a typo in the ID)
- the error is a different 400 (read the message)
- candidates go to a general pool, not a req (different endpoint)

## Tool compatibility

- Lever API
- posting lifecycle

## Variant phrasings

- "lever 400 posting must be published"
- "lever draft posting candidate"
- "posting not published lever api"

## Why it happens

Lever models the req lifecycle explicitly: drafts are works in progress, and the API enforces it. Agents that hardcode posting IDs or copy them from the wrong environment hit drafts. The 400 is the API protecting the hiring process from half-ready reqs.

## Edge cases

- publishing a req has side effects (it goes live); do not publish just to satisfy the agent
- sandbox and production posting IDs differ; environment mixups are the usual source
- the pre-post check should cache the published state briefly, not call per candidate

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_WB5yvhL30iD4ch0s_GFxLg
