Translation
The environment's live translation policy, and the stop switch
GET /v1/translation-policy flows:read
Responses
- 200
Status
Fields
-
dataTranslationPolicyStatus requiredFields
-
policyany required -
suspendedAtstring | null requiredWhen the workspace's stop switch was set; nothing is translated while it is on
-
suspendedBystring | null required
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 404
Not found
- 429
rate_limited, or another limit named byerror.code
Register the live translation policy
PUT /v1/translation-policy flows:write
Like PUT /v1/recording-policy: hcc.serve reports it on startup (mode: "report" only activates a version never seen before) and hcc.translation.deploy activates it from CI. A call keeps the version it started with. A redeploy does not clear the workspace's stop switch.
Body
-
policyobject requiredFields
-
provider"platform" | objectDefault
"platform".Fields
object
-
integrationstring required
-
-
voice"none" | "rep" | "customer" | "both"Default
"none". -
noticeobjectDefault
{}.Fields
-
textstringDefault
"This call uses automated translation.". -
voicestring -
languagestring
-
-
repMayStartbooleanDefault
false. -
autoStartfalse | "language_differs" | objectDefault
false.Fields
object
-
when"language_differs" required -
voice"never" | "known_only"Default
"never".
-
-
detectLanguagebooleanDefault
false. -
keepTranscriptbooleanDefault
false. -
maxMinutesPerCallintegerDefault
120. 1 to 240.
-
-
mode"report" | "deploy"Default
"report". -
alsoTestbooleanLive keys only: also register the same version in test Default
false.
Responses
- 200
The registered version
Fields
-
dataTranslationPolicy requiredWhat
defineTranslationPolicydeclares. No call is translated unless one is deployed.Fields
-
versionstring required -
environment"live" | "test" required -
definitionobject required -
createdAtstring required -
activatedAtstring required -
lastSeenAtstring required
-
-
testobjectWith
alsoTest: the version registered in testFields
-
dataTranslationPolicy requiredWhat
defineTranslationPolicydeclares. No call is translated unless one is deployed.
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 404
Not found
- 429
rate_limited, or another limit named byerror.code
Translate a call
POST /v1/calls/{id}/translation calls:write
Plays the policy’s notice to the customer, then translates between them and the rep. Answers once the notice is playing; call.translation.started or call.translation.failed follows. A refusal is a 409 whose details.reason says why: not_configured, not_allowed, no_rep, language_unsupported, unavailable_on_carrier, suspended. Starting one that runs already answers it.
Path
idstring required
Body
-
customerstringThe customer's language. Else what the call knows (a queue's, a lead's)
-
repstringThe rep's. Else their profile's
-
voice"none" | "rep" | "customer" | "both"Who hears it spoken:
none(captions only),rep,customerorboth. At most what the policy allows. Default: the policy's
Responses
- 202
Starting
Fields
-
dataCallTranslation requiredstarting: the customer is hearing the notice.call.translation.startedsays when it runs.Fields
-
idstring required -
status"starting" | "running" | "stopped" required -
customerLanguagestring required -
repLanguagestring required -
repIdstring required -
voice"none" | "rep" | "customer" | "both" required -
startedBy"code" | "rep" | "auto" required -
startedAtstring | null required -
stopReason"requested" | "rep_left" | "call_ended" | "languages_match" | "limit" | "billing" | "suspended" | "provider_error" | null required
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 404
Not found
- 429
rate_limited, or another limit named byerror.code
Stop translating a call
DELETE /v1/calls/{id}/translation calls:write
call.translation.stopped follows with the minutes billed. Your code may start it again; a rep who turns it off on the Desk keeps it off for the call.
Path
idstring required
Responses
- 202
Stopping, or nothing ran
Fields
-
dataany required
-
- 400
Invalid request
- 401
Missing or invalid API key
- 404
Not found
- 429
rate_limited, or another limit named byerror.code
A call's translations
GET /v1/calls/{id}/translations calls:read
Each stretch of live translation on the call, oldest first. With the policy’s keepTranscript, its final lines in both languages, kept under the recording policy’s transcript retention (365 days without one). Events never carry the text.
Path
idstring required
Responses
- 200
Translations
Fields
-
dataCallTranslationStretch[] requiredFields
-
idstring required -
customerLanguagestring | null required -
repLanguagestring | null required -
repIdstring | null required -
voice"none" | "rep" | "customer" | "both" required -
startedBy"code" | "rep" | "auto" | null required -
startedAtstring required -
endedAtstring | null requiredNull while it runs
-
stopReason"requested" | "rep_left" | "call_ended" | "languages_match" | "limit" | "billing" | "suspended" | "provider_error" | null required -
billedMinutesinteger required -
transcript"none" | "kept" | "deleted" requirednone: the policy had nokeepTranscript.kept: the lines are here untildeleteAfter.deleted: retention or a delete on request took them. -
deleteAfterstring | null required -
linesobject[] requiredThe final lines, in order. Empty unless
transcriptiskept.
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 404
Not found
- 429
rate_limited, or another limit named byerror.code
Clear the workspace's translation stop switch
DELETE /v1/translation-policy/suspension translation:manage
The dashboard can only stop translation. Starting it again is this deliberate call, with a live key that has the translation:manage scope, which only an owner or admin can grant. New calls follow the policy again; calls already in progress keep none.
Responses
- 204
Cleared
- 400
Invalid request
- 401
Missing or invalid API key
- 404
Not found
- 429
rate_limited, or another limit named byerror.code