superjsonblob
Save & share JSON

HTTP API

API reference

Four endpoints, four verbs. The superjsonblob API mirrors the public jsonBlob HTTP interface so existing clients can migrate by changing a single hostname. Every PUT also creates a new immutable version you can revisit later.

Quickstart

Create a blob, get back a URL, hit it from anywhere.

# Create
curl -i -X POST https://superjsonblob.com/api/jsonBlob \
  -H 'content-type: application/json' \
  -d '{"hello":"world"}'

# HTTP/1.1 201 Created
# Location: /api/jsonBlob/0a1b2c3d-...
# Content-Type: application/json
# {"id":"0a1b2c3d-...","versionNumber":1}

# Read
curl https://superjsonblob.com/api/jsonBlob/0a1b2c3d-...
# {"hello":"world"}

# Update — appends a new version, URL unchanged
curl -X PUT https://superjsonblob.com/api/jsonBlob/0a1b2c3d-... \
  -H 'content-type: application/json' \
  -d '{"hello":"there"}'

# Delete (owners only)
curl -X DELETE https://superjsonblob.com/api/jsonBlob/0a1b2c3d-...

Endpoints

Create a blob

POST/api/jsonBlob

Body: any JSON value. Returns 201 with { id, versionNumber } and a Location header. Anonymous callers get an unowned, public-by-URL blob.

POST /api/jsonBlob HTTP/1.1
Content-Type: application/json

{"any":"json","value":[1,2,3]}

→ 201 Created
Location: /api/jsonBlob/{id}
{"id":"{id}","versionNumber":1}

Read the latest version

GET/api/jsonBlob/{id}

Returns the JSON body of the most recent version. Optional ?version=N returns a specific historical version.

GET /api/jsonBlob/{id} HTTP/1.1
→ 200 OK
Content-Type: application/json
{...}

# Read a specific version
GET /api/jsonBlob/{id}?version=2 HTTP/1.1

Append a new version

PUT/api/jsonBlob/{id}

Replaces the served value at the blob URL with the supplied JSON, but the previous content is retained as an earlier version. Returns 200 with { id, versionNumber } where versionNumber is the new latest.

PUT /api/jsonBlob/{id} HTTP/1.1
Content-Type: application/json

{"updated":true}

→ 200 OK
{"id":"{id}","versionNumber":2}

Delete a blob

DELETE/api/jsonBlob/{id}

Soft-deletes the blob. Anonymous blobs are deletable by anyone with the URL; owned blobs require the owner's authentication.

DELETE /api/jsonBlob/{id} HTTP/1.1
→ 204 No Content

Authentication

Anonymous use needs no credentials. To create owned blobs (with a name, visibility toggle, and your dashboard tracking), include a Firebase ID token:

Authorization: Bearer <firebase-id-token>

Tokens are issued by Firebase Auth (email/password or Google sign-in). Use the standard Firebase Web SDK from your client.

Errors

Errors are JSON: { error: { code, message } }. Common codes: NOT_FOUND (404), FORBIDDEN (403), INVALID_INPUT (400).

Compatibility with jsonblob.com

The path, methods, request shape, response shape, and status codes are aligned with the public jsonBlob HTTP API. Most clients only need a single hostname change to migrate. See the JSON Blob alternative page for the migration walkthrough.

superjsonblob is an independent project and is not affiliated with jsonblob.com.