Skip to main content
POST
Create a PII redaction policy
Creates a policy. Until this endpoint shipped, PII policies could only be created in the dashboard — so a pii_redact_policy_id was obtainable only by a UI detour, and a compliance-shaped setup could not be scripted end to end from an API key. It can now. Attach the policy by setting an agent’s pii_redact_policy_id with Update agent. Requires the create 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
name
string
required

2-64 chars (letters, digits, space, underscore, hyphen). Unique per tenant.

Example:

"HIPAA"

recognizer_ids
string<uuid>[]

Must all be recognizers this tenant owns; a foreign id is a 400 recognizer_not_found.

default_action
enum<string>
default:redact
Available options:
redact,
tokenize,
whitelist,
warn
description
string
Maximum string length: 1000

Response

The created policy.

data
object

A tenant-scoped bundle of PII recognizers plus a default action, attached to an agent through pii_redact_policy_id.

meta
object

Metadata included with every API response.