FastPaste API
FastPaste REST API v1
Getting Started
The FastPaste API lets you create, retrieve and delete pastes programmatically.
Authentication
All API requests require the X-API-Key header:
Base URL
Response Format
All responses are in JSON format:
POST /api/v1/paste
Creates a new paste.
Text Paste (JSON)
| Parameter | Type | Required | Description |
|---|---|---|---|
content | string | Yes | Paste content (min 3, max 4.00 MB) |
title | string | No | Paste title |
description | string | No | Description (max 500 characters) |
expiry | string | No | Duration: 10m, 30m, 1h, 3h, 6h, 12h, 1d, 2d, 3d, 1w, 2w, 1m, never (default: 1d) |
password | string | No | Password protection |
burn | boolean | No | View once and delete. If true, the paste is automatically deleted after the first view (default: false). |
encrypt | boolean | No | End-to-end encryption. If true, content must be a client-encrypted "fpe1:..." string (see the E2E section). Default: false. |
key | string | No | Base64url decryption key. Optional; used only to append #key to the returned link and is never stored on the server. Leave empty to keep the key fully client-side. |
downloadable | boolean | No | Makes an E2E encrypted paste downloadable (default: false). Meant to be used with encrypt=true; on non-encrypted pastes it has no effect and the response includes a warning (non-encrypted pastes are always downloadable anyway). |
language | string | No | Syntax highlighting language (e.g. python, javascript). Auto-detected if omitted; for E2E it is stored to highlight after decryption. |
public | boolean | No | If true, the paste is listed in the public archive and sitemap. Defaults to false. Ignored when a password, burn-after-read or encryption is used. |
slug | string | No | Custom short address (e.g. "my-notes" → /view/my-notes). If taken, a similar one is assigned. |
File Upload (multipart/form-data)
| Parameter | Type | Required | Description |
|---|---|---|---|
file | file | Yes | File to upload (max 10.00 MB) |
description | string | No | File description |
expiry | string | No | Expiry |
password | string | No | Password protection |
burn | boolean | No | View once and delete. If true, the paste is automatically deleted after the first view (default: false). |
encrypt | boolean | No | End-to-end encryption. If true, content must be a client-encrypted "fpe1:..." string (see the E2E section). Default: false. |
key | string | No | Base64url decryption key. Optional; used only to append #key to the returned link and is never stored on the server. Leave empty to keep the key fully client-side. |
downloadable | boolean | No | Makes an E2E encrypted paste downloadable (default: false). Meant to be used with encrypt=true; on non-encrypted pastes it has no effect and the response includes a warning (non-encrypted pastes are always downloadable anyway). |
End-to-End Encryption (E2E)
Encrypt the content on your side with AES-GCM (256-bit), then send the ciphertext as content. The server stores only the encrypted data and never sees the plaintext. The same format as the web interface is used.
Ciphertext format: fpe1:<base64(iv)>:<base64(ciphertext)> — where iv is a random 12-byte value and the ciphertext includes the GCM tag.
GET /api/v1/paste/{id}
Retrieves the details and content of a paste.
PUT /api/v1/paste/{id}
Updates an existing paste (only those owned by this API key). Send only the fields you want to change: content (text only), title, description, expiry, burn, password, language, downloadable. If content is "fpe1:...", include encrypt and key.
Example Request (cURL)GET /api/v1/pastes
Lists pastes created with this API key (newest first). Pagination: page and limit (1–100).
Example Request (cURL)GET /api/v1/paste/{id}/raw
Returns paste content as plain text. Suitable for scripts and automation.
ExampleResponse: Content-Type: text/plain
DELETE /api/v1/paste/{id}
Deletes a paste. Only pastes created with the same API key can be deleted.
ExamplePOST /api/v1/cli
Quickly create pastes from the command line (curl). Send content as a raw request body from stdin, or as a form field (content/paste/f:1). The default response is a plain-text URL.
Parameter
| Parameter | Type | Required | Description |
|---|---|---|---|
(gövde) | raw / form | Yes | Paste content. For raw body, text/plain is recommended (so = and & are preserved). |
expiry | string | No | Duration: 10m, 30m, 1h, 3h, 6h, 12h, 1d, 2d, 3d, 1w, 2w, 1m, never (default: 1d) |
title | string | No | Paste title |
lang | string | No | Syntax highlighting language (e.g. python, javascript). Auto-detected if omitted; for E2E it is stored to highlight after decryption. |
burn | boolean | No | View once and delete. If true, the paste is automatically deleted after the first view (default: false). |
Accept: application/json veya ?json=1 ile JSON döner. GET /api/v1/cli kullanım örneklerini gösterir.
Allowed File Extensions
.txt
.log
.json
.xml
.yaml
.yml
.ini
.cfg
.conf
.md
.csv
.sql
.js
.ts
.html
.htm
.css
.py
.java
.go
.rs
.c
.cpp
.h
.hpp
.lua
.rb
.jsx
.tsx
.vue
.svelte
.scss
.sass
.less
.toml
.gitignore
.dockerfile
.makefile
.bat
.ps1
.r
.swift
.kt
.kts
.scala
.pl
.pm
.tcl
.awk
.sed
.diff
.patch
.tf
.hcl
.proto
.graphql
.tex
.bib
.rst
.adoc
.org
.wiki
.properties
.gradle
.cmake
.mak
Rate Limits
Separate rate limits can be defined for each API key:
| Limit Type | Description |
|---|---|
| Hourly Limit | Maximum requests per hour (0 = unlimited) |
| Daily Limit | Maximum requests per day |
| Monthly Limit | Maximum requests per month |
When the limit is exceeded, a 429 Too Many Requests response is returned.
Error Codes
| Code | Meaning |
|---|---|
400 | Bad request (missing or invalid parameter) |
401 | API key missing |
403 | Invalid/inactive API key or access denied |
404 | Paste not found or expired |
405 | HTTP method not allowed |
413 | File size too large |
429 | Rate limit exceeded |
500 | Server error |
503 | API disabled |
Webhook Notifications
A separate webhook URL can be configured per API key. A POST request is sent when a new paste is created:
Get an API Key
Contact the administrator to get an API key or to increase your limit.
Contact Administrator