Skip to main content
Version: 2.2.0

Features

API Endpoints

Choosing the Right Endpoint

Not sure which endpoint to use? See Storage Options for guidance on when to use /credentials (private data with encryption) vs /documents and /files (public data without encryption).

Store Document (Private Data)

  • Endpoint: /api/1.1.0/credentials
  • Method: POST
  • Authentication: Required (X-API-Key header)
  • Encrypts and stores documents with optional ID
  • Returns URI, hash, and encryption key

Test the service using curl:

curl -X POST http://localhost:3333/api/1.1.0/credentials \
-H "Content-Type: application/json" \
-H "X-API-Key: your-secure-api-key-here" \
-d '{
"bucket": "verifiable-credentials",
"data": {
"field1": "value1"
}
}'

The service will respond similarly to the data below:

{
"uri": "http://localhost:3333/api/1.1.0/verifiable-credentials/e8b32169-582c-421a-a03f-5d1a7ac62d51.json",
"hash": "d6bb7b579925baa4fe1cec41152b6577003e6a9fde6850321e36ad4ac9b3f30a",
"key": "f3bee3dc18343aaab66d28fd70a03015d2ddbd5fd3b9ad38fff332c09014598d"
}

Request Payload

FieldDescriptionRequired
bucketName of the bucket where the data will be stored.Yes
dataThe actual data to be stored, must be in JSON format.Yes

Response Data

FieldDescription
uriThe link to the stored data.
hashA hash of the data, used to verify your data hasn't been changed.
keyThe symmetric key used to decrypt the encrypted data.

Store Document (Public Data)

  • Endpoint: /api/1.1.0/documents
  • Method: POST
  • Authentication: Required (X-API-Key header)
  • Stores documents with computed hash
  • Returns URI and hash

Test the service using curl:

curl -X POST http://localhost:3333/api/1.1.0/documents \
-H "Content-Type: application/json" \
-H "X-API-Key: your-secure-api-key-here" \
-d '{
"bucket": "test-verifiable-credentials",
"data": {
"field1": "value1"
}
}'

The service will respond similarly to the data below:

{
"uri": "http://localhost:3333/api/1.1.0/test-verifiable-credentials/2ad789c7-e513-4523-a826-ab59e1c423cd.json",
"hash": "d6bb7b579925baa4fe1cec41152b6577003e6a9fde6850321e36ad4ac9b3f30a"
}

Request Payload

FieldDescriptionRequired
bucketName of the bucket where the data will be stored.Yes
dataThe actual data to be stored, must be in JSON format.Yes

Response Data

FieldDescription
uriThe link to the stored data.
hashA hash of the data, used to verify your data hasn't been changed.

Upload File (Public Binary Data)

  • Endpoint: /api/1.1.0/files
  • Method: POST
  • Authentication: Required (X-API-Key header)
  • Stores public binary files (images, PDFs, etc.) without encryption, similar to /documents
  • Files are stored as-is and are publicly accessible to anyone who obtains the URI
  • Returns URI and hash

Upload a file using curl:

curl -X POST http://localhost:3333/api/1.1.0/files \
-H "X-API-Key: your-secure-api-key-here" \
-F "file=@/path/to/image.png" \
-F "bucket=files"

The service will respond similarly to the data below:

{
"uri": "http://localhost:3333/api/1.1.0/files/123e4567-e89b-12d3-a456-426614174000.png",
"hash": "d6bb7b579925baa4fe1cec41152b6577003e6a9fde6850321e36ad4ac9b3f30a"
}

Request Payload

FieldDescriptionRequired
fileThe binary file to upload.Yes
bucketName of the bucket where the file will be stored.Yes
idOptional UUID for the file. If not provided, one will be generated.No

Response Data

FieldDescription
uriThe link to the stored file.
hashA hash of the file, used to verify your file hasn't been changed.

Storage Providers

  • Local Storage: File system storage for development
  • Google Cloud Storage: GCP bucket storage for production
  • Amazon S3: AWS S3 and S3-compatible storage (e.g., MinIO, DigitalOcean Spaces, Cloudflare R2) for production

Security Features

Authentication

  • API key authentication via X-API-Key header
  • Required for all upload operations

Cryptography

  • SHA-256 hash computation
  • AES-256-GCM encryption
  • Secure key management
  • Data integrity verification

Configuration Options

  • Flexible storage provider selection
  • Environment-based configuration
  • Secure credential management