1

API Base URL

All API requests are made to the Trust Engine base URLBase URL: https://core-api-server.onrender.comHeaders Required:
Content-Type: application/json
Test the API (Optional):
curl -X GET https://core-api-server.onrender.com/health
2

Create a Wallet

Create a managed wallet that will own your registered files
⚠️ ONE-TIME OPERATION: This should only be performed once per user. Save the wallet address for all future registrations.
Endpoint: POST /create-wallet
curl -X POST https://core-api-server.onrender.com/create-wallet \
  -H "Content-Type: application/json" \
  -d '{
    "userID": "your-unique-user-id-123"
  }'
# Note: userID must be unique across your entire application
💾 Save the walletAddress - you’ll need it for the next steps!
3

Calculate File Hash

Before registering a file via REST API, you need to calculate its SHA256 hash and get file metadata
# Calculate SHA256 hash
shasum -a 256 my-document.pdf
# Output: a1b2c3d4e5f6789... my-document.pdf
4

Register Your File

Register the file on the blockchain using the hash and metadata from Step 3Endpoint: POST /register
curl -X POST https://core-api-server.onrender.com/register \
  -H "Content-Type: application/json" \
  -d '{
    "contentTitle": "My Important Document",
    "walletAddress": "YOUR_WALLET_ADDRESS_FROM_STEP_2",
    "walletType": "managed",
    "contentHash": "YOUR_FILE_HASH_FROM_STEP_3",
    "metadata": "Registered via REST API"
  }'
5

Verify File Registration

Search for your registered file to confirm it’s on the blockchainEndpoint: POST /search
curl -X POST https://core-api-server.onrender.com/search \
  -H "Content-Type: application/json" \
  -d '{
    "contentHash": "YOUR_FILE_HASH_FROM_STEP_3",
    "walletAddress": "YOUR_WALLET_ADDRESS_FROM_STEP_2"
  }'

What’s Next?