Atestaria é o protocolo de autenticidade que prova quem criou o quê e quando — de um jeito que ninguém consegue falsificar, nem com IA, nem com computadores quânticos do futuro.

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.

Header
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

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.

POST /v2/verify
ParameterTypeRequiredDescription
content_hashstringRequiredSHA-256 hash of the content, prefixed with sha256:
content_typestringRequiredOne of: DOCUMENT, FILE, CONTENT, EVENT
include_proofbooleanOptionalInclude Merkle proof in response. Default: false
Request
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
  }'
Response 200
{
  "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.

POST /v2/verify/batch
Request
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"}
    ]
  }'
Response 200
{
  "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.

POST /v2/anchor
ParameterTypeRequiredDescription
content_hashstringRequiredSHA-256 hash of the content
content_typestringRequiredOne of: DOCUMENT, FILE, CONTENT, EVENT
metadataobjectOptionalAdditional metadata to store with the anchor
Request
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"
    }
  }'
Response 201
{
  "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.

GET /v2/passport/{anchor_id}
Request
curl https://api.atestaria.com/v2/passport/550e8400-e29b-41d4-a716-446655440000 \
  -H "Authorization: Bearer vc_live_your_key"
Response 200
{
  "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.

POST /v2/webhooks
ParameterTypeRequiredDescription
urlstringRequiredHTTPS URL to receive webhook payloads
eventsarrayRequiredEvents to subscribe to: anchor.committed, anchor.revoked, verify.completed
secretstringOptionalShared secret for HMAC signature verification
Request
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:

Webhook Payload
{
  "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

CodeStatusDescription
400Bad RequestInvalid parameters or missing required fields
401UnauthorizedMissing or invalid API key
403ForbiddenInsufficient scope for this endpoint
404Not FoundResource not found
429Too Many RequestsRate limit or monthly quota exceeded
500Server ErrorInternal server error

Rate Limits

Rate limits vary by plan. When exceeded, the API returns 429 Too Many Requests with a Retry-After header.

PlanRate LimitMonthly Quota
Free60 req/min1,000
Starter300 req/min50,000
Professional1,000 req/min500,000
Enterprise5,000 req/minUnlimited
Autêntico. Auditável. À prova do tempo.
Atestaria é o protocolo de autenticidade que prova quem criou o quê e quando — de um jeito que ninguém consegue falsificar, nem com IA, nem com computadores quânticos do futuro.