Core API

Validate

Verify an EDM artifact against the v0.5 schema. Returns validation errors if any fields are missing or malformed. No LLM call required.

POST/v1/validatescope: validate

Overview

The Validate endpoint performs pure schema validation against the EDM v0.5 specification. Use this to verify artifacts before sealing, or to check artifacts received from external sources.

Performance: This endpoint does not call an LLM. Typical response time is under 50ms.

Request Body

FieldTypeRequiredDescription
artifactobjectrequiredA full or partial EDM artifact to validate against the schema.

Example Request

curl -X POST https://www.deepadata.com/api/v1/validate \
  -H "Authorization: Bearer dda_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "artifact": {
      "meta": { "id": "edm_01HV8X3K2M...", "version": "0.5.0" },
      "core": { "anchor": "Work stress discussion", "spark": "Relief and hope" },
      "constellation": { "emotion_primary": "relief" },
      "governance": { "jurisdiction": "HIPAA", "consent_basis": "consent" }
    }
  }'

Example Response (Valid)

{
  "success": true,
  "data": {
    "valid": true,
    "errors": []
  },
  "meta": {
    "version": "0.5.0",
    "validated_at": "2026-02-24T10:30:05.000Z"
  }
}

Example Response (Invalid)

{
  "success": true,
  "data": {
    "valid": false,
    "errors": [
      {
        "path": "meta.version",
        "message": "Required field missing"
      },
      {
        "path": "constellation.emotion_primary",
        "message": "Must be a valid emotion identifier"
      }
    ]
  },
  "meta": {
    "version": "0.5.0",
    "validated_at": "2026-02-24T10:30:05.000Z"
  }
}

Error Codes

400

'artifact' field is required and must be an object

401

Missing or invalid API key

403

API key does not have 'validate' scope

429

Rate limit exceeded

Related