Ma'atara Docs Developer Academic maatara.io →

AI Consent Developer Guide

PATENT PENDING — Ma'atara Protocol.

Public integration contract reviewed: 21 September 2026.

The AI Consent service publishes cryptographically attributable AI-use preferences for opaque content identifiers. It is a metadata and evidence service: referenced content stays at the endpoint, and preference signals neither force recipients to comply nor create legal rights by themselves.

Current boundary

PropertyCurrent contract
OwnerCanonical did:maatara identity with verified current key authority
Acting keyGenesis key or an active, attested device key entitled to speak for that DID
Mutation signatureML-DSA-65 over shared canonical JSON
Identity and signature verifierAegis over a private Cloudflare service binding
Content sent to the serviceNone; only an opaque content hash/identifier and preference metadata
StorageD1 projection plus KV read cache, both scoped by the opaque content identifier and canonical creator DID
Failure postureIdentity-binding or signature-verification uncertainty returns 503; it never authorizes
Non-native recordsOwnerless records return 409 non_native_consent_record on mutation and cannot be adapted through the retired healing service

Public reads deliberately expose signed preference evidence. Private keys, plaintext content, titles, tags, filenames, and note bodies are outside this service boundary.

Standards profile

IETF AI-Pref

The service implements the AI-Pref vocabulary draft revision 06. This is a versioned draft projection, not a claim to track the latest revision automatically:

CategoryWire labelValues
AI model trainingtrain-aiy or n
Searchsearchy or n

Example:

train-ai=n, search=y

Ma'atara records may retain generative_ai_training, automated_processing, or conditional in the signed JSON record. Those are Ma'atara record fields and are not emitted as retired or invented AI-Pref wire tokens. Unknown or non-draft tokens are ignored when parsing the IETF projection.

/.well-known/ai-consent, the Aegis comment in robots.txt, and X-Robots-Tag: noai are product discovery conventions. They are not presented as IETF-standard attachment mechanisms.

TDMRep

/.well-known/tdmrep.json follows the TDMRep Final Community Group Report:

[
  {
    "location": "/",
    "tdm-reservation": 1
  }
]

tdm-policy is optional and is omitted until Ma'atara publishes a conforming, dereferenceable policy document. TDMRep is a W3C Community Group report, not a W3C Recommendation, and its signal is a rights reservation rather than a technical access control.

API

Production base URL: https://consent.maatara.io.

Public reads

MethodRouteResult
GET/robots.txtSite crawler directives and configured verification URL
GET/.well-known/ai-consentMa'atara discovery JSON and AI-Pref draft projection
GET/.well-known/tdmrep.jsonTDMRep site rule array
GET/api/v1/consent/:hashOne consent record
POST/api/v1/consent/batchAt most 10,000 exact identifier lookups
GET/api/v1/consent/by-creator/:didPublic records attributed to one canonical DID

The identifier is an exact opaque string of 16–256 characters. Ma'atara products use SHA3-384 over the agreed source bytes; callers must agree on byte encoding and normalization because the service does not recompute content hashes.

curl https://consent.maatara.io/api/v1/consent/<sha3-384-content-hash>

Create

Use proto.jcsCanonicalize from an initialized @maatara/pqc-toolkit for the public consent request contract. @maatara/worker-utils is private and is not an external npm dependency:

const message = proto.jcsCanonicalize({
  content_hash: contentHash,
  preferences: {
    ai_training: 'disallow',
    search: 'allow',
  },
  creator_did: creatorDid,
});

Sign the base64url encoding of the message's UTF-8 bytes with the acting ML-DSA-65 secret in endpoint memory. Send the base64url signature in X-Aegis-Signature:

POST /api/v1/consent
Content-Type: application/json
X-Aegis-Signature: <base64url-ml-dsa-65-signature>

{
  "content_hash": "<sha3-384-content-hash>",
  "creator_did": "did:maatara:<canonical-fingerprint>",
  "public_key_b64u": "<acting-ml-dsa-65-public-key>",
  "preferences": {
    "ai_training": "disallow",
    "search": "allow"
  }
}

The Worker verifies that public_key_b64u is entitled to speak for creator_did and verifies the signature with that exact key. It never accepts an anonymous or signature-only write.

Update

PUT /api/v1/consent/:hash accepts:

{
  "public_key_b64u": "<acting-ml-dsa-65-public-key>",
  "preferences": {
    "ai_training": "allow"
  }
}

Use the same SDK canonicalization call as create with {content_hash, preferences, creator_did}. Obtain creator_did from the existing native record; do not substitute an unverified caller-supplied owner.

Delete

DELETE /api/v1/consent/:hash requires a JSON body containing public_key_b64u. The canonical signed object is {content_hash, action: "delete", creator_did}. Deletion requires both key-to-DID authority and a valid signature.

Error contract

StatusMeaning
400Malformed identifier, preference, canonical DID, public key, or JSON body
401Missing X-Aegis-Signature
403Key is not entitled to the creator DID or signature is invalid
404No record for that identifier
409Existing record is non-native; no automatic adaptation
429Strict rate limit reached
503Private Aegis identity/signature authority is unavailable or malformed

Integration rules

Verification

Read back the published preference and verify its attribution through the supported verifier. A successful write records a preference; it does not prove a crawler will comply. Use Testing for package loading and endpoint integration checks.