Xinsere API

A server-to-server API for securing files with Xinsere's fragmentation and permission model. Store a file and it's split into encrypted pieces with no single copy anywhere; every grant, revoke, and verify call is recorded on an immutable ledger your side can check independently.

Overview

Every file you send through the API is fragmented, encrypted with independent per-fragment keys, and distributed across storage. Reading access is enforced by an on-chain permission record, not a database flag, so a grant or revoke is a timestamped, independently verifiable event rather than an editable row.

Read and plan a full integration here without an account. You can build before you license: a sandbox key gives you the real API against an isolated test workspace, no contract and no card. Production keys and the interactive try-it-now reference are issued with your plan (see next steps below).

Authentication

Your organization is issued an API key from the admin console. Send it as a bearer token on every request:

# every request
Authorization: Bearer xin_your_key_here

The key is your organization's service identity. Its party_id owns everything stored under it and is the party recorded in every grant.

GET/v1/ping
curl -H "Authorization: Bearer $XINSERE_KEY" \
  https://api.xinsere.com/v1/ping

Returns your party_id and the current inline upload cap (max_inline_bytes); read it rather than hardcoding a size limit.

Store a file

POST/v1/files
curl -X POST https://api.xinsere.com/v1/files \
  -H "Authorization: Bearer $XINSERE_KEY" \
  -F "file=@contract.pdf" \
  -F "path=productions/show-x"   # optional folder path

The response returns the file's id and the sha256 of your original bytes. Use the id in every later call.

Larger files: call POST /v1/uploads for a presigned upload URL, PUT the raw bytes there, then POST /v1/files/finalize. Use this path for anything above the inline cap reported by /v1/ping.

Retrieve a file

Two ways to get bytes back, depending on where you want reassembly to happen:

EndpointWhat happens
GET /v1/files/{id}/contentServer-side reassembly. Bytes stream back directly, integrity-checked with an X-Content-SHA256 response header.
GET /v1/files/{id}/planClient-side reassembly. You get per-fragment download URLs and keys; your own systems fetch and decrypt, so the plaintext never transits Xinsere. Preferred for large media.

Delete a file

DELETE/v1/files/{id}

Moves the file to trash. It's recoverable for 30 days, then erased automatically. Add ?permanent=true to erase immediately: fragments and keys are destroyed and any outstanding grants are revoked on-chain in the same operation.

Grant & revoke access

Permissions are written to an on-chain contract: immutable, timestamped, and independently checkable by anyone you give the record to, without asking Xinsere.

POST/v1/files/{id}/grants
curl -X POST https://api.xinsere.com/v1/files/{id}/grants \
  -H "Authorization: Bearer $XINSERE_KEY" \
  -F "party_id=<grantee uuid>"

The response includes a transaction reference you can hand to an auditor as proof of the grant.

DELETE/v1/files/{id}/grants/{party_id}

Revokes access. The revoke is its own on-chain event, so the full grant history, including everything that was later revoked, survives for audit.

GET/v1/files/{id}/grants

Lists current shares on a file along with each one's transaction reference.

GET/v1/parties?slug=

Resolves another organization's party_id from its slug, so a machine-to-machine grant never needs a human to copy a uuid by hand.

Verify

GET/v1/files/{id}/verify?party_id=<uuid>
curl "https://api.xinsere.com/v1/files/{id}/verify?party_id=<uuid>" \
  -H "Authorization: Bearer $XINSERE_KEY"

Answers "does this party currently have access, and since when," read straight from the ledger, without touching the file's content.

GET/v1/chain/status

Signer health and remaining transaction budget. Costs nothing to call; check it before a grant on a workflow you can't afford to have fail mid-run.

Scopes

ScopeCovers
files:readList, metadata, content, plan
files:writeStore, uploads, finalize, delete
grants:manageGrant, revoke, list grants
verify:readVerify

Keys are scoped when they're issued in the admin console. A key with only files:read can't grant access to anything, even if it can read the file itself.

Errors

Every error, including validation failures, returns one shape:

{ "error": "human-readable message [error_code]" }

Validation errors add an errors array with field-level detail. The HTTP status carries the primary signal:

StatusMeaning
401Bad or missing key
403Key lacks the required scope
404Not found, or hidden from this key
413File too large for this endpoint
422Bad input
502Ledger write failed
503Backend unavailable, retry

Codes worth branching on: chain_grant_failed, chain_revoke_failed, chain_status_unavailable.

Plan limits

API usage draws from the same monthly file, share, and storage allowance as your plan's web app, listed on the pricing page. There's no separate API quota to track.

Enterprise and M&E Enterprise: allowances are negotiated per contract. Contact sales for your organization's limits.

Agent & MCP access

For AI agents that need to store and share files with the same guarantees, Xinsere ships an MCP server, Botverse Secure, exposing the permission model as callable tools instead of raw HTTP:

ToolDoes what the API endpoint above does
secure_storeStore a file with per-fragment encryption
secure_retrieveRetrieve a file, if the caller has permission
secure_grantGrant a party permission to a file
secure_revokeRevoke a permission
secure_verifyVerify a permission, for third-party audit
secure_auditPull the full audit trail for a file

Works with Claude, LangChain, CrewAI, n8n, and any MCP-compatible agent runtime.