Staplehire CLI failures return structured JSON on stderr and stable exit codes so humans, scripts, and agents can recover predictably.Documentation Index
Fetch the complete documentation index at: https://staplehire.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart
Rundoctor first when a command fails unexpectedly.
Exit codes
| Code | Meaning | Typical fix |
|---|---|---|
1 | Generic or internal error | Retry or inspect requestId |
2 | Authentication, usually 401 | Run staplehire login or set STAPLEHIRE_KEY |
3 | Validation, usually 400 | Fix the flagged field or missing argument |
4 | Not found, usually 404 | List resources and use a real ID |
5 | Conflict, usually 409 | Reuse the existing resource or change unique fields |
6 | Permission, usually 403 | Check key organization and user permissions |
7 | Upstream, usually 502 | Retry later or contact support with requestId |
8 | CLI usage or bad args | Run staplehire <command> --help or staplehire commands |
9 | Poll timeout | Re-run jobs poll with a longer timeout |
AuthenticationError
The CLI could not resolve or validate an API key.ValidationError
A required value is missing or invalid..error.field, then rerun the command.
NotFoundError
A role, candidate, design, stage, or job ID does not exist or is not visible to the current organization.ConflictError
A resource already exists, commonly a duplicate candidate email on the same role.Poll timeout
Exit code9 means jobs poll stopped waiting. It does not necessarily mean the job failed.
FAQ
Where does error JSON print?
Errors print to stderr. Successful data prints to stdout.What should I send to support?
Send.error.requestId, the command, and the timestamp.
Why did jobs poll exit with code 9?
The timeout elapsed. The job may still be running, so inspect it with jobs get or poll again.
Related: Authenticate the Staplehire CLI · Poll Staplehire CLI jobs · Command reference