Skip to main content

Quick Start Guide

⚠️ Future Content: The detailed API implementation examples and advanced quickstart scenarios below will be provided in future documentation updates. Comprehensive integration patterns and production deployment guides are being developed for the platform.

Welcome to the Filedgr API Quickstart. In this guide, you'll go from zero to a verified digital record in just a few minutes.

Prerequisites

Before starting, make sure you have:

  • A Filedgr account (Sign up here)
  • API credentials (API Key + Secret)
  • A development environment with curl or your preferred HTTP client

Step 1: Generate API Credentials

  1. Log in to your Filedgr Dashboard
  2. Navigate to Developer → API Keys
  3. Click Generate API Key
  4. Copy your API Key and API Secret

🔐 Your API Key identifies your application.

🔐 Your API Secret must be kept private and should never be exposed in client-side code.

Step 2: Authenticate

Use your API Key and Secret to authenticate and request an access token.

curl -X POST "https://api.filedgr.io/auth/token" \
-H "Content-Type: application/json" \
-d '{
"apiKey": "YOUR_API_KEY",
"apiSecret": "YOUR_API_SECRET"
}'

Response

{
"accessToken": "eyJhbGciOiJIUzI1NiIs...",
"expiresIn": 3600,
"tokenType": "Bearer"
}

Save this access token for the following steps.

Step 3: Choose a Template

List available templates to find one that fits your use case:

curl -X GET "https://api.filedgr.io/templates" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response

{
"templates": [
{
"id": "general-template-v1",
"name": "General Document Template",
"description": "Basic template for document verification",
"version": "1.0.0"
},
{
"id": "supply-chain-v1",
"name": "Supply Chain Template",
"description": "Track products through supply chain",
"version": "1.0.0"
}
]
}

For this quickstart, we'll use the general template: general-template-v1

Step 4: Create a Vault

A vault is a secure container (NFT-based) for your data.

curl -X POST "https://api.filedgr.io/vaults" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"templateId": "general-template-v1",
"name": "My First Vault",
"description": "Testing Filedgr API integration"
}'

Response

{
"vaultId": "vault_abc123",
"status": "created",
"blockchainTx": "0x1234...",
"createdAt": "2024-01-15T10:30:00Z",
"templateId": "general-template-v1"
}

Save the vaultId for the next steps.

Step 5: Upload Data

Upload a document, image, or JSON file to your vault.

Upload a File

curl -X POST "https://api.filedgr.io/vaults/vault_abc123/attachments" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-F "file=@certificate.pdf" \
-F "metadata={\"type\":\"certificate\",\"category\":\"important\"}"

Upload JSON Data

curl -X POST "https://api.filedgr.io/vaults/vault_abc123/data" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"data": {
"productName": "Widget Pro",
"batchNumber": "WP-2024-001",
"manufactureDate": "2024-01-15",
"qualityScore": 98.5
},
"metadata": {
"type": "product-data",
"source": "manufacturing-system"
}
}'

Response

{
"attachmentId": "attach_xyz456",
"status": "verifying",
"hash": "0x9f4e3...",
"uploadedAt": "2024-01-15T10:35:00Z"
}

Step 6: Verify Data

Check that the data has been immutably recorded on the blockchain:

curl -X GET "https://api.filedgr.io/vaults/vault_abc123/verify" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response

{
"vaultId": "vault_abc123",
"verification": "success",
"timestamp": "2024-01-15T10:36:00Z",
"blockchainTx": "0x9f4e3...",
"proofHash": "0xabcd1234...",
"attachments": [
{
"attachmentId": "attach_xyz456",
"verified": true,
"verificationTx": "0x5678..."
}
]
}

Create a secure link that lets third parties verify authenticity without exposing the raw data:

curl -X POST "https://api.filedgr.io/vaults/vault_abc123/share" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"permissions": "viewer",
"expiresIn": "7d",
"requireAuth": false
}'

Response

{
"shareUrl": "https://verify.filedgr.io/proof/xyz789",
"shareId": "share_def456",
"expiresAt": "2024-01-22T10:40:00Z",
"permissions": "viewer"
}

Step 8: Test Verification

Anyone can verify your data using the share URL:

curl -X GET "https://verify.filedgr.io/proof/xyz789"

Response

{
"verified": true,
"vaultId": "vault_abc123",
"vaultName": "My First Vault",
"createdAt": "2024-01-15T10:30:00Z",
"lastModified": "2024-01-15T10:35:00Z",
"blockchainProof": "0x9f4e3...",
"attachmentCount": 1,
"attachments": [
{
"id": "attach_xyz456",
"type": "certificate",
"verified": true,
"hash": "0x9f4e3...",
"timestamp": "2024-01-15T10:35:00Z"
}
]
}

Congratulations!

You've successfully:

✅ Created your first vault
✅ Uploaded and verified data
✅ Generated cryptographic proof of authenticity
✅ Created a shareable verification link

Next Steps

Explore SDKs

Instead of raw HTTP calls, use our convenient SDKs:

JavaScript/Node.js

npm install @filedgr/sdk
import { Filedgr } from '@filedgr/sdk';

const filedgr = new Filedgr({
apiKey: 'YOUR_API_KEY',
apiSecret: 'YOUR_API_SECRET'
});

const vault = await filedgr.vaults.create({
templateId: 'general-template-v1',
name: 'My SDK Vault'
});

console.log('Vault created:', vault.id);

Python

pip install filedgr-python
import filedgr

client = filedgr.Client(
api_key="YOUR_API_KEY",
api_secret="YOUR_API_SECRET"
)

vault = client.vaults.create(
template_id="general-template-v1",
name="My Python Vault"
)

print(f"Vault created: {vault.id}")

Advanced Features

Integration Guides

Get Help

Common Use Cases

Document Verification

Perfect for contracts, certificates, and important documents that need tamper-proof storage and verification.

Product Authentication

Track products through manufacturing, supply chain, and retail to prevent counterfeiting.

Compliance Reporting

Automatically generate audit-ready reports with immutable timestamps and cryptographic proof.

Data Integrity

Ensure critical business data hasn't been tampered with using blockchain-backed verification.

Start building the future of trusted data today!