Skip to main content
PUT
/
v1
/
models
/
{id}
Update an existing analysis model
curl --request PUT \
  --url https://api.example.com/v1/models/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Customer Service Evaluation v2",
  "description": "Comprehensive evaluation model for customer service calls",
  "prompt": "Evaluate the call based on professional standards...",
  "template_variables": [
    {
      "key": "greeting_quality",
      "type": "INTEGER",
      "required": true
    },
    {
      "key": "resolution_achieved",
      "type": "BOOLEAN",
      "required": true
    }
  ]
}
'
{
  "id": 1,
  "client_id": "client_abc123",
  "name": "Customer Service Evaluation v2",
  "description": "Comprehensive evaluation model for customer service calls",
  "prompt": "<string>",
  "enabled": true,
  "created_at": "2023-11-07T05:31:56Z",
  "created_by": "<string>",
  "template_metadata": [],
  "updated_at": "2023-11-07T05:31:56Z",
  "updated_by": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
integer
required

Unique identifier of the analysis model

Body

application/json

Request body for creating or updating an analysis model

name
string
required

Unique name for this analysis model

Required string length: 1 - 255
Example:

"Customer Service Evaluation v2"

description
string
required

Detailed description of what this model evaluates

Example:

"Comprehensive evaluation model for customer service calls including greeting, problem resolution, and closing."

prompt
string
required

Analysis configuration defining evaluation criteria and scoring rules

template_variables
TemplateVariable · object[]

List of variables to extract during analysis

Response

Successful Response

Analysis model details and configuration

id
integer
required

Unique identifier for this model

Example:

1

client_id
string
required

Owner client identifier

Example:

"client_abc123"

name
string
required

Model name

Example:

"Customer Service Evaluation v2"

description
string
required

Detailed description of the model

Example:

"Comprehensive evaluation model for customer service calls"

prompt
string
required

Analysis configuration and evaluation criteria

enabled
boolean
required

Whether this model is active and available for use

Example:

true

created_at
string<date-time>
required

Timestamp when model was created (UTC)

created_by
string
required

Creator identifier

template_metadata
ClientTemplateMetadata · object[]

Configured metadata fields for additional data extraction

updated_at
string<date-time>

Timestamp of last update (UTC)

updated_by
string

Last updater identifier