API documentation

The API lets you create pastes from scripts and CLIs with the same feature set as the web app: text, optional attachments, optional expiration, and optional email delivery.

Authentication

API requests require a Bearer token.

Endpoints

Create a paste (text only)

curl -X POST https://scribble.fyi/api/paste \
  -H "authorization: Bearer YOUR_API_TOKEN" \
  -F "text=hello from the api" \
  -F "expiration=3600"

Create a paste with attachments

curl -X POST https://scribble.fyi/api/paste \
  -H "authorization: Bearer YOUR_API_TOKEN" \
  -F "text=log bundle" \
  -F "file_0=@./screenshot.png" \
  -F "file_1=@./clip.webm"

Optional fields

Response

{
  "id": "AbCdEf123456",
  "url": "https://scribble.fyi/p/AbCdEf123456",
  "rawUrl": "https://scribble.fyi/r/AbCdEf123456",
  "created": 1738560000000,
  "expiration": 3600,
  "files": [
    {
      "filename": "1h-AbCdEf123456_0_1738560000000.png",
      "originalName": "screenshot.png",
      "size": 12345,
      "type": "image/png"
    }
  ]
}

Notes: