Script API#
Read scripts, override them per tenant, and analyze them. All endpoints are tenant-bound (X-Tenant).
Read scripts#
GET
/v2/audio/scriptsReturns the effective script set: default scripts overlaid with tenant overrides. With ?analyze=1, every entry comes with its full analysis.
bash
curl -s -H "X-Tenant: bbe" \ "https://api.callfluence.staging.bestbrandseverywhere.com/v2/audio/scripts?analyze=1"
Every entry carries its origin: "source": "default" or "source": "tenant".
Single script with analysis#
GET
/v2/audio/scripts/{touchpoint}Override a script#
PUT
/v2/audio/scripts/{touchpoint}bash
curl -s -X PUT -H "Content-Type: application/json" -H "X-Tenant: bbe" \
-d '{"text": "Einen Moment bitte, Ihr Anliegen wird sofort weiterbearbeitet."}' \
https://api.callfluence.staging.bestbrandseverywhere.com/v2/audio/scripts/call.holdThe response includes the immediate analysis of the new text — rule violations surface at save time, not in production:
json
{
"touchpoint_id": "call.hold",
"text": "Einen Moment bitte, Ihr Anliegen wird sofort weiterbearbeitet.",
"analysis": { "words": 8, "durationSec": 4, "variables": [], "findings": [] }
}Reset to default#
DELETE
/v2/audio/scripts/{touchpoint}Removes the tenant override; the default script applies again.
What the analysis checks#
| Rule | Level | Check |
|---|---|---|
dauer | warning | Estimated speaking time (110 words/minute) against the touchpoint's maxSeconds |
kundensicht | warning | Vendor perspective (we/us/our) instead of addressing the customer |
umlaute | error | ASCII substitutions (ue/ae/oe) in spoken text |
einwortzeile | warning | One-word lines addressed at the customer |
doppelte-kennzeichnung | warning | AI disclosure inside the script that is already prepended automatically |
Audio settings#
Recording and transcription are customer switches per tenant:
GET
/v2/audio/settingsPATCH
/v2/audio/settingsbash
curl -s -X PATCH -H "Content-Type: application/json" -H "X-Tenant: bbe" \
-d '{"recordingEnabled": false}' \
https://api.callfluence.staging.bestbrandseverywhere.com/v2/audio/settingsjson
{ "tenant": "bbe", "recordingEnabled": false, "transcriptionEnabled": true }