API docs
Script-friendly paste creation for logs, Markdown, code, and raw text.
POST /api/paste
Creates a paste and returns share, raw, edit, and delete URLs. The aliases type and contentType both work.
Request JSON
{
"title": "hello",
"type": "markdown",
"visibility": "unlisted",
"content": "# Hello\n\nThis is a March7th Paste.",
"password": "optional-view-password",
"burnAfterRead": false,
"expiresIn": "7d"
}curl
curl -X POST https://paste.march7th.cn/api/paste \
-H "Content-Type: application/json" \
-d '{
"title": "hello",
"type": "markdown",
"visibility": "unlisted",
"content": "# Hello\n\nThis is a March7th Paste.",
"password": "optional-view-password",
"burnAfterRead": false,
"expiresIn": "7d"
}'Response JSON
{
"url": "https://paste.march7th.cn/p/xxx",
"raw": "https://paste.march7th.cn/raw/xxx",
"raw_txt": "https://paste.march7th.cn/raw/xxx.txt",
"raw_md": "https://paste.march7th.cn/raw/xxx.md",
"edit_url": "https://paste.march7th.cn/edit/xxx?key=...",
"delete_url": "https://paste.march7th.cn/delete/xxx?key=..."
}Fields and errors
content is required and limited to 512KB. type/contentType can be plain, code, or markdown. visibility is unlisted or public. expiresIn is never, 1d, 7d, or 30d. Password-protected links do not include the password in the URL.
Error codes: 400 invalid input, 401/403 protected or invalid key, 404 missing/expired/deleted, 410 burned,429 rate limited, 503 missing service configuration.
Create rate limit: 5 per minute, 50 per hour, 200 per day per client IP.