Appearance
post/translate
Translates post text and title.
Overview
Use this endpoint to translate post content in preview mode or from stored post data.
Authentication
Authentication behavior is partially confirmed. See Authentication.
Permissions
Authentication is required.
Endpoint
post/translate
Purpose
Translates text and returns translated text or HTML.
Method and path
POST /post/translate
Headers
| Header | Required | Description |
|---|---|---|
X-Api-Key or X_API_KEY | yes | API key. |
Content-Type | yes | application/json. |
Request body
Preview mode:
| Field | Type | Required | Description |
|---|---|---|---|
intent | string | yes | Must be preview. |
postData.post_text | string | yes | Text to translate. |
postData.title | string | no | Optional title. |
postData.lang | string | no | Source language code. |
Normal mode:
| Field | Type | Required | Description |
|---|---|---|---|
projectId | integer | yes | Project identifier. |
uuid | string | yes | Post UUID. |
Example request
bash
curl -X POST "$SIGNAL_API_BASE_URL/post/translate" \
-H "X-Api-Key: $SIGNAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"intent": "preview",
"postData": {
"post_text": "Example text to translate",
"lang": "it"
}
}'Example response
html
<p>Translated text output</p>Notes
- Target language is controlled by the API translation configuration.