Quick paste API
Quick pastes are simple, lightweight storage entries — think of them as schemaless key/value records. They’re ideal for:
- Ephemeral config blobs
- One-time tokens or secrets (with burn-after-view)
- Small JSON payloads under 1 MB
- Any text that doesn’t need the full paste feature set
Quick paste endpoints are available on all tiers (including Free). Creation, update, and deletion are also available without an API key. Anonymous creation has a rolling 24-hour limit per source IP; update and deletion use the private management token returned at creation. Authenticated requests use the account’s monthly quota.
Create a Quick paste
Section titled “Create a Quick paste”POST /api/dev/paste-lite/create
Section titled “POST /api/dev/paste-lite/create”Request body
| Field | Type | Default | Description |
|---|---|---|---|
name | string | required | Identifier (max 100 chars) |
data | string | required | Content payload (max 1 MB) |
expire | string (ISO) | – | Auto-delete after this date |
burnAfterView | boolean | false | Delete on first read |
passwordHash | string | – | SHA-256 hash for password protection |
curl
curl -X POST https://api.anonpaste.com/api/dev/paste-lite/create \ -H "Content-Type: application/json" \ -d '{ "name": "app-config", "data": "{\"theme\":\"dark\",\"lang\":\"en\"}", "burnAfterView": false }'Response
{ "success": true, "id": "a1b2c3d4e5f60718:0123456789abcdef0123", "remaining": 99}Add -H "x-api-key: your_api_key" to use your account quota and make the Quick
paste available to account-authenticated list, update, and delete requests. If any
API-key header is supplied, it must contain a valid key.
The id is a composite string ref:token. The ref is the short identifier used
to retrieve the paste. The token is your private management token — store it if
you need to update or delete a paste without an API key. Send it only in the
X-Manage-Token request header; do not put it in URLs.
SDK
const { id } = await anonpaste.pasteLite.create({ name: 'app-config', data: JSON.stringify({ theme: 'dark', lang: 'en' }),});const ref = id.split(':')[0];Burn-after-view example
Section titled “Burn-after-view example”const { id } = await anonpaste.pasteLite.create({ name: 'one-time-token', data: 'super-secret-token-abc', burnAfterView: true, expire: new Date(Date.now() + 15 * 60 * 1000), // 15 minutes});Get a Quick paste
Section titled “Get a Quick paste”GET /api/dev/paste-lite/get/:ref
Section titled “GET /api/dev/paste-lite/get/:ref”If the paste has burnAfterView: true, it is permanently deleted after this call returns.
If the paste was created with passwordHash, pass the matching hash as a query param.
curl
curl "https://api.anonpaste.com/api/dev/paste-lite/get/a1b2c3d4e5f60718?password=myhashhere" \ -H "x-api-key: your_api_key"Response
{ "success": true, "paste": { "ref": "a1b2c3d4e5f60718", "name": "app-config", "data": "{\"theme\":\"dark\",\"lang\":\"en\"}", "date": "2026-04-12T10:00:00.000Z", "expire": null, "burnAfterView": false }, "remaining": 499}SDK
const paste = await anonpaste.pasteLite.get('a1b2c3d4e5f60718');const config = JSON.parse(paste.data);List Quick pastes
Section titled “List Quick pastes”GET /api/dev/paste-lite/list
Section titled “GET /api/dev/paste-lite/list”Returns metadata only (no data field) — useful for building dashboards or searching your store.
Query params
| Param | Type | Default | Description |
|---|---|---|---|
name | string | – | Partial name search (case-insensitive) |
limit | number | 20 | Max results (max 100) |
offset | number | 0 | Pagination offset |
curl
curl "https://api.anonpaste.com/api/dev/paste-lite/list?name=config&limit=10" \ -H "x-api-key: your_api_key"Response
{ "success": true, "items": [ { "ref": "a1b2c3d4e5f60718", "name": "app-config", "date": "2026-04-12T10:00:00.000Z", "expire": null, "burnAfterView": false, "hasPassword": false } ], "total": 1, "limit": 10, "offset": 0}SDK
const { items, total } = await anonpaste.pasteLite.list({ name: 'config', limit: 10 });Update a Quick paste
Section titled “Update a Quick paste”PUT /api/dev/paste-lite/update/:ref
Section titled “PUT /api/dev/paste-lite/update/:ref”Send the complete replacement values in the request body. When no API key is
provided, send the private token returned by creation in X-Manage-Token.
curl
curl -X PUT https://api.anonpaste.com/api/dev/paste-lite/update/a1b2c3d4e5f60718 \ -H "X-Manage-Token: 0123456789abcdef0123" \ -H "Content-Type: application/json" \ -d '{ "name": "updated-config", "data": "{\"theme\":\"light\",\"lang\":\"en\"}", "burnAfterView": false, "contentType": "plaintext" }'Use x-api-key instead of X-Manage-Token for an account-owned Quick paste.
Response
{ "success": true }Delete a Quick paste
Section titled “Delete a Quick paste”DELETE /api/dev/paste-lite/delete/:ref
Section titled “DELETE /api/dev/paste-lite/delete/:ref”curl
curl -X DELETE https://api.anonpaste.com/api/dev/paste-lite/delete/a1b2c3d4e5f60718 \ -H "X-Manage-Token: 0123456789abcdef0123"Use x-api-key instead for an account-owned Quick paste.
Response
{ "success": true, "remaining": 49 }SDK
await anonpaste.pasteLite.delete('a1b2c3d4e5f60718');Error codes
Section titled “Error codes”| Status | Reason | Description |
|---|---|---|
400 | name and data are required | Missing required fields |
400 | Data is too long, max 1MB | Payload exceeds limit |
401 | password_required | Paste needs a password |
401 | password_incorrect | Wrong password provided |
401 | Management token required | No API key or management token was provided for update/delete |
403 | Access denied | Paste belongs to another account |
404 | Paste not found | No matching paste, owner, or management token (or already burned) |