Skip to content

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.


Request body

FieldTypeDefaultDescription
namestringrequiredIdentifier (max 100 chars)
datastringrequiredContent payload (max 1 MB)
expirestring (ISO)–Auto-delete after this date
burnAfterViewbooleanfalseDelete on first read
passwordHashstring–SHA-256 hash for password protection

curl

Terminal window
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];
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
});

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

Terminal window
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);

Returns metadata only (no data field) — useful for building dashboards or searching your store.

Query params

ParamTypeDefaultDescription
namestring–Partial name search (case-insensitive)
limitnumber20Max results (max 100)
offsetnumber0Pagination offset

curl

Terminal window
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 });

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

Terminal window
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 }

curl

Terminal window
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');

StatusReasonDescription
400name and data are requiredMissing required fields
400Data is too long, max 1MBPayload exceeds limit
401password_requiredPaste needs a password
401password_incorrectWrong password provided
401Management token requiredNo API key or management token was provided for update/delete
403Access deniedPaste belongs to another account
404Paste not foundNo matching paste, owner, or management token (or already burned)