Base URL: https://huseyinboyraz.com.tr/paste/api
Content-Type: application/json
Api Versiyonu: 1.0.0
POST /api
{
"content": "string (required)",
"title": "string (optional, default: 'paste')",
"language": "string (optional, default: 'text')",
"expiration": "string (optional, default: '10m')"
}
10m - 10 Dakika30m - 30 Dakika1h - 1 Saat6h - 6 Saat12h - 12 Saat1d - 1 Gün7d - 7 Gün1M - 1 Ay1y - 1 Yılnever - Asla{
"success": true,
"id": "abc123def456ghi789",
"url": "https://huseyinboyraz.com.tr/paste/abc123def456ghi789",
"expires_at": 1696094400,
"expiration_type": "10m"
}
{
"error": "Content is required"
}
GET /api/{id}
Pasteyi html formatında döndürür
// Paste oluştur
const response = await fetch('https://huseyinboyraz.com.tr/paste/api', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
content: 'console.log("Hello World!");',
title: 'My JavaScript Code',
language: 'javascript',
expiration: '1d'
})
});
const data = await response.json();
console.log('Paste URL:', data.url);
curl -X POST https://huseyinboyraz.com.tr/paste/api \
-H "Content-Type: application/json" \
-d '{
"content": "print(\"Hello World!\")",
"title": "Python Code",
"language": "python",
"expiration": "1h"
}'
import requests
url = "https://huseyinboyraz.com.tr/paste/api"
data = {
"content": "print('Hello World!')",
"title": "Python Script",
"language": "python",
"expiration": "1d"
}
response = requests.post(url, json=data)
result = response.json()
print(f"Paste URL: {result['url']}")
Api, 100+ programlama dili ve formatını destekler: