Classify a confirmation message as submitted, pending, reserved or completed from caller or default phrases

$0.005 USDC per call · Agent infrastructure · POST /api/v1/confirmation-state · Id confirmation-state

Reads a confirmation page, email or API message and decides which state it states: submitted, pending, reserved or completed, using phrase lists the caller supplies (preferred, because wording is provider-specific) plus an optional default English list. Matches are whole-word, case- and typography-insensitive, returned with offsets in UTF-16, code points, UTF-8 bytes and graphemes, and a match inside a negation scope ('not yet confirmed') is ignored and reported as negated. Two different states matched at once are a conflict and return unknown unless the caller gives a precedence order. Rule-based; it reads the words, it does not verify that anything actually happened at the provider.

What you get

Stops an agent treating 'received, pending review' as 'done'. 20,000 characters per $0.005 call.

Call it

Send the JSON body below to https://agents.writerslogic.com/api/v1/confirmation-state. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.

curl -i -X POST https://agents.writerslogic.com/api/v1/confirmation-state \
  -H 'content-type: application/json' \
  -d '{"text":"Thank you. Your order has been submitted and is pending review.","precedence":["completed","reserved","pending","submitted"]}'

Input

FieldTypeRequiredDescription
textstring; length 1..20000yesConfirmation text.
rulesarray<object>; max 20 itemsnoCaller phrase lists; with these present the defaults are off unless useDefaults is true.
useDefaultsbooleannoInclude the default English phrases. Default true only when rules is absent.
precedencearray<string; one of "submitted", "pending", "reserved", "completed">; max 4 itemsnoWhen several states match, the first one listed wins. Without it a conflict is unknown.

Example request body

{
  "text": "Thank you. Your order has been submitted and is pending review.",
  "precedence": [
    "completed",
    "reserved",
    "pending",
    "submitted"
  ]
}

Result

The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.

FieldTypeRequiredDescription
statusstring; one of "pass", "fail", "unknown", "unsupported"nopass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass.
statestring; one of "submitted", "pending", "reserved", "completed", "unknown"no
matchesarray<object>; max 200 itemsno
resolvedBystring; one of "single-state", "precedence"no
witnessesarray<object>no
versionsobjectnoEvery semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile).
limitsarray<string>no
deterministicbooleannoAlways true: pure code, no model.

Pay and connect

Available through: x402 (USDC on Base), MCP. MCP clients reach it through the context-evidence-kit package.

Machine-readable