Skip to main content
POST
/
v2
/
textTranslations
Text translations v2
curl --request POST \
  --url https://eu.phrase.com/smt/api/v2/textTranslations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "sourceTexts": [
    {
      "key": "<string>",
      "source": "<string>"
    }
  ],
  "targetLang": {
    "code": "cs"
  },
  "consumerId": "<string>",
  "sourceLang": {
    "code": "cs"
  },
  "mtSettings": {
    "profile": {
      "uid": "CFUki8ptanoz1WAIYoXSH4"
    }
  }
}
'
{
  "sourceLang": {
    "code": "cs"
  },
  "targetLang": {
    "code": "cs"
  },
  "consumerId": "<string>",
  "translatedTexts": [
    {
      "key": "<string>",
      "target": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Provide Authorization header with token obtained through Login operation.

Body

application/json
sourceTexts
object[]
required
Required array length: 1 - 6 elements
targetLang
object
required
consumerId
string
required

Use short descriptive ID that represents the calling integration. E.g. JIRA_INTEGRATION, GDRIVE_SYNC, SHOPIFY_EXT:v1.2 etc.

Required string length: 1 - 50
sourceLang
object
mtSettings
object

Response

Response with translations

sourceLang
object
required
targetLang
object
required
consumerId
string
required

Use short descriptive ID that represents the calling integration. E.g. JIRA_INTEGRATION, GDRIVE_SYNC, SHOPIFY_EXT:v1.2 etc.

Required string length: 1 - 50
translatedTexts
object[]