API Reference

Extract and Seal

Extract significance from content and seal it into a cryptographically signed .ddna envelope in a single call. Combines /v1/extract and /v1/issue.

POST/v1/extract-and-sealscope: extract

Overview

Use /v1/extract-and-seal when you want to extract and persist in one step. For more control — extracting first, validating, then sealing — use /v1/extract then /v1/issue separately.

Subject binding: Pass subject_ref or owner_user_id to bind the artifact to a VitaPass address. A subject_vp_id is created automatically.

Request Body

FieldTypeRequiredDescription
contentstringrequiredNatural-language text to extract from
profilestringoptionalessential, extended, full, or partner:<profile_id> (e.g. partner:com.deepadata.therapy.v1). Default: from API key or SDK auto-detect. See EDM v0.8.0 Section 3.7.6.
providerstringoptionalopenai, anthropic, kimi. Default: from account settings
jurisdictionstringoptionalGDPR, HIPAA, CCPA, PIPEDA, LGPD, None
consent_basisstringoptionalconsent, contract, legitimate_interest, none
subject_refstringoptionalYour internal subject ID. Creates VitaPass binding
owner_user_idstringoptionalAlias for subject_ref
localestringoptionale.g. en-us
pii_tierstringoptionalnone, low, moderate, high, extreme
exportabilitystringoptionalallowed, restricted, forbidden
retention_daysnumberoptionalDays to retain artifact

Partner Profiles (v0.8.0)

Use partner:<profile_id> for vertical-specific field selections. Partner profiles extract only the fields your use case needs.

{
  "content": "Client expressed relief after discussing coping strategies...",
  "profile": "partner:com.deepadata.therapy.v1"
}

Example Request

curl -X POST https://deepadata.com/api/v1/extract-and-seal \
  -H "Authorization: Bearer dda_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Had a long call with mum today. She reminded me of dad and I felt that familiar ache, but also gratitude for having her.",
    "profile": "extended",
    "jurisdiction": "GDPR",
    "consent_basis": "consent",
    "subject_ref": "user_123"
  }'

Response

A successful response includes the extracted EDM artifact, the sealed .ddna envelope, a certificate ID, and the VitaPass binding if a subject was provided.

{
  "success": true,
  "data": {
    "edm": {
      "meta": { "id": "...", "schema_version": "0.8.0", ... },
      "core": { "narrative": "...", "anchor": "...", ... },
      "constellation": { "emotion_primary": "gratitude", ... },
      ...
    },
    "ddna": {
      "@context": ["https://www.w3.org/ns/credentials/v2"],
      "type": ["VerifiableCredential", "EdmArtifact"],
      "issuer": "did:web:deepadata.com",
      "proof": { ... }
    },
    "certificate_id": "550e8400-e29b-41d4-a716-446655440000",
    "certification_level": "sealed",
    "vitapass": {
      "subject_vp_id": "vp-01HZ3GKWP7XTJY9QN4RD"
    }
  }
}

Related