paste2.md

Developer API

Create temporary Markdown, code and log pastes from your tools.

The MVP API accepts anonymous JSON requests and returns share/delete links for automation, debugging workflows and AI tool output sharing.

Create a paste

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.

Request body

{
  "title": "Optional title",
  "content": "Required paste content",
  "format": "MARKDOWN",
  "expiresInHours": 24,
  "burnAfterRead": false,
  "password": "optional-password"
}

Response body

{
  "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.

Privacy

Add password for gated access or burnAfterRead for one-time reads. Read the private paste guide.

AI workflows

Use the API to create temporary links for prompts, model output and agent traces. See AI prompt sharing.