Delete translation keys from your library

Endpoint

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

In order to delete one or multiple translation key(s) from your library, you need to send a POST request.

You need to use your authorisation Bearer token to be able to send the request. Simply add token as an attribute to the authorisation section of your request and your access token as its value.

Then, you need to add the following variables' values to your endpoint path:

    • team_name: {{TEAM_NAME}}
      Instead of {{TEAM_NAME}} you need to provide the team_name of your team.
    • library-id: {{LIBRARY_ID}
      Instead of {{LIBRARY_ID}}  you need to provide the library_id of the library where the key is located. 

Finally, you have to pass the following data in the body of your request: 

{ "data": { "type": "translation-keys", "attributes": { "key_names" : [ "name1", "name2" ] } } }

 

    • type: The value of this attribute needs to be set to "translation-keys"
    • key_names: This attribute is an array, meaning you can delete as many keys as you need

Request example

curl --location -g --request POST 'https://api.platform.easytranslate.com/strings-library/api/v1/teams/{{TEAM_NAME}}/libraries/{{LIBRARY_ID}}/keys/delete' \ --data-raw '{ "data": { "type": "translation-keys", "attributes": { "key_names" : [ "name1", "name2" ] } } }'

 

 

Another way to delete multiple keys at once is by sending a query as follows:

{ "data": { "type": "translation-keys", "attributes": { "query": { "key": "keyName", "text": keyText } } } }

 

    • type: The value of this attribute needs to be set to "translation-keys"
    • query: This attribute accepts an array, allowing you to delete multiple keys in a single request.
    • key (optional): A query for the names of the keys that should be deleted.
    • text (optional): A query for the text of the keys that should be deleted.

Request example

curl --location -g --request POST 'https://api.platform.easytranslate.com/strings-library/api/v1/teams/{{TEAM_NAME}}/libraries/{{LIBRARY_ID}}/keys/delete' \ --data-raw '{ "data": { "type": "translation-keys", "attributes": { "query": { "key": "keyName", "text": "keyText" } } } }'