POST
/
json
/
v1
/
translate
curl --request POST \
  --url https://api.jsontrans.com/json/v1/translate \
  --header 'Content-Type: application/json' \
  --header 'jt-api-key: <jt-api-key>' \
  --data '{
  "from_lang": "en",
  "to_lang": "zh",
  "origin_json": "{\"text\": \"Hello, world!\"}",
  "ignored_fields": "image,url"
}'
{
  "code": 200,
  "msg": "Translation document created successfully",
  "data": {
    "id": "5fdb00c9-ce05-484e-a7e2-5f578953114b"
  }
}

Headers

jt-api-key
string
required

API authentication key

Body

application/json
Translation document to be created
from_lang
string
required

Source language code

Example:

"en"

to_lang
string
required

Target language code

Example:

"zh"

origin_json
string
required

Original JSON text to be translated

Example:

"{\"text\": \"Hello, world!\"}"

ignored_fields
string

Ignored fields

Example:

"image,url"

Response

200
application/json
Translation document created successfully
code
integer
Example:

200

msg
string
Example:

"Translation document created successfully"

data
object