The anonymous API creates one paste from one JSON request. Start with synthetic text, an unlisted visibility setting, and a short expiration so you can verify the complete lifecycle before automating real work.
Create the first paste
POST JSON to /api/v1/pastes with a required content string. Optional fields include title, language, visibility, expiration, category, tags, password, encryption metadata, and burn-after-read. The response returns the page URL, an eligible raw URL, expiry, and a one-time delete token.
Save capabilities immediately
Treat the delete token as a secret capability. Do not place it in logs, shell history, or the paste itself. Signed-in automation should use a revocable account token instead of collecting anonymous delete tokens across many jobs.
Practical next step: Full API documentation - Review all payload fields and endpoints.
Retrieve and delete deliberately
GET is available only for public or unlisted content that is not password protected or client encrypted. Anonymous deletion uses X-Delete-Token. Check every HTTP status rather than assuming a response body contains the paste.
Action
| Action | Request | Practical meaning |
|---|---|---|
| Create | POST /api/v1/pastes | JSON body; authentication optional. |
| Retrieve | GET /api/v1/pastes/{id} | Available public or unlisted content only. |
| Delete anonymous paste | DELETE /api/v1/pastes/{id} | Send X-Delete-Token. |
| Manage owned pastes | /api/v1/account/pastes | Send a Bearer account token. |
Primary sources and further reading
These references support the standards and implementation concepts used in Pastebin API quickstart. Product behavior is checked separately against Pastebin.ai.
