API documentation

Free pastebin for text and code. Create a paste, share a link, download raw text and choose when it expires. No account needed.

Base URL: https://freepastebin.com. Public access with no accounts, API keys or application rate limits. All APIs support cross-origin requests. Private pastes require their read token for all content reads. Use the OpenAPI specification for machine-readable request and response schemas.

Send POST bodies as JSON or URL-encoded form data unless an endpoint specifies a raw body. Prefer POST for sensitive content. Errors return JSON with error.code and error.message. See the usage notes for request bounds and usage notes.

GET /api/pastes

Create a paste. Save delete_token and, for private pastes, read_token. Private share URLs carry the read token in a browser-only fragment.

content query · required
UTF-8 paste content, maximum 1 MiB.
title query
Optional title.
language query
Language label. Default: "text".
expires_in query
Retention in seconds. 0 means never. Maximum 10 years. Default: 2592000.
visibility query
Public pastes are indexable. Private pastes require the returned read_token; stored content remains available to the service operator. Default: "public". Allowed: public, private.

POST /api/pastes

Create a paste. Save delete_token and, for private pastes, read_token. Private share URLs carry the read token in a browser-only fragment.

content body · required
UTF-8 paste content, maximum 1 MiB.
title body
Optional title.
language body
Language label. Default: "text".
expires_in body
Retention in seconds. 0 means never. Maximum 10 years. Default: 2592000.
visibility body
Public pastes are indexable. Private pastes require the returned read_token; stored content remains available to the service operator. Default: "public". Allowed: public, private.

GET /api/pastes/{id}

Retrieve paste content and metadata. Private pastes require a read token.

id path · required
Paste ID.
read_token query
Private read token; prefer Authorization: Bearer <read_token>.
Authorization header
For a private paste, Bearer <read_token>. The read token cannot delete a paste.

DELETE /api/pastes/{id}

Delete using Authorization: Bearer <delete_token>.

id path · required
Record identifier.
Authorization header · required
string

GET /raw/{id}

Retrieve raw UTF-8 text. Supports HEAD and If-None-Match. Private reads are authorized before conditional responses.

id path · required
Paste ID.
read_token query
Private read token; prefer Authorization: Bearer <read_token>.
Authorization header
For a private paste, Bearer <read_token>. The read token cannot delete a paste.

GET /{id}

View escaped paste HTML. Private pastes require a read token and are not indexable.

id path · required
Paste ID.
read_token query
Private read token. Share URLs use #read_token=... in the browser.
Authorization header
For a private paste, Bearer <read_token>. The read token cannot delete a paste.

POST /api/pastes/{id}/delete

Delete with the creation token.

id path · required
Paste ID.
delete_token body · required
Deletion token.

GET /docs

Server-rendered HTML API reference.

GET /robots.txt

Crawler access rules and sitemap location.

GET /sitemap.xml

Public documentation sitemap.

GET /health

Worker liveness (does not probe external dependencies).

GET /llms.txt

Plain-text agent usage guide.