Advertisement

U3com Sharer API v1

REST API for uploads, pastes, short links and account data. ShareX-compatible — generate a ready-made .sxcu profile from API tokens.

Basics

Base URL
https://u3com.com/api/v1
Auth
Authorization: Bearer <token>
Rate limit
120 req/min per token

Tokens are created at dashboard → API tokens and carry ability scopes (e.g. uploads:create). Suspended accounts get 403 {error.code: account_suspended}.

Response envelope

{
  "success": true,
  "data": { ... }
}
// or
{
  "success": false,
  "error": { "code": "quota", "message": "..." }
}

Endpoints

Method & pathScopePurpose
POST /uploads/inituploads:createStart a chunked upload → node URL + capability ticket
GET /uploads/{id}uploads:readUpload session state
POST /uploads/{id}/completeuploads:createFinalize a chunked upload
POST /uploads/multipartuploads:createOne-shot upload (ShareX path), ≤ 50 MB
POST /pastespastes:createCreate a paste/snippet
GET /pastes/{id}pastes:readPaste metadata (body for owner)
GET /items/{id}items:readItem metadata
PATCH /items/{id}items:updateEdit title, visibility, expiry, password
DELETE /items/{id}items:deleteDelete an item
POST /short-linksshortlinks:createCreate a short link
GET /short-linksshortlinks:readList your links
PATCH /short-links/{id}shortlinks:updateEdit destination/status/expiry
DELETE /short-links/{id}shortlinks:deleteDisable a link
POST /collectionscollections:createCreate an album
GET /analytics/{item}items:readPer-item event stats
POST /reportspublicAbuse report (no auth, 10/min)

Upload a file (ShareX path)

curl -F file=@photo.png \
     -H "Authorization: Bearer $TOKEN" \
     https://u3com.com/api/v1/uploads/multipart

# → data.view_url, data.thumbnail_url, data.deletion_url

Chunked upload (large files)

# 1. Allocate a session
curl -X POST https://u3com.com/api/v1/uploads/init \
     -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
     -d '{"filename":"video.mp4","size":52428800,"sha256":""}'
# → data.node_upload_url, data.upload_capability, data.chunk_size

# 2. PUT each chunk to the node (chunked by data.chunk_size)
curl -X PUT "$NODE_UPLOAD_URL/chunks/$N" -H "Authorization: Ticket $CAP" --data-binary @chunk

# 3. Finalize
curl -X POST https://u3com.com/api/v1/uploads/$UPLOAD_ID/complete \
     -H "Authorization: Bearer $TOKEN"

The capability ticket is bound to the upload session — one ticket serves all of its chunks. Re-issue via a new uploads/init with the same Idempotency-Key to resume.

Create a paste

curl -X POST https://u3com.com/api/v1/pastes \
     -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
     -d '{"body":"hello world","language":"plain","visibility":"unlisted","expires_in_seconds":86400}'

Link unfurling

Viewer pages carry OpenGraph/Twitter meta and an application/json+oembed discovery link. oEmbed endpoint: https://u3com.com/oembed?url=<viewer-url>

Error codes

401Missing/invalid token
403Wrong scope, not the owner, or account_suspended
404 / 410Not found / deleted or expired
409 bad_stateUpload session already finalized or aborted
422 validation / quotaBad input, or plan quota/bandwidth exceeded
429Rate limited — back off
502 upload_failedStorage node error — retry later

Node ticket internals (Ed25519 capabilities, JTI replay protection) are documented in the repository, not this page.

Advertisement