The Translations API in AnswerPal provides endpoints for translating arbitrary text using AI. This page documents the endpoints, request and response data models, and practical examples for seamless integration.
{ "sourceText": "Hello, how are you?", "targetLang": "fr" }
Property: sourceText Type: string Description: The text to translate. Required.
Property: targetLang Type: string Description: The target language (ISO 639-1 or 639-3 code, e.g. “fr”, “de”). Required.
Example: “Bonjour, comment allez-vous ?”
Type: string Description: The translated text (as a string).
{ "sourceText": "Thank you for your message.", "targetLang": "de" }
“Danke für Ihre Nachricht.”
Error Codes:
GET /api/Translations/detect-language-ai?country=…&state=…&city=…
Detects the most likely language based on location information using AI.
Parameter: country Type: string Description: Country name (required)
Parameter: state Type: string Description: State or region (optional)
Parameter: city Type: string Description: City (optional)
“nl” (ISO language code)
Error Codes:
Property: sourceText Type: string
Description: The text to translate. Required.
Property: targetLang Type: string
Description: The target language (ISO 639-1 or 639-3 code, e.g. “fr”, “de”). Required.
The translated text is returned as a plain string.
See Also: For per-channel UI/message translations (such as chat window greetings, button labels, and more), see the Channel Translations documentation in the Channels API Reference.
Any language supported by the underlying AI translation provider (typically ISO 639 codes).
Only plain text is supported for /api/Translations/translate. Use /api/Translations/translate-to-html for HTML output.
AnswerPal: AI-powered customer service solutions to elevate your support and communication effortlessly.
For all support, sales, and partnership inquiries, email us at info@answerpal.eu