Formats
Use MARKDOWN, CODE, LOG, JSON, YAML or TEXT. See code paste, log paste and JSON/YAML paste.
Developer API
The MVP API accepts anonymous JSON requests and returns share/delete links for automation, debugging workflows and AI tool output sharing.
curl -sS -X POST https://paste2.md/api/pastes \
-H 'Content-Type: application/json' \
-d '{
"title": "Build log",
"content": "## Error log\\n```text\\nstack trace here\\n```",
"format": "MARKDOWN",
"expiresInHours": 24,
"burnAfterRead": false
}'
Use POST /api/pastes with JSON. burnAfterRead is optional and defaults to false when omitted. Add /raw to any share URL (for example /p/abc123def456/raw) to fetch the original plain-text body for scripts, curl, CI logs, or AI agents.
{
"title": "Optional title",
"content": "Required paste content",
"format": "MARKDOWN",
"expiresInHours": 24,
"burnAfterRead": false,
"password": "optional-password"
}
{
"url": "https://paste2.md/p/abc123def456",
"deleteUrl": "https://paste2.md/p/abc123def456/delete/012345...",
"slug": "abc123def456"
}
The response includes the public url, private deleteUrl, and stable paste slug. Keep the delete URL private.
Use MARKDOWN, CODE, LOG, JSON, YAML or TEXT. See code paste, log paste and JSON/YAML paste.
Add password for gated access or burnAfterRead for one-time reads. Read the private paste guide.
Use the API to create temporary links for prompts, model output and agent traces. See AI prompt sharing.