Update Label
PUThttps://api.confident-ai.com/v2/classifiers/{classifierId}/labels/{labelId}
Updates a label on a classifier and returns it. Only the fields you send are changed. Promoting a generated suggestion is an update to status ACTIVE, which also enables the label. Requires the Starter plan or above.
curl -X PUT "https://api.confident-ai.com/v2/classifiers/{classifierId}/labels/{labelId}" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"name": "Positive",
"description": "User expresses satisfaction, gratitude, or positive sentiment.",
"enabled": true,
"status": "RECOMMENDED",
"polarity": "HIGHER_IS_BETTER"
}'{
"success": true,
"data": {
"id": "<CLASSIFIER-LABEL-ID>",
"name": "Positive",
"description": "User expresses satisfaction, gratitude, or positive sentiment.",
"enabled": true,
"status": "RECOMMENDED",
"polarity": "HIGHER_IS_BETTER"
},
"link": "https://app.confident-ai.com/project/<PROJECT-ID>/workflows",
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
classifierIdstringRequiredThe id of the classifier the label belongs to.
labelIdstringRequiredThe id of the label.
Request body
namestringThe name of the label, unique within the classifier.
descriptionstringWhen this label applies. It cannot be cleared.
enabledbooleanWhether the label can be applied. Defaults to true.
statusenumACTIVE labels are in use; RECOMMENDED ones are generated suggestions awaiting review.
Show 2 enum valuesHide 2 enum values
RECOMMENDEDACTIVE
polarityenumWhether more of a signal is good, bad, or neither, for trend reporting.
Show 3 enum valuesHide 3 enum values
HIGHER_IS_BETTERLOWER_IS_BETTERNEUTRAL
Response
Update Label succeeded.
successbooleanIndicates if the request was successful.
dataobjectOne label a classifier can apply to what it classifies.
Show 6 propertiesHide 6 properties
idstringThe id of the label, generated by Confident AI.
namestringThe name of the label, unique within the classifier.
descriptionstringWhen this label applies. This is the instruction the classifying model reads, so it states the condition rather than restating the name.
enabledbooleanWhether the label can be applied.
statusenumACTIVE labels are in use; RECOMMENDED ones are generated suggestions awaiting review.
Show 2 enum valuesHide 2 enum values
RECOMMENDEDACTIVE
polarityenumWhether more of a signal is good, bad, or neither, for trend reporting.
Show 3 enum valuesHide 3 enum values
HIGHER_IS_BETTERLOWER_IS_BETTERNEUTRAL
linkstringThis is the URL of the resource on the Confident AI platform.
deprecatedbooleanIndicates if this endpoint is deprecated.