Skip to main content
POST
Dry-run a recognizer pattern against sample text
Runs a candidate pattern against a sample text and returns what it matched. Nothing is stored and no recognizer is created. pattern and text are both required — an empty pattern is 400 invalid_pattern, a missing text is 400 invalid_text. Optional kind, action, context_words and name let you rehearse the exact recognizer you intend to save. It compiles through the same validator the writer uses, so it can never green-light a pattern that create would refuse. This is the one operation here that is not tenant-scoped state: it reads nothing and writes nothing. It still requires the read capability on ai_gateway. See the control-plane overview for authentication, the {data, meta} envelope, pagination and error types.

Authorizations

Authorization
string
header
required

OAuth 2.1 authentication — recommended for new integrations. Access tokens (kc_ prefix) are minted at the root-host token endpoint https://api.knoxcall.com/oauth/token and passed as Authorization: Bearer <access_token>. Public clients must use PKCE with the authorization_code grant; confidential clients may use client_credentials. The first-party SDKs and the knoxcall login CLI handle token minting, caching, refresh, and DPoP for you.

Body

application/json
pattern
string
required
Example:

"EMP-[0-9]{6}"

text
string
required

Sample text to scan.

kind
enum<string>
default:regex
Available options:
regex,
aho_corasick
action
enum<string>
default:redact
Available options:
redact,
tokenize,
whitelist,
warn
context_words
string[]
name
string

Response

The scan result.

data
object
meta
object

Metadata included with every API response.