#
Загрузка текстов
URL: https://api.tempshare.su/upload_text
Content-Type: multipart/form-data
#
Параметры
#
Успешный ответ
{
"success": true,
"data": {
"id": "123",
"preview_url": "https://tempshare.su/text/xyz789abc012",
"raw_url": "https://api.tempshare.su/raw_text/xyz789abc012?password=123",
"expiresAt": "2026-02-05T12:34:56.789Z"
}
}
#
Коды ошибок
#
Примеры запросов
#
cURL
echo "Hello" > temp.txt
curl -X POST https://api.tempshare.su/upload_text -F "file=@temp.txt"
#
Python
import requests
from io import BytesIO
text_file = BytesIO(b"Hello")
text_file.name = "note.txt"
response = requests.post(
"https://api.tempshare.su/upload_text",
files={"file": text_file}
)
print(response.json())