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
POST /api/paste- create a paste (Bearer token required)
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
expiration: one of3600,28800,86400,604800,2592000email: comma-separated list (if Resend is configured)
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:
- Attachments must be images or videos (10MB max per file, up to 10 files).
- Files should be sent as
file_0,file_1, ... to match the web app.