Introducing Confident Voice: Watch the Launch Video Now

Update Classifier

(v2)

PUT

Updates a classifier and returns it. Only the fields you send are changed: omitting a field leaves it untouched, and sending null clears it. dataModel cannot be changed after creation and a preset can only be applied when creating one; labels are managed through their own endpoints.

PUT/v2/classifiers/{classifierId}
curl -X PUT "https://api.confident-ai.com/v2/classifiers/{classifierId}" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Sentiment",
  "description": "Analyzes the emotional tone of user interactions.",
  "enabled": true,
  "autoClassify": true,
  "includeAudio": false,
  "filters": {
    "operator": "AND",
    "groups": [
      {
        "operator": "AND",
        "filters": [
          {
            "category": "Trace Name",
            "condition": "Is",
            "value": "checkout"
          }
        ]
      }
    ]
  },
  "autoGenerationConfig": {
    "sampleSize": 200
  }
}'
200
{
  "success": true,
  "data": {
    "id": "<CLASSIFIER-ID>",
    "name": "Sentiment",
    "description": "Analyzes the emotional tone of user interactions.",
    "enabled": true,
    "autoClassify": true,
    "includeAudio": false,
    "dataModel": "TRACE",
    "filters": {
      "operator": "AND",
      "groups": [
        {
          "operator": "AND",
          "filters": [
            {
              "category": "User Id",
              "condition": "Is less than",
              "value": "string",
              "key": "string"
            }
          ]
        }
      ]
    },
    "autoGenerationConfig": {
      "sampleSize": 200
    },
    "labels": [
      {
        "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_KEYstringRequired

    The API key of your Confident AI project.

Path parameters

  • classifierIdstringRequired

    The id of the classifier.

Request body

  • namestring

    The name of the classifier, unique per data model within the project.

  • descriptionstring | null

    What this classifier is for. Send null to clear it.

  • enabledboolean

    Whether the classifier runs at all. Defaults to true on create; omit it on an update to leave it unchanged.

  • autoClassifyboolean

    Whether incoming items are classified automatically as they arrive. Defaults to true on create; omit it on an update to leave it unchanged.

  • includeAudioboolean

    Whether the item's call recording and any audio in its inputs and outputs are sent to the classifier alongside the text, so it can catch issues that only show in the audio or in a mismatch between the audio and its transcript. Needs an audio-capable platform model. Defaults to false on create; omit it on an update to leave it unchanged.

  • filtersobject | null

    A set of filter groups combined by a top-level operator. Each group combines its filter rows by its own operator, and each row matches one property, such as Name or User Id, against a value with a condition such as Is or Contains.

    Show 2 propertiesHide 2 properties
    • operatorenumRequired

      How the groups combine: AND matches a record only when every group matches it, and OR matches it when any one group does.

      Show 2 enum valuesHide 2 enum values
      • AND
      • OR
    • groupslist of objectsRequired

      The groups of filters to apply, each combining its own filters with its own operator.

      Show 2 propertiesHide 2 properties
      • operatorenumRequired

        Show 2 enum valuesHide 2 enum values
        • AND
        • OR
      • filterslist of objectsRequired

        Show 4 propertiesHide 4 properties
        • categoryenumRequired

          Show 100 enum valuesHide 100 enum values
          • User Id
          • Customer Id
          • Customer Name
          • Thread Id
          • Trace UUID
          • Trace Name
          • Trace Version
          • Trace Status
          • Trace Tags
          • Trace
          • Span UUID
          • Name
          • Span Name
          • Span Type
          • Span Status
          • Metrics Status
          • Error Status
          • Called tool
          • Handed off to
          • Handed off by
          • Nearest parent of type
          • Anywhere under
          • Top level
          • Name
          • Model
          • Provider
          • Integration
          • Input argument
          • Embedder
          • Chunk Size
          • Top-K
          • Hyperparameter
          • Dataset
          • Dataset Name
          • Test Run ID
          • Identifier
          • Test File
          • Status
          • Official
          • Evals Mode
          • Tests Passed
          • Tests Failed
          • Pass Rate
          • Fail Rate
          • Star Rating
          • Thumbs Rating
          • Explanation
          • Expected Output
          • Expected Outcome
          • Annotator
          • End User
          • Annotation Type
          • Annotation Name
          • Annotation Date
          • Annotation Rating
          • Annotation Thumbs
          • Annotation Choice
          • Annotation Yes / No
          • Annotation Text
          • Metric Score
          • Metric Status
          • Metric Version
          • Name
          • Metadata
          • Classifier
          • Classifier Version
          • Metric
          • Metric Name
          • Trace Count
          • Test Case ID
          • Requested review from
          • Assigned to
          • Tags
          • Labels
          • Tools Called
          • Finalized
          • Golden ID
          • Ingestion Task
          • Latency
          • Environment
          • Review flag
          • Vulnerability
          • Vulnerability Type
          • Attack Method
          • Risk Category
          • Framework
          • Assessment ID
          • Prompt Alias
          • Prompt Version
          • Prompt Label
          • Prompt Commit Hash
          • Prompt
          • Annotations
          • Failure Mode
          • Recommended
          • Sub-mode Name
          • Sub-mode Recommended
          • Sub-mode Certainty
          • Status Code
          • Actor Type
        • conditionenum | enum | enum | enum | enum | enum | enum | enum | enum | enumRequired

          Show 10 variantsHide 10 variants
          • enum

            Show 6 enum valuesHide 6 enum values
            • Is less than
            • Is equal or less than
            • Is greater than
            • Is equal or greater than
            • Is equal to
            • Does not equal
          • OR
          • enum

            Show 2 enum valuesHide 2 enum values
            • Has
            • Has not
          • OR
          • enum

            Show 2 enum valuesHide 2 enum values
            • Is
            • Is not
          • OR
          • enum

            Show 2 enum valuesHide 2 enum values
            • Is one of
            • Is not one of
          • OR
          • enum

            Show 4 enum valuesHide 4 enum values
            • Is
            • Is not
            • Is empty
            • Is not empty
          • OR
          • enum

            Show 2 enum valuesHide 2 enum values
            • Contains
            • Does not contain
          • OR
          • enum

            Show 3 enum valuesHide 3 enum values
            • Contains
            • Contains only
            • Does not contain
          • OR
          • enum

            Show 4 enum valuesHide 4 enum values
            • Has decreased by more than
            • Has decreased by less than
            • Has increased by more than
            • Has increased by less than
          • OR
          • enum

            Show 1 enum valueHide 1 enum value
            • Has changed from
          • OR
          • enum

            Show 1 enum valueHide 1 enum value
            • Is between
        • valuestring | number | list of stringsRequired

          Show 3 variantsHide 3 variants
          • string

          • OR
          • number

          • OR
          • list of strings

        • keystring

  • autoGenerationConfigobject | null

    How many recent traces, spans or threads a generation run samples and classifies.

    Show 1 propertyHide 1 property
    • sampleSizeinteger

      How many traces, spans or threads to sample. Defaults to 200.

Response

Update Classifier succeeded.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    A classifier: what it runs on, how it generates labels, and the labels it can apply.

    Show 10 propertiesHide 10 properties
    • idstring

      The id of the classifier, generated by Confident AI.

    • namestring

      The name of the classifier.

    • descriptionstring | null

      What this classifier is for, or null when it has no description.

    • enabledboolean

      Whether the classifier runs at all.

    • autoClassifyboolean

      Whether incoming items are classified automatically as they arrive.

    • includeAudioboolean

      Whether the item's call recording and any audio in its inputs and outputs are sent to the classifier alongside the text.

    • dataModelenum

      What kind of production item a classifier labels: TRACE labels individual traces, SPAN labels a span together with the spans under it, THREAD labels whole conversations. It is fixed when the classifier is created.

      Show 3 enum valuesHide 3 enum values
      • TRACE
      • SPAN
      • THREAD
    • filtersobject

      A set of filter groups combined by a top-level operator. Each group combines its filter rows by its own operator, and each row matches one property, such as Name or User Id, against a value with a condition such as Is or Contains.

      Show 2 propertiesHide 2 properties
      • operatorenum

        How the groups combine: AND matches a record only when every group matches it, and OR matches it when any one group does.

        Show 2 enum valuesHide 2 enum values
        • AND
        • OR
      • groupslist of objects

        The groups of filters to apply, each combining its own filters with its own operator.

        Show 2 propertiesHide 2 properties
        • operatorenum

          Show 2 enum valuesHide 2 enum values
          • AND
          • OR
        • filterslist of objects

          Show 4 propertiesHide 4 properties
          • categoryenum

            Show 100 enum valuesHide 100 enum values
            • User Id
            • Customer Id
            • Customer Name
            • Thread Id
            • Trace UUID
            • Trace Name
            • Trace Version
            • Trace Status
            • Trace Tags
            • Trace
            • Span UUID
            • Name
            • Span Name
            • Span Type
            • Span Status
            • Metrics Status
            • Error Status
            • Called tool
            • Handed off to
            • Handed off by
            • Nearest parent of type
            • Anywhere under
            • Top level
            • Name
            • Model
            • Provider
            • Integration
            • Input argument
            • Embedder
            • Chunk Size
            • Top-K
            • Hyperparameter
            • Dataset
            • Dataset Name
            • Test Run ID
            • Identifier
            • Test File
            • Status
            • Official
            • Evals Mode
            • Tests Passed
            • Tests Failed
            • Pass Rate
            • Fail Rate
            • Star Rating
            • Thumbs Rating
            • Explanation
            • Expected Output
            • Expected Outcome
            • Annotator
            • End User
            • Annotation Type
            • Annotation Name
            • Annotation Date
            • Annotation Rating
            • Annotation Thumbs
            • Annotation Choice
            • Annotation Yes / No
            • Annotation Text
            • Metric Score
            • Metric Status
            • Metric Version
            • Name
            • Metadata
            • Classifier
            • Classifier Version
            • Metric
            • Metric Name
            • Trace Count
            • Test Case ID
            • Requested review from
            • Assigned to
            • Tags
            • Labels
            • Tools Called
            • Finalized
            • Golden ID
            • Ingestion Task
            • Latency
            • Environment
            • Review flag
            • Vulnerability
            • Vulnerability Type
            • Attack Method
            • Risk Category
            • Framework
            • Assessment ID
            • Prompt Alias
            • Prompt Version
            • Prompt Label
            • Prompt Commit Hash
            • Prompt
            • Annotations
            • Failure Mode
            • Recommended
            • Sub-mode Name
            • Sub-mode Recommended
            • Sub-mode Certainty
            • Status Code
            • Actor Type
          • conditionenum | enum | enum | enum | enum | enum | enum | enum | enum | enum

            Show 10 variantsHide 10 variants
            • enum

              Show 6 enum valuesHide 6 enum values
              • Is less than
              • Is equal or less than
              • Is greater than
              • Is equal or greater than
              • Is equal to
              • Does not equal
            • OR
            • enum

              Show 2 enum valuesHide 2 enum values
              • Has
              • Has not
            • OR
            • enum

              Show 2 enum valuesHide 2 enum values
              • Is
              • Is not
            • OR
            • enum

              Show 2 enum valuesHide 2 enum values
              • Is one of
              • Is not one of
            • OR
            • enum

              Show 4 enum valuesHide 4 enum values
              • Is
              • Is not
              • Is empty
              • Is not empty
            • OR
            • enum

              Show 2 enum valuesHide 2 enum values
              • Contains
              • Does not contain
            • OR
            • enum

              Show 3 enum valuesHide 3 enum values
              • Contains
              • Contains only
              • Does not contain
            • OR
            • enum

              Show 4 enum valuesHide 4 enum values
              • Has decreased by more than
              • Has decreased by less than
              • Has increased by more than
              • Has increased by less than
            • OR
            • enum

              Show 1 enum valueHide 1 enum value
              • Has changed from
            • OR
            • enum

              Show 1 enum valueHide 1 enum value
              • Is between
          • valuestring | number | list of strings

            Show 3 variantsHide 3 variants
            • string

            • OR
            • number

            • OR
            • list of strings

          • keystring

    • autoGenerationConfigobject | null

      How many recent traces, spans or threads a generation run samples and classifies.

      Show 1 propertyHide 1 property
      • sampleSizeinteger

        How many traces, spans or threads to sample. Defaults to 200.

    • labelslist of objects

      The labels this classifier can apply.

      Show 6 propertiesHide 6 properties
      • idstring

        The id of the label, generated by Confident AI.

      • namestring

        The name of the label, unique within the classifier.

      • descriptionstring

        When this label applies. This is the instruction the classifying model reads, so it states the condition rather than restating the name.

      • enabledboolean

        Whether the label can be applied.

      • statusenum

        ACTIVE labels are in use; RECOMMENDED ones are generated suggestions awaiting review.

        Show 2 enum valuesHide 2 enum values
        • RECOMMENDED
        • ACTIVE
      • polarityenum

        Whether more of a signal is good, bad, or neither, for trend reporting.

        Show 3 enum valuesHide 3 enum values
        • HIGHER_IS_BETTER
        • LOWER_IS_BETTER
        • NEUTRAL
  • linkstring

    This is the URL of the resource on the Confident AI platform.

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI