Update Classifier Label
PUThttps://api.confident-ai.com/v1/classifiers/{classifierId}/labels/{labelId}
Updates a label on a classifier. Only the fields you send are changed. Promoting a generated suggestion is an update to status ACTIVE. Requires the Starter plan or above.
curl -X PUT "https://api.confident-ai.com/v1/classifiers/{classifierId}/labels/{labelId}" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"status": "ACTIVE"
}'{
"success": true,
"data": {
"label": {
"id": "LABEL-ID",
"name": "Positive",
"description": "User expresses satisfaction or gratitude.",
"enabled": true,
"status": "ACTIVE",
"polarity": "HIGHER_IS_BETTER"
}
},
"link": "https://app.confident-ai.com/project/<PROJECT-ID>/workflows"
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
classifierIdstringRequiredThe unique identifier of the classifier.
labelIdstringRequiredThe unique identifier of the label.
Request body
enabledbooleanWhether the label can be applied. Defaults to true.
statusenumSetting
ACTIVEalso enables the label, so sendingenabledfalse alongside it is rejected. Defaults toACTIVE.Show 2 enum valuesHide 2 enum values
RECOMMENDEDACTIVE
polarityenumWhether more of this label is good, bad, or neither. Defaults to
NEUTRAL.Show 3 enum valuesHide 3 enum values
HIGHER_IS_BETTERLOWER_IS_BETTERNEUTRAL
namestringA new name, unique within the classifier.
descriptionstringWhen this label applies. Cannot be cleared.
Response
successbooleanIndicates if the request was successful.
dataobjectShow 1 propertyHide 1 property
labelobjectOne label a classifier can apply.
Show 6 propertiesHide 6 properties
idstringThe unique identifier of the label.
namestringThe label's name.
descriptionstringWhen this label applies. This is the instruction the classifying model reads, so it should describe the condition rather than restate the name.
enabledbooleanWhether the label can be applied.
statusenumACTIVElabels are in use;RECOMMENDEDones are generated suggestions awaiting review.Show 2 enum valuesHide 2 enum values
RECOMMENDEDACTIVE
polarityenumWhether more of this label is good, bad, or neither, for trend reporting.
Show 3 enum valuesHide 3 enum values
HIGHER_IS_BETTERLOWER_IS_BETTERNEUTRAL
linkstringA link to the workflows page.