Secure API & CLI for developers
Expiring links from your terminal and your pipelines
Send a build log, a key or a config with one request. You get back a link that deletes itself after an hour, a week, or the first read.
- REST + CLI
- Expiry 1h–30d
- Burn after reading
- 5,000 requests/day
curl https://api.zerohost.net/v1/share \ -H "X-API-Key: $ZEROHOST_API_KEY" \ -H "Content-Type: application/json" \ -d '{"text": "DB_PASSWORD=hunter2", "expires_in": "1h", "burn_after_reading": true}'
# npm i -g zerohost-cli echo "DB_PASSWORD=hunter2" | zerohost --expires 1h --burn
- name: Share the failing build log if: failure() run: | npx zerohost-cli --file build.log --expires 24h \ --api-key "${{ secrets.ZEROHOST_API_KEY }}"
const res = await fetch("https://api.zerohost.net/v1/share", { method: "POST", headers: { "X-API-Key": process.env.ZEROHOST_API_KEY, "Content-Type": "application/json" }, body: JSON.stringify({ text, expires_in: "1h" }) }); const { url } = await res.json();
201 Created
{
"url": "https://zerohost.net/share/9f2c…",
"expires_at": "2026-11-21T10:42:00Z",
"expires_in": 3600
}
Three steps, then it’s gone
-
01
Send it
POST the text, or pipe it to the CLI. Up to 1 MB, encrypted in transit and at rest.
-
02
Share the link
Drop it in the PR, the incident channel or the ticket. Add a password if the channel is wide.
-
03
It deletes itself
At expiry, or on first read with burn after reading. Gone for good within a day, nothing to rotate later.
Where it fits
Real workflows, each a few lines.
- name: Share build log on failure if: failure() run: | URL=$(npx zerohost-cli --file build.log --expires 24h --silent \ --api-key "${{ secrets.ZEROHOST_API_KEY }}") gh pr comment "$PR" --body "Build log (expires in 24h): $URL"
docker compose logs --tail 500 api \ | zerohost --expires 6h --reference INC-42 --copy
npm audit --json \ | zerohost --expires 7d --password "$AUDIT_PASSWORD"
zerohost --burn --expires 1h --qr "STRIPE_KEY=sk_live_…" # the first person to open it destroys it
# public share curl https://api.zerohost.net/v1/share/$ID # password-protected share curl -X POST https://api.zerohost.net/v1/share/$ID \ -H "Content-Type: application/json" \ -d '{"password": "…"}'
The API at a glance
Authenticate with an X-API-Key header. The full reference has every field and error.
| Endpoint | Does |
|---|---|
POST /v1/share | Create a share, returns its URL |
GET /v1/share/{id} | Read a share (counts as the read for burn) |
POST /v1/share/{id} | Read a password-protected share |
GET /v1/share/{id}?meta=1 | Expiry and flags, never consumes it |
| Field | Values |
|---|---|
text | Up to 1 MB |
expires_in | 1h 6h 24h 3d 7d 30d |
password | Optional |
burn_after_reading | true / false |
The CLI
Pipe anything into it. Works in scripts, CI and over SSH.
npm i -g zerohost-cli zerohost --login
| Flag | Does |
|---|---|
-f, --file | Share a file |
-e, --expires | 1h to 30d |
-p, --password | Require a password |
-b, --burn | Delete on first read |
-c, --copy / -q, --qr | Copy the link / show a QR code |
What you need
Pro
$7/month
Unlimited shares, API and CLI access (5,000 requests a day), expiry up to 30 days, burn after reading.
Get an API key