Quickstart Guide

Get up and running with Anchora VaaS in 5 minutes. Create your first blockchain-anchored record with just a few lines of code.

Prerequisites

Before you begin, make sure you have:

  • An Anchora VaaS API key (sign up at anchora.co.in/waitlist)
  • Basic understanding of REST APIs
  • cURL, JavaScript, or Python installed

Step-by-Step Guide

1

Get Your API Key

Sign up for an Anchora VaaS account and get your API key from the dashboard. Your API key looks like: dcp_live_xxxxxxxxxxxx

2

Create Your First Anchor

Use the /v1/anchor/encrypted endpoint to anchor your first piece of data. This encrypts your data and creates an immutable blockchain record.

Create an encrypted anchor
curl -X POST https://api.anchora.io/v1/anchor/encrypted \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "data": {
      "name": "Alice Smith",
      "email": "alice@example.com",
      "certificateId": "CERT-2024-001"
    },
    "encryptionKey": "your-32-character-encryption-key!!",
    "mutableFields": ["email"],
    "immutableFields": ["name", "certificateId"],
    "hashFields": ["email"]
  }'
Encryption Key: Must be at least 32 characters. Store it securely - you'll need it to decrypt your data later.
3

Receive the Response

The API returns a record ID and hash. Save the record ID - you'll use it to retrieve and verify your data.

Response (200 OK)
{
  "success": true,
  "recordId": "rec_abc123xyz789",
  "hash": "0x7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa...",
  "status": "QUEUED",
  "encrypted": true,
  "fieldInfo": {
    "totalFields": 3,
    "mutableFields": ["email"],
    "immutableFields": ["name", "certificateId"],
    "hashedFields": ["email"]
  },
  "timestamp": "2024-01-31T10:30:00Z",
  "processingTime": "45ms"
}
4

Retrieve Your Record

Use the record ID to retrieve metadata about your anchored record.

Get record metadata
curl -X GET https://api.anchora.io/v1/records/rec_abc123xyz789 \
  -H "Authorization: Bearer YOUR_API_KEY"
5

Decrypt Your Data

Use your encryption key to decrypt and retrieve the original data.

Decrypt record data
curl -X POST https://api.anchora.io/v1/records/rec_abc123xyz789/decrypt \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"encryptionKey": "your-32-character-encryption-key!!"}'
Congratulations! You've just created your first blockchain-anchored record with Anchora VaaS.

Understanding Field Types

Mutable Fields

Fields that can be updated after creation. Perfect for data that changes over time (email, address, status). Updates are tracked with version history.

Immutable Fields

Fields that cannot be changed once anchored. Use for permanent data (SSN, certificate IDs, document hashes). The blockchain guarantees these never change.

Hash Fields

Fields indexed for privacy-preserving search. You can search by hash without exposing the actual data. Perfect for finding records by email or ID.

Best Practice: Always classify all fields as either mutable or immutable. Unclassified fields will generate a warning.

Next Steps