Skip to content

Rest API

Update the AI configuration

POST
/api/v1/ai/configuration

Update how the AI behaves for a workspace: its main language, product name, custom rules, response length, PII filtering and feedback replies.

Notes

  • A partial configuration is accepted. Fields you leave out keep their stored value, and derived attributes are recomputed from the merged result
  • accountId and websiteId come from the auth headers; anything the body says about them is ignored
  • Toggling optimizerEnabled clears the training-data content hashes, which makes the next ingest re-process every source
  • A translationCorpus whose rows have no recognised language column is rejected with 400. That normally means the CSV headers are not language names
x-api-key
required
string

Your API key from account settings.

x-user-email
required
string

The email address of your user.

x-account-id
required
string

The ID of your account. You can find this in the account settings.

x-website-id
required
string

The ID of the workspace you want to use.

object
mainLanguage

Primary language the AI answers in, as an ISO code.

string
productName

Name the AI uses for the product it supports.

string
customRules

Extra instructions applied to every answer.

string
nullable
responseLength

How long answers should be, e.g. Max.

string
suggestReplies
boolean
componentFilterPII
boolean
filterPIIByDefault
boolean
allowedPIIWords

Words never treated as PII, however the detector scores them.

Array<string>
apiOutputMetadataMode

Which conversation metadata the API and MCP server return. Unset means removeAll. Can only be changed in the dashboard, a different value sent here answers 400.

string
nullable
Allowed values: removeAll removeFields allowAll
apiOutputRemovedMetadataFields

Top-level metadata fields left out when apiOutputMetadataMode is removeFields. Case insensitive. Can only be changed in the dashboard.

Array<string>
nullable
apiOutputFilterPII

Whether PII is filtered from conversation data returned through the API and MCP server. Unset means true. Can only be changed in the dashboard.

boolean
nullable
customPiiPatterns

Regular expressions whose matches are filtered as PII by every enabled PII filter. Case-sensitive. Patterns run on a linear-time regex engine, so backreferences, lookaheads and repetition counts above 16 are not supported. Replaces the whole list.

Array<object>
<= 50 items
object
label
required

The kind of value the pattern matches, e.g. Customer number.

string
<= 50 characters
pattern
required

JavaScript regular expression source, without slashes or flags.

string
<= 500 characters
allowAllLanguages
boolean
restrictedAllowedLanguages

The languages the AI may answer in when allowAllLanguages is false.

Array<string>
negativeFeedbackReply
string
positiveFeedbackReply
string
optimizerEnabled

Changing this clears the training-data hashes and forces a full re-ingest.

boolean
topK

How many documents are retrieved per question.

number
modelTemperatureForAnswers
number
translationCorpus

Glossary of terms that must translate a fixed way. Rows are keyed by language name.

object
Example
{
"productName": "Unless",
"customRules": "Always answer in a friendly tone.",
"responseLength": "Max",
"suggestReplies": true
}

The stored configuration.

Bad request - missing body or websiteId, or an invalid translation corpus.

Unauthorized - invalid API key.