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

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[]