KVSEC Public API (1.0.0)

KVSEC Public API — simple key-value storage with public read access and authenticated write/delete operations.

Auth

Key generation endpoints

Generate access keys

Generates a pair of access keys linked to a new bucket:

  • write_key — for creating, updating, deleting objects
  • read_key — reserved for future private read access
  • bucket_id — unique bucket identifier

No authentication required.

Responses

Response Schema: application/json
bucket_id
required
string
write_key
required
string
read_key
required
string

Request samples

curl -s -X POST https://api.kvsec.io/auth/keygen

Response samples

Content type
application/json
{
  • "bucket_id": "bkt_3w5k5m0q",
  • "write_key": "kvw_6Qy...x2A",
  • "read_key": "kvr_Mc9...r4K"
}

Public Space

Public storage — read without authentication, write/delete with Write API key

Retrieve a stored object

Returns the stored data for the given {bucketId} and {key}.

Dynamic content type: the response Content-Type matches the media type that was originally uploaded with the object.

Below are representative content-types; the actual response will use the exact media type saved during upload.

path Parameters
bucketId
required
string
Example: bkt_3w5k5m0q

Unique bucket ID from /auth/keygen

key
required
string
Example: hello.txt

Object key (filename) within the bucket

Responses

Response Schema:
string

Request samples

curl -s https://api.kvsec.io/pub/bkt_3w5k5m0q/hello.txt

Response samples

Content type
hello world

Create or update object

Creates or replaces an object under {bucketId} and {key}. Requires a valid write key in header X-Kvsec-Key.

The request body may use any Content-Type (*/*), such as text/plain, application/json, image/png, etc. The server stores the original Content-Type and returns it during reads.

Authorizations:
ApiKeyAuth
path Parameters
bucketId
required
string
Example: bkt_3w5k5m0q

Unique bucket ID from /auth/keygen

key
required
string
Example: hello.txt

Object key (filename) within the bucket

Request Body schema:
optional

Object payload to store. Content-Type is recommended.

string

Responses

Response Schema: application/json
status
required
string
bucket_id
required
string
key
required
string
url
required
string <uri>
content_type
required
string

Request samples

Content type
hello world

Response samples

Content type
application/json
{}

Delete object

Deletes an object by {bucketId} and {key}. Requires a write key in header X-Kvsec-Key.

Authorizations:
ApiKeyAuth
path Parameters
bucketId
required
string
Example: bkt_3w5k5m0q

Unique bucket ID from /auth/keygen

key
required
string
Example: hello.txt

Object key (filename) within the bucket

Responses

Response Schema: application/json
status
required
string
bucket_id
required
string
key
required
string

Request samples

curl -s -X DELETE \
  -H "X-Kvsec-Key: kvw_6Qy...x2A" \
  https://api.kvsec.io/pub/bkt_3w5k5m0q/hello.txt

Response samples

Content type
application/json
{
  • "status": "ok",
  • "bucket_id": "bkt_3w5k5m0q",
  • "key": "hello.txt"
}