Skip to main content
Endpoint

Validate Email Endpoint

Use the Soryxa validation endpoint from your backend to turn an email address into an allow, block, or review decision with reason codes and usage fields.

Decision payload

POST https://soryxa.elvesora.com/api/v1/validate Create a Soryxa token with the validate scope. Your backend only needs to send the email address.
decision: allow | block | review Route from the decision first, then use reason_code for analytics and policy handling.
usage.total_remaining Track all available checks separately from email-quality decisions. usage.remaining covers the monthly plan only.

Request

Set SORYXA_API_KEY to your Soryxa team token in your shell. Replace the sample email with an address you can check. This call uses your team’s policy.

curl --request POST https://soryxa.elvesora.com/api/v1/validate \
  --header "Authorization: Bearer $SORYXA_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{"email":"user@example.com"}'

Example success response

Illustrative response for the request above, not a live result for the sample address. The request sends no policy_key, so the response shows default. Read the decision first, then use the reason code and checks for routing and logging.

{
  "success": true,
  "data": {
    "policy_key": "default",
    "decision": "allow",
    "reason_code": "CLASSIFICATION_VALID",
    "decision_message": "Email passed all validation checks",
    "customer_message": null,
    "decision_reasons": ["Valid email with high quality score"],
    "auto_resolution": null,
    "rollout": {
      "mode": "enforce",
      "status": "active",
      "percentage": 100,
      "shadow_decision": null
    },
    "checks": [
      {
        "name": "Domain MX",
        "status": "passed",
        "message": "Domain has valid MX records"
      }
    ],
    "base_score": 96,
    "score_adjustments": [],
    "score": 96,
    "raw_data": {
      "classification": "valid",
      "score": 96
    },
    "upstream": {
      "provider": "elvesora_api",
      "state": "closed",
      "status": "ok",
      "status_code": 200,
      "duration_ms": 148,
      "failure_count": 0
    }
  },
  "usage": {
    "remaining": 249,
    "limit": 250,
    "purchased_remaining": 5000,
    "total_remaining": 5249
  }
}
Optional flow label and visitor headers

Send one email address per request, up to 255 characters. policy_key is optional, up to 80 characters, and accepts letters, numbers, dots, underscores, colons, and hyphens. context metadata is not accepted by the current API contract.

Optional visitor_headers carries the visitor headers captured by your backend, rather than the headers of your server-to-server API call. Send an object of HTTP header names to strings or flat arrays of strings, for example {"User-Agent":"curl/8.10.1"}. Names must use HTTP token characters; they are trimmed, lowercased, and merged across casing variants. Limits are 100 names, 32 values per name, 8,192 bytes per value, and 32,768 bytes total across names and values.

Remove credentials, cookies, API keys, and custom secrets before forwarding headers. Soryxa strips known secret headers and removes credentials, fragments, and sensitive query parameters from URL-like header values before logging. This sanitization does not replace filtering in your backend.

Non-empty sanitized headers add an automated_client check with warning for recognized versioned cURL, python-requests, python-httpx, Scrapy, or HeadlessChrome User-Agent tokens, or passed when none is recognized. A passed check is not proof of a human visitor. The optional Review Automated HTTP Clients rule is disabled by default; enable it and publish the policy to request review without changing the email score. Handle review_scope=request in your calling workflow; it does not create a persistent email Review Queue item.

Response fields

These fields are intended for API clients, customer admin tools, and workflow automation that needs repeatable decisions instead of raw validation signals alone.

success Boolean indicating whether the API request completed successfully.
data.policy_key Caller-supplied flow label echoed in the response. Defaults to default when omitted and does not select a separate ruleset.
data.decision Workflow decision: allow, block, or review.
data.reason_code Stable machine-readable reason for the decision.
data.decision_message Human-readable explanation suitable for logs and admin tools.
data.customer_message Customer-facing message selected from the team rule policy when configured.
data.decision_reasons List of supporting reasons for the final decision.
data.auto_resolution Metadata when hashed review auto-resolution changes a review decision to allow or block.
data.rollout Rule rollout metadata for shadow or staged policy changes.
data.checks[] Named validation checks with status and message fields.
data.review_scope Present only for review decisions with non-empty sanitized visitor_headers: request for an effective AUTOMATED_CLIENT review, or email for an existing email review. Request-scoped reviews do not create a persistent email Review Queue item.
data.base_score Provider score before team rule adjustments are applied.
data.score_adjustments Score adjustments applied by team rule weights.
data.score 0-100 score derived from validation signals and team rules.
data.raw_data Raw upstream validation data used for audit and troubleshooting workflows.
data.upstream Upstream provider, circuit state, status, HTTP status, duration, and failure metadata.
usage.remaining Monthly plan checks remaining after this request. It can reach 0 while purchased checks are still available.
usage.limit Monthly plan limit used to calculate usage.remaining.
usage.purchased_remaining Unexpired purchased checks still available. Monthly checks are used first.
usage.total_remaining All checks the team can still use: active monthly checks plus purchased checks. Use this field to decide whether validation can continue.

Response headers

Headers are useful for tracing and simple routing, but the JSON response remains the primary contract for decisions, scores, and checks.

X-Soryxa-Reason-Code Echoes the final reason_code for clients that route from headers.
X-Soryxa-Correlation-Id Echoes X-Soryxa-Correlation-Id or X-Request-Id, or returns a generated fallback ID.

Implementation checklist

Treat the validation endpoint as a decision service. The response should be mapped into the same place your product already handles signup acceptance, review queues, CRM syncs, and account policy.

Keep this logic close to the workflow that owns the outcome. A signup form, CRM import job, and pre-send check can all call the same endpoint, but each workflow may need a different review owner and user-facing fallback.

  • Normalize and trim the submitted address before sending it to the validation endpoint.
  • Call Soryxa from the backend so the bearer token is never exposed in browser code.
  • Use the decision as the first routing field, then use reason_code for analytics and policy-specific handling.
  • Persist only the fields your workflow needs for auditability, support review, or CRM sync decisions.
  • Handle review as a deliberate fallback path when the validation signals do not justify an automatic allow or block.