PASTEN.CCPASTEN.CC
New PasteExploreAPI
/
Sign InSign Up

Pasten REST API

Create, query, and delete pastes programmatically from scripts, CI pipelines, and developer tools. Authenticated endpoints accept a Bearer API key in the Authorization header.

Create a free account to generate up to 10 API keys from Settings.

Authentication

Generate keys in Settings → API Keys and send your key as a Bearer token:

Authorization: Bearer pv_your_api_key_here

Base URL

https://www.pasten.cc/api/v1

Endpoints

GET
/api/v1/pastes

List public pastes, or your own pastes when authenticated. Supports ?page, ?limit (max 50), ?language, and ?tag.

POST
/api/v1/pastes

Create a new paste. Requires a valid Bearer API key.

GET
/api/v1/pastes/:slug

Fetch a single paste by slug. Private pastes require owner authentication; password-protected and burn-after-read pastes must be opened in the browser.

DELETE
/api/v1/pastes/:slug

Soft-delete a paste you own. Requires authentication.

Create a Paste

POST /api/v1/pastes

curl -X POST https://www.pasten.cc/api/v1/pastes \
  -H "Authorization: Bearer pv_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "console.log(\"hello world\")",
    "title": "Hello World",
    "language": "javascript",
    "visibility": "public",
    "tags": ["js", "example"]
  }'
FieldTypeRequiredDescription
contentstringYesPaste text or code (max 512 KB)
titlestringNoOptional title (max 150 chars)
languagestringNoSyntax language (default: plaintext)
visibilitystringNopublic | private | unlisted (default: public)
burn_after_readbooleanNoPermanently delete after first confirmed reveal
tagsstring[]NoUp to 10 short tags

Rate Limits

Authenticated requests are limited to 100 requests per minute per API key (anonymous reads: 60 req/min per IP). Exceeding the limit returns 429 Too Many Requests with a Retry-After header.

PASTEN.CCPASTEN.CC

Fast, privacy-first code and text sharing for developers. Syntax highlighting across 40+ languages, burn-after-read, password locks, and REST API.

Product

  • New Paste
  • Explore Pastes
  • Search
  • Changelog

Developers

  • API Docs
  • System Status
  • API Keys

Legal

  • Privacy Policy
  • Terms of Service
  • DMCA & Abuse

© 2026 Pasten. All rights reserved.

Press / to search pastes