API 參考
建立文字分享
建立可透過短網址存取的文字內容,例如純文字、程式碼片段或 Markdown。
POST
Text content and settings
application/json- body
content*stringThe text content you want to share (up to 2MB)
Length
length <= 2097152custom_slug?stringYour preferred custom slug. If not provided, a random slug will be generated.
Length
length <= 255domain?stringThe domain to use for your text sharing URL (e.g., "fs.to")
Length
length <= 255Default
"fs.to"expire_at?integerUnix timestamp when this text sharing should expire
password?stringOptional password to protect this text sharing (3-32 characters)
Length
3 <= length <= 32tag_ids?array<integer>Array of tag IDs to organize this text (max 5 tags)
Items
0 <= items <= 5text_type?stringContent format: "plain_text" for regular text, "source_code" for code with syntax highlighting, or "markdown" for formatted text
Value in
"plain_text""source_code""markdown"title*stringA descriptive title for this text sharing (required)
Length
length <= 255OK
application/json- response
code?integerResponse status code (200 indicates success)
data?Text sharing creation response
message?stringHuman-readable status message
curl -X POST 'https://s.ee/api/v1/text' \ -H 'Authorization: string' \ -H 'Content-Type: application/json' \ -d '{ "content": "string", "title": "string"}'Example Response200
{ "code": 0, "data": { "custom_slug": "string", "short_url": "string", "slug": "string" }, "message": "string"}