Skip to main content
POST
Save a new custom criterion to the workspace library. This route does not accept defaultCriterionId. For type-specific validation and condition shape, see Criterion definitions.

Headers

string
required
Bearer token containing your workspace API key. The key needs write scope.

Body parameters

string
required
Nonblank criterion name.
enum
required
deterministic, basic_judge or complex_judge.
object
Required for deterministic criteria. Must be absent or null for judge criteria.
string
Required nonblank judge instructions for either judge type.
string
Required nonblank pass definition for either judge type.
string
Required nonblank fail definition for either judge type.
boolean
Whether failure makes the case fail. Defaults to true for new custom criteria.

Response

Returns the saved criterion definition.