Skip to main content
This guide walks you through your first API calls: creating a category, an evidence record, and verifying it on the blockchain.

Prerequisites

  • A TimeLockData account
  • Your API key (X-API-Key)
  • A tool for making HTTP requests (curl, Postman, or any HTTP client)

Step 1: Get Your API Key

Log in to the TimeLockData Dashboard and navigate to Administration > Source Systems to create a new source system and generate an API key.
Keep your API key secure and never expose it in client-side code or public repositories.

Step 2: Test the Connection

Verify the API is reachable with a health check:
curl -X GET "https://api.timelockdata.com/api/v1/test"
Expected response:
{
  "status": "OK"
}

Step 3: Create a Category

Categories organize your evidences. Replace {COMPANY_ID} with your company identifier.
curl -X POST "https://api.timelockdata.com/api/v1/evidences/{COMPANY_ID}/category" \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Equipment",
    "description": "Industrial equipment tracking"
  }'
Response:
{
  "id": "cat-uuid-here"
}

Step 4: Create a Subcategory

curl -X POST "https://api.timelockdata.com/api/v1/evidences/{COMPANY_ID}/category/{CATEGORY_ID}/subcategory" \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Forklifts",
    "description": "Forklift fleet"
  }'

Step 5: Create an Evidence

Register a digital event as an evidence record within your category and subcategory:
curl -X POST "https://api.timelockdata.com/api/v1/evidences/{COMPANY_ID}/category/{CATEGORY_ID}/subcategory/{SUBCATEGORY_ID}/evidence" \
  -H "X-API-Key: your-api-key" \
  -F "externalId=FORKLIFT-001" \
  -F "name=Forklift Unit 1" \
  -F "owner=Warehouse A" \
  -F "description=Toyota 8FGU25 forklift"
Response:
{
  "id": "dt-uuid-here"
}
The evidence is now being anchored on the blockchain. This process is asynchronous.

Step 6: Verify on the Blockchain

Once the evidence is confirmed on the blockchain, you can verify its existence using the public verification endpoint (no authentication required):
curl -X GET "https://api.timelockdata.com/api/v1/merkle/verify/FORKLIFT-001"
This returns blockchain proof including the transaction ID, block number, Merkle proof, and TSA timestamp — proving that specific data existed in a specific state at a specific time.

Next Steps

Authentication

Learn about API Key authentication

API Reference

Explore all available endpoints

Upload Files

Attach documents and images to evidences

Verification

Verify data integrity with blockchain proofs

Troubleshooting

401 Unauthorized — Verify your API key is correct and included in the X-API-Key header. 400 Bad Request — Check that required fields (name, externalId, owner) are present. Need help? Contact us at support@gate2chain.com.