1. Knowledge Base
  2. EasyTranslate API

How to create a library

Endpoint

https://api.platform.easytranslate.com/strings-library/api/v1/teams/:team-name/libraries/new

In order to create a new library, you need to send a POST request. 

 
You need to use your autorization Bearer token to be able to send the request.  Simply add token as an attribute to the autorization section of your request and your 
access token as its value.
 
In your request's header, you need to specify that json should be accepted. To do so, add "Accept" as a key and "application/json" as its value. 
 

Then, you need to add the following variable' s value to your endpoint path:

    • team_name:{{TEAM_NAME}}
      Instead of {{TEAM_NAME}}, you need to provide the team_name of your team. It can be retrieved from the api/v1/user endpoint. 

Finally, you need to add the following data,  to the body of your request:

{
"data": {
"type": "library",
"attributes": {
"name": "Your first library",
"description": "Your library description for your team...",
"source_language": "en",
"target_languages": [
"de",
"da"
],
"translations": {
"menu": {
"language": "Language",
"currency": "Currency",
"button": "Change"
},
"terms": {
"privacy_policy": {
"text": "Privacy Policy"
}
},
"summary": {
"title": "Your summary title here :)",
"text": "Here is your order summary.",
"language": {
"source": "Source language:",
"target": "Target language:"
},
"project_section": {
"name": "Project file name:",
"translator": "Translator:",
"word_count": "Word count:",
"price_label": "Price (excl. VAT)",
"price_total": "Total price (excl. VAT):"
}
}
}
}
}
}

 

Request example

https://api.platform.easytranslate.com/strings-library/api/v1/teams/{{TEAM_NAME}}/libraries/new