Paste API - GET /paste/{id} for Stored Snippets
REST-convention read endpoint. Pass the paste ID in the URL path and receive the stored content, language tag, and creation timestamp. Returns 404 NOT_FOUND when the paste has expired or never existed.
Code examples
curl -X POST https://api.botoi.com/v1/paste/{id} \
-H "Content-Type: application/json" \
-d '{"id":"f9e8d7c6"}'When to use this API
"Shared snippet" viewer pages
Build a /p/{id} route in your app that hits GET /v1/paste/{id} server-side, feeds the content into a Shiki or Prism highlighter on the language tag, and renders the result. GET makes the response cacheable at your CDN layer.
Config pulls from deployment scripts
Store a deploy config as a paste and let your script curl the GET path. The language tag doubles as a content-type hint for downstream processors (yaml, json, toml).
Chat-bot snippet lookup
Wire a Slack or Discord bot command like /paste f9e8d7c6. The bot hits the endpoint, formats the content in a code block, and posts it back. No POST body gymnastics needed.
Frequently asked questions
What happens when the paste has expired?
Is there any access control?
How large can the returned content be?
Get your API key
Free tier includes 5 requests per minute with no credit card required. Upgrade for higher limits.