API Reference
Complete reference for the Atestaria REST API. All endpoints return JSON and require authentication via API key.
Authentication
All API requests must include your API key in the Authorization header using the Bearer scheme.
Authorization: Bearer vc_live_your_api_key_here
You can generate API keys from your Developer Dashboard. Keys are prefixed with vc_live_ for production.
Base URL
https://api.atestaria.com/v2
Verify Endpoint
Verify the authenticity of content by its hash. Returns verification status, blockchain proof, and full provenance chain.
| Parameter | Type | Required | Description |
|---|---|---|---|
content_hash | string | Required | SHA-256 hash of the content, prefixed with sha256: |
content_type | string | Required | One of: DOCUMENT, FILE, CONTENT, EVENT |
include_proof | boolean | Optional | Include Merkle proof in response. Default: false |
curl -X POST https://api.atestaria.com/v2/verify \
-H "Authorization: Bearer vc_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"content_hash": "sha256:e3b0c44298fc1c14...",
"content_type": "DOCUMENT",
"include_proof": true
}'
{
"verified": true,
"anchor_id": "550e8400-e29b-41d4-a716-446655440000",
"content_type": "DOCUMENT",
"status": "COMMITTED",
"blockchain_tx": "0xabc123def456...",
"committed_at": "2026-01-15T10:30:00Z",
"merkle_proof": {
"root": "0xdef789...",
"proof": ["0xaaa...", "0xbbb..."],
"index": 3
},
"creator": {
"display_name": "John Doe",
"human_level": "HAL2",
"verified": true
}
}
Batch Verify
Verify multiple content hashes in a single request. Up to 100 items per batch.
curl -X POST https://api.atestaria.com/v2/verify/batch \
-H "Authorization: Bearer vc_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"items": [
{"content_hash": "sha256:aaa...", "content_type": "DOCUMENT"},
{"content_hash": "sha256:bbb...", "content_type": "FILE"},
{"content_hash": "sha256:ccc...", "content_type": "CONTENT"}
]
}'
{
"results": [
{"content_hash": "sha256:aaa...", "verified": true, "anchor_id": "..."},
{"content_hash": "sha256:bbb...", "verified": false},
{"content_hash": "sha256:ccc...", "verified": true, "anchor_id": "..."}
],
"total": 3,
"verified_count": 2
}
Anchor
Anchor a content hash to the blockchain, creating an immutable proof of existence with a timestamp.
| Parameter | Type | Required | Description |
|---|---|---|---|
content_hash | string | Required | SHA-256 hash of the content |
content_type | string | Required | One of: DOCUMENT, FILE, CONTENT, EVENT |
metadata | object | Optional | Additional metadata to store with the anchor |
curl -X POST https://api.atestaria.com/v2/anchor \
-H "Authorization: Bearer vc_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"content_hash": "sha256:e3b0c44298fc1c14...",
"content_type": "DOCUMENT",
"metadata": {
"filename": "contract.pdf",
"author": "legal@company.com"
}
}'
{
"anchor_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "PENDING",
"content_hash": "sha256:e3b0c44298fc1c14...",
"content_type": "DOCUMENT",
"created_at": "2026-02-07T12:00:00Z",
"estimated_commit_time": "~30 seconds"
}
Content Passport
Generate a rich digital passport for content, including creator identity, verification status, custody chain, and embeddable badge.
curl https://api.atestaria.com/v2/passport/550e8400-e29b-41d4-a716-446655440000 \ -H "Authorization: Bearer vc_live_your_key"
{
"passport_id": "psp_abc123",
"anchor_id": "550e8400-e29b-41d4-a716-446655440000",
"content_hash": "sha256:e3b0c44298fc1c14...",
"verified": true,
"creator": {
"display_name": "John Doe",
"human_level": "HAL2",
"profile_url": "https://atestaria.com/@johndoe"
},
"custody_chain": [
{"event": "CREATED", "timestamp": "2026-01-15T10:00:00Z"},
{"event": "SIGNED", "timestamp": "2026-01-15T10:05:00Z"},
{"event": "PUBLISHED", "timestamp": "2026-01-15T10:30:00Z"}
],
"blockchain": {
"chain": "polygon",
"tx_hash": "0xabc123...",
"block_number": 12345678
},
"badge_embed": "<script src=\"https://atestaria.com/badge/psp_abc123.js\"></script>"
}
Webhooks
Subscribe to real-time events. Atestaria sends POST requests to your URL when events occur.
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Required | HTTPS URL to receive webhook payloads |
events | array | Required | Events to subscribe to: anchor.committed, anchor.revoked, verify.completed |
secret | string | Optional | Shared secret for HMAC signature verification |
curl -X POST https://api.atestaria.com/v2/webhooks \
-H "Authorization: Bearer vc_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-app.com/webhooks/veritas",
"events": ["anchor.committed", "anchor.revoked"],
"secret": "whsec_your_secret"
}'
Webhook Payload Example:
{
"event": "anchor.committed",
"timestamp": "2026-02-07T12:01:00Z",
"data": {
"anchor_id": "550e8400-e29b-41d4-a716-446655440000",
"content_hash": "sha256:e3b0c44298fc1c14...",
"blockchain_tx": "0xabc123...",
"status": "COMMITTED"
}
}
// Verify signature:
// X-Atestaria-Signature: sha256=hmac_signature_here
Error Codes
| Code | Status | Description |
|---|---|---|
400 | Bad Request | Invalid parameters or missing required fields |
401 | Unauthorized | Missing or invalid API key |
403 | Forbidden | Insufficient scope for this endpoint |
404 | Not Found | Resource not found |
429 | Too Many Requests | Rate limit or monthly quota exceeded |
500 | Server Error | Internal server error |
Rate Limits
Rate limits vary by plan. When exceeded, the API returns 429 Too Many Requests with a Retry-After header.
| Plan | Rate Limit | Monthly Quota |
|---|---|---|
| Free | 60 req/min | 1,000 |
| Starter | 300 req/min | 50,000 |
| Professional | 1,000 req/min | 500,000 |
| Enterprise | 5,000 req/min | Unlimited |