> DOCS_
Base: https://vershare.uk — All responses JSON unless noted.
Returns a shortlink. JSON body for text/md/code, multipart for file/image.
| Param | Req | Description |
|---|---|---|
type | yes | "text" | "markdown" | "code" | "file" | "image" |
content | yes* | Text body (text/md/code only) |
title | no | Optional display title |
language | no | For code: "javascript", "python", etc. |
file | yes* | Binary file (file/image, multipart) |
# Text
curl -X POST https://vershare.uk/api/shares \
-H 'Content-Type: application/json' \
-d '{"type":"text","content":"Hello!"}'# Code
curl -X POST https://vershare.uk/api/shares \
-H 'Content-Type: application/json' \
-d '{"type":"code","content":"print(42)","language":"python"}'# File
curl -X POST https://vershare.uk/api/shares \
-F type=file -F file=@./doc.pdf# Image
curl -X POST https://vershare.uk/api/shares \
-F type=image -F file=@./pic.pngResponse
{
"id": "aBcDeFgHiJ",
"type": "text",
"createdAt": "2026-03-17T12:00:00Z",
"url": "https://vershare.uk/s/aBcDeFgHiJ",
"raw": "https://vershare.uk/api/shares/aBcDeFgHiJ/raw",
"api": "https://vershare.uk/api/shares/aBcDeFgHiJ"
}ERRORS
400 Bad request 404 Not found 500 Server error
Format: {"error":"message"}