/brandCheck copy against brand rules: forbidden words/phrases, required terms that must appear, and preferred-term substitutions. Returns issues for violations plus suggested from->to replacements.
{
"properties": {
"rules": {
"properties": {
"forbidden_words": {
"items": {
"type": "string"
},
"type": "array"
},
"preferred_terms": {
"additionalProperties": {
"type": "string"
},
"description": "Map of from-term -> preferred replacement.",
"type": "object"
},
"required_terms": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"text": {
"description": "The copy to check.",
"type": "string"
}
},
"required": [
"text"
],
"type": "object"
}{
"properties": {
"endpoint": {
"type": "string"
},
"issues": {
"items": {
"type": "string"
},
"type": "array"
},
"ok": {
"type": "boolean"
},
"suggestions": {
"items": {
"properties": {
"from": {
"type": "string"
},
"to": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"valid": {
"type": "boolean"
}
},
"type": "object"
}{
"rules": {
"forbidden_words": [
"cheap"
],
"preferred_terms": {
"tool": "platform"
},
"required_terms": [
"Apiosk"
]
},
"text": "Our cheap tool is the best on the market."
}{
"endpoint": "brand",
"issues": [
"Forbidden word or phrase detected: cheap",
"Required term missing: Apiosk"
],
"ok": true,
"suggestions": [
{
"from": "tool",
"to": "platform"
}
],
"valid": false
}