validate

user.document.validate

Runs JSON Schema validation against a DocumentInput without creating or mutating anything. Useful for client-side “check before submit” UX when you want the authoritative server-side schema verdict.

Auth

Bearer JWT. Vault can be sealed — this endpoint does not touch encrypted data.

Input

Same DocumentInput type as create.

GraphQL

mutation($input: DocumentInput!) {
  user {
    document {
      validate(input: $input) {
        valid
        errors
      }
    }
  }
}

Response

{
  "data": {
    "user": {
      "document": {
        "validate": {
          "valid": false,
          "errors": [
            "/firstName: required field missing",
            "/dateOfBirth: not a valid ISO 8601 date"
          ]
        }
      }
    }
  }
}

valid: true with errors: null means the payload would be accepted by create or update. Validation failures return as a structured result, not as GraphQL errors.

curl

curl -X POST https://api.test.geena.eu/graphql \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "mutation($i: DocumentInput!) { user { document { validate(input: $i) { valid errors } } } }",
    "variables": { "i": { "name": "X", "schemaRef": "https://schema.identa.io/core/PersonFullName.json", "data": {} } }
  }'