fastpaste_API Reference

— documentation

API Reference

FastPaste exposes a REST API at /api/v1/. All requests require a Bearer token. Responses are JSON. Files are base64-encoded in the response body.

// 01

Authentication

Every request must include an Authorization header with your API key as a Bearer token. Keys are 40-character hex strings provisioned when you purchase a plan.

header
Authorization: Bearer a3f1c8e2d94b07651af2...

Missing or invalid keys return 401 Unauthorized.

// 02

Plans

DeveloperPro
Max file size10 MB100 MB
Requests / day1,000Unlimited
Content TTL1 hour24 hours

Your remaining daily quota is returned in every response as requests_remaining and the X-Requests-Remaining header. Quota resets at UTC midnight.

// 03

POST /api/v1/clip — push content

Text

request
curl -X POST https://yourdomain.com/api/v1/clip \
  -H "Authorization: Bearer <key>" \
  -H "Content-Type: application/json" \
  -d '{"text": "hello world"}'

File

request
curl -X POST https://yourdomain.com/api/v1/clip \
  -H "Authorization: Bearer <key>" \
  -F "file=@/path/to/report.pdf"

Response 201

json
{
  "code": "482193",
  "expires_in": 3600,
  "plan": "developer",
  "requests_remaining": 999
}
FieldTypeDescription
codestring6-digit retrieval code
expires_innumberSeconds until the code expires
planstringdeveloper | pro
requests_remainingnumberRemaining quota today

// 04

GET /api/v1/clip/:code — pull content

Retrieves and permanently deletes the clip in one atomic operation. There is no second retrieval.

request
curl https://yourdomain.com/api/v1/clip/482193 \
  -H "Authorization: Bearer <key>"

Response 200 — text

json
{
  "type": "text",
  "data": "hello world",
  "createdAt": 1746876000000
}

Response 200 — file

json
{
  "type": "image",
  "data": "<base64-encoded content>",
  "mimeType": "image/png",
  "createdAt": 1746876000000
}
FieldDescription
typetext | image | pdf | file
dataRaw text, or base64-encoded binary for files
mimeTypeMIME type of the file (omitted for text)
createdAtUnix timestamp (ms) when the clip was created

// 05

Errors

StatusMeaning
400Bad request — invalid code format or missing body field
401Invalid or missing API key
404Code not found or already retrieved (burned)
413Content too large for your plan
415Unsupported file type
429Daily request limit reached — resets at UTC midnight
500Server error

Error body

json
{ "error": "Human-readable description" }

// 06

Supported file formats

SVG is permanently blocked — SVG files can embed <script> tags that execute in the browser. All other validation is server-side against a hardcoded MIME type allowlist; filename extensions are ignored.

CategoryFormats
ImagesJPEG, PNG, GIF, WebP, AVIF, BMP, TIFF
Documents — OfficePDF, DOCX, XLSX, PPTX, DOC, XLS, PPT
Documents — OpenDocumentODT, ODS, ODP
eBooksEPUB
ArchivesZIP, GZ, 7Z, TAR, RAR
TextTXT, CSV, Markdown
AudioMP3, WAV, OGG, AAC, FLAC
VideoMP4, WebM, MOV
FontsTTF, OTF, WOFF, WOFF2