Metric
Create Metric
POST
cURL
Create a new Metric and attach it to one or more Conditions.
This endpoint is available only for API version
2026-06-01. Send the whitecircle-version: 2026-06-01 header.Authorizations
API Key required. Format: Bearer wc-your-api-key
Headers
API Version
Body
application/json
Rules defining content to flag or allow. Each rule must set exactly one of flagged_content or allowed_content, and at least one rule must set flagged_content.
Available options:
session, artifact, any Example:
"session"
Role restriction used by the new policy targeting model. Empty role lists mean any role.
Available options:
user, assistant Available options:
input, output, any Example:
"input"
Available options:
prod, shadow Example:
"prod"
Response
Success
Rules defining content to flag or allow. At least one rule contains flagged_content.
Available options:
session, artifact, any Example:
"session"
Role restriction used by the new policy targeting model. Empty role lists mean any role.
Available options:
user, assistant Available options:
input, output, any Example:
"input"
Available options:
prod, shadow Example:
"prod"
Available options:
active, inactive, draft Example:
"active"
