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 & path | Scope | Purpose |
|---|---|---|
| POST /uploads/init | uploads:create | Start a chunked upload → node URL + capability ticket |
| GET /uploads/{id} | uploads:read | Upload session state |
| POST /uploads/{id}/complete | uploads:create | Finalize a chunked upload |
| POST /uploads/multipart | uploads:create | One-shot upload (ShareX path), ≤ 50 MB |
| POST /pastes | pastes:create | Create a paste/snippet |
| GET /pastes/{id} | pastes:read | Paste metadata (body for owner) |
| GET /items/{id} | items:read | Item metadata |
| PATCH /items/{id} | items:update | Edit title, visibility, expiry, password |
| DELETE /items/{id} | items:delete | Delete an item |
| POST /short-links | shortlinks:create | Create a short link |
| GET /short-links | shortlinks:read | List your links |
| PATCH /short-links/{id} | shortlinks:update | Edit destination/status/expiry |
| DELETE /short-links/{id} | shortlinks:delete | Disable a link |
| POST /collections | collections:create | Create an album |
| GET /analytics/{item} | items:read | Per-item event stats |
| POST /reports | public | Abuse 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
| 401 | Missing/invalid token |
| 403 | Wrong scope, not the owner, or account_suspended |
| 404 / 410 | Not found / deleted or expired |
| 409 bad_state | Upload session already finalized or aborted |
| 422 validation / quota | Bad input, or plan quota/bandwidth exceeded |
| 429 | Rate limited — back off |
| 502 upload_failed | Storage node error — retry later |
Node ticket internals (Ed25519 capabilities, JTI replay protection) are documented in the repository, not this page.