{"_id":"5512229cc1b13537009f5d99","category":"5512229cc1b13537009f5d97","createdAt":"2015-03-23T18:47:00.326Z","excerpt":"This page will help you get started with MotaWord. You'll be up and running in a jiffy!","githubsync":"","project":"55105fa24980621900063340","sync_unique":"","body":"MotaWord API was designed to allow your access to high-quality, fast and cost-effective translation in over 90 languages. Your site, application or program can interact with the MotaWord API to:\n\n  * Get instant quotes for translation of all types of content in over 90 languages and a myriad of file types,\n  * Submit new translation projects,\n  * Add documents, style guides and glossaries to help in the consistency and context of your projects,\n  * Track the project progress in each language,\n  * Fetch activity feeds in real time,\n  * And any other features that we keep adding.","version":"5512229bc1b13537009f5d96","order":0,"title":"Getting Started with MotaWord","link_external":false,"slug":"getting-started","type":"basic","updates":[],"user":"55105f652dd9010d0019e17b","api":{"params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"url":"","auth":"required","settings":""},"hidden":false,"__v":5,"link_url":"","parentDoc":null,"isReference":false,"next":{"description":"","pages":[]},"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

Getting Started with MotaWord

This page will help you get started with MotaWord. You'll be up and running in a jiffy!

MotaWord API was designed to allow your access to high-quality, fast and cost-effective translation in over 90 languages. Your site, application or program can interact with the MotaWord API to: * Get instant quotes for translation of all types of content in over 90 languages and a myriad of file types, * Submit new translation projects, * Add documents, style guides and glossaries to help in the consistency and context of your projects, * Track the project progress in each language, * Fetch activity feeds in real time, * And any other features that we keep adding.
MotaWord API was designed to allow your access to high-quality, fast and cost-effective translation in over 90 languages. Your site, application or program can interact with the MotaWord API to: * Get instant quotes for translation of all types of content in over 90 languages and a myriad of file types, * Submit new translation projects, * Add documents, style guides and glossaries to help in the consistency and context of your projects, * Track the project progress in each language, * Fetch activity feeds in real time, * And any other features that we keep adding.
{"_id":"55122b42c1b13537009f5dad","api":{"url":"","auth":"required","params":[],"results":{"codes":[{"code":"{}","name":"","status":200,"language":"json"},{"status":400,"language":"json","code":"{}","name":""}]},"settings":""},"body":"Follow [this link](https://www.motaword.com/register/developer), fill in the registration form and you will be on your way to access our API.\n\nTo learn more about how to get started with an API application, go to the next section. For all your questions regarding our API send an e-mail to \"[email protected]\".","createdAt":"2015-03-25T03:28:02.996Z","order":1,"excerpt":"","githubsync":"","hidden":false,"link_external":false,"title":"Registering as a developer","type":"basic","category":"5512229cc1b13537009f5d97","updates":[],"version":"5512229bc1b13537009f5d96","__v":6,"link_url":"","project":"55105fa24980621900063340","slug":"registering-as-a-developer","sync_unique":"","user":"55105f652dd9010d0019e17b","parentDoc":null,"isReference":false,"next":{"description":"","pages":[]},"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

Registering as a developer


Follow [this link](https://www.motaword.com/register/developer), fill in the registration form and you will be on your way to access our API. To learn more about how to get started with an API application, go to the next section. For all your questions regarding our API send an e-mail to "[email protected]".
Follow [this link](https://www.motaword.com/register/developer), fill in the registration form and you will be on your way to access our API. To learn more about how to get started with an API application, go to the next section. For all your questions regarding our API send an e-mail to "[email protected]".
{"_id":"55122b52c1b13537009f5daf","githubsync":"","order":2,"updates":[],"category":"5512229cc1b13537009f5d97","excerpt":"","slug":"obtaining-your-api-keys","type":"basic","link_external":false,"project":"55105fa24980621900063340","hidden":false,"user":"55105f652dd9010d0019e17b","api":{"auth":"required","params":[],"results":{"codes":[{"code":"{}","name":"","status":200,"language":"json"},{"name":"","status":400,"language":"json","code":"{}"}]},"url":""},"createdAt":"2015-03-25T03:28:18.563Z","link_url":"","sync_unique":"","title":"Obtaining your API keys","version":"5512229bc1b13537009f5d96","__v":6,"body":"To start using the MotaWord API, you will first need to create an application. After registering as a developer, go to [create an application](https://www.motaword.com/developer/create). You will be asked to enter an application name and will be prompted to select its type.\n\nA name can be whatever you choose to identify your application. The application types, however, have a distinction.\n\n**Regular: ** \"Regular\" type applications are the most common. It is just a basic API client (we call them \"applications\").\n\n**WordPress and Drupal: ** This type of API application is specially customized for our WordPress and Drupal plugins. The main difference is the /download call response. Regular type applications always return a ZIP file, containing all of your projects' translated documents. However, our WordPress and Drupal plugins create projects with only one file, containing the post title and body. Thus, as this is a defined behavior of WordPress and Drupal plugins, we return the translated version of this single file in the /download call response, instead of a ZIP file.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"If you have a workflow that will always require a single document, you can choose to use WordPress and Drupal type of application. However we do not recommend this as the process was mainly created as a scenario for WordPress and Drupal specifically.\"\n}\n[/block]\nAfter creating your application, you can access your client ID and client secret key, by following the \"View Keys\" link. You will use this ID and secret key to obtain an access token to authenticate your API requests. See \"[Getting an access token](http://motaword.readme.io/docs/token)\" section to learn more about this.\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"Remember, your application secret key needs to be safeguarded. You should only share this with trusted parties.\"\n}\n[/block]","parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

Obtaining your API keys


To start using the MotaWord API, you will first need to create an application. After registering as a developer, go to [create an application](https://www.motaword.com/developer/create). You will be asked to enter an application name and will be prompted to select its type. A name can be whatever you choose to identify your application. The application types, however, have a distinction. **Regular: ** "Regular" type applications are the most common. It is just a basic API client (we call them "applications"). **WordPress and Drupal: ** This type of API application is specially customized for our WordPress and Drupal plugins. The main difference is the /download call response. Regular type applications always return a ZIP file, containing all of your projects' translated documents. However, our WordPress and Drupal plugins create projects with only one file, containing the post title and body. Thus, as this is a defined behavior of WordPress and Drupal plugins, we return the translated version of this single file in the /download call response, instead of a ZIP file. [block:callout] { "type": "info", "body": "If you have a workflow that will always require a single document, you can choose to use WordPress and Drupal type of application. However we do not recommend this as the process was mainly created as a scenario for WordPress and Drupal specifically." } [/block] After creating your application, you can access your client ID and client secret key, by following the "View Keys" link. You will use this ID and secret key to obtain an access token to authenticate your API requests. See "[Getting an access token](http://motaword.readme.io/docs/token)" section to learn more about this. [block:callout] { "type": "warning", "body": "Remember, your application secret key needs to be safeguarded. You should only share this with trusted parties." } [/block]
To start using the MotaWord API, you will first need to create an application. After registering as a developer, go to [create an application](https://www.motaword.com/developer/create). You will be asked to enter an application name and will be prompted to select its type. A name can be whatever you choose to identify your application. The application types, however, have a distinction. **Regular: ** "Regular" type applications are the most common. It is just a basic API client (we call them "applications"). **WordPress and Drupal: ** This type of API application is specially customized for our WordPress and Drupal plugins. The main difference is the /download call response. Regular type applications always return a ZIP file, containing all of your projects' translated documents. However, our WordPress and Drupal plugins create projects with only one file, containing the post title and body. Thus, as this is a defined behavior of WordPress and Drupal plugins, we return the translated version of this single file in the /download call response, instead of a ZIP file. [block:callout] { "type": "info", "body": "If you have a workflow that will always require a single document, you can choose to use WordPress and Drupal type of application. However we do not recommend this as the process was mainly created as a scenario for WordPress and Drupal specifically." } [/block] After creating your application, you can access your client ID and client secret key, by following the "View Keys" link. You will use this ID and secret key to obtain an access token to authenticate your API requests. See "[Getting an access token](http://motaword.readme.io/docs/token)" section to learn more about this. [block:callout] { "type": "warning", "body": "Remember, your application secret key needs to be safeguarded. You should only share this with trusted parties." } [/block]
{"_id":"551ff9ff623ff50d009b2ba7","__v":1,"body":"All API clients have a daily rate limit of 2,000 requests. For all requests regarding increase of this limit please send an e-mail to [email protected]motaword.com.","hidden":false,"type":"basic","user":"55105f652dd9010d0019e17b","createdAt":"2015-04-04T14:49:35.629Z","excerpt":"","link_external":false,"order":4,"title":"Rate limiting","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"url":""},"category":"5512229cc1b13537009f5d97","slug":"rate-limiting","version":"5512229bc1b13537009f5d96","githubsync":"","link_url":"","project":"55105fa24980621900063340","sync_unique":"","updates":[],"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

Rate limiting


All API clients have a daily rate limit of 2,000 requests. For all requests regarding increase of this limit please send an e-mail to [email protected]
All API clients have a daily rate limit of 2,000 requests. For all requests regarding increase of this limit please send an e-mail to [email protected]
{"_id":"55229e46b4a0de0d00de7e60","project":"55105fa24980621900063340","slug":"client-sdks","title":"Client SDKs","updates":[],"api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":"","url":""},"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nYou can easily start using our PHP SDK to interact with the API. It is available in [GitHub](https://github.com/MotaWord/php-sdk) and you can also install it with composer: `composer install motaword`.\n\n\nSee the documentation and examples in GitHub repository for more details.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Python\"\n}\n[/block]\nOur Python SDK to interact with the API is available in GitHub. You can also install it with pip: `pip install motaword`.\n\nSee the documentation and examples in GitHub repository for more details.\n[block:api-header]\n{\n  \"title\": \"Ruby\"\n}\n[/block]\nYou can easily start using MotaWord Ruby SDK by Bonusly to interact with the API. It is open sourced by Bonusly, available in [GitHub](https://github.com/bonusly/motaword-ruby).\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Others\"\n}\n[/block]\nWe provide a Swagger definition for our API which you can find at the root endpoint: [https://api.motaword.com](https://api.motaword.com) \n\nThis lets you generated SDKs in various languages by using [swagger-codegen](https://github.com/swagger-api/swagger-codegen) or [Apimatics](https://apimatic.io/).\n\nWe will be rolling more of our own SDKs out in the near future, but until then, SDKs generated by these two tools should be more than enough to get you started!","link_url":"","sync_unique":"","version":"5512229bc1b13537009f5d96","__v":5,"createdAt":"2015-04-06T14:55:02.641Z","excerpt":"","link_external":false,"order":7,"category":"5512229cc1b13537009f5d97","githubsync":"","hidden":false,"type":"basic","user":"55105f652dd9010d0019e17b","parentDoc":null,"metadata":{"title":"","description":"","image":[]},"isReference":false,"next":{"description":"","pages":[]},"childrenPages":[]}

Client SDKs


[block:api-header] { "type": "basic", "title": "PHP" } [/block] You can easily start using our PHP SDK to interact with the API. It is available in [GitHub](https://github.com/MotaWord/php-sdk) and you can also install it with composer: `composer install motaword`. See the documentation and examples in GitHub repository for more details. [block:api-header] { "type": "basic", "title": "Python" } [/block] Our Python SDK to interact with the API is available in GitHub. You can also install it with pip: `pip install motaword`. See the documentation and examples in GitHub repository for more details. [block:api-header] { "title": "Ruby" } [/block] You can easily start using MotaWord Ruby SDK by Bonusly to interact with the API. It is open sourced by Bonusly, available in [GitHub](https://github.com/bonusly/motaword-ruby). [block:api-header] { "type": "basic", "title": "Others" } [/block] We provide a Swagger definition for our API which you can find at the root endpoint: [https://api.motaword.com](https://api.motaword.com) This lets you generated SDKs in various languages by using [swagger-codegen](https://github.com/swagger-api/swagger-codegen) or [Apimatics](https://apimatic.io/). We will be rolling more of our own SDKs out in the near future, but until then, SDKs generated by these two tools should be more than enough to get you started!
[block:api-header] { "type": "basic", "title": "PHP" } [/block] You can easily start using our PHP SDK to interact with the API. It is available in [GitHub](https://github.com/MotaWord/php-sdk) and you can also install it with composer: `composer install motaword`. See the documentation and examples in GitHub repository for more details. [block:api-header] { "type": "basic", "title": "Python" } [/block] Our Python SDK to interact with the API is available in GitHub. You can also install it with pip: `pip install motaword`. See the documentation and examples in GitHub repository for more details. [block:api-header] { "title": "Ruby" } [/block] You can easily start using MotaWord Ruby SDK by Bonusly to interact with the API. It is open sourced by Bonusly, available in [GitHub](https://github.com/bonusly/motaword-ruby). [block:api-header] { "type": "basic", "title": "Others" } [/block] We provide a Swagger definition for our API which you can find at the root endpoint: [https://api.motaword.com](https://api.motaword.com) This lets you generated SDKs in various languages by using [swagger-codegen](https://github.com/swagger-api/swagger-codegen) or [Apimatics](https://apimatic.io/). We will be rolling more of our own SDKs out in the near future, but until then, SDKs generated by these two tools should be more than enough to get you started!
{"_id":"552fc2b34329c20d00fa9d04","hidden":false,"slug":"api-hosts","version":"5512229bc1b13537009f5d96","body":"We have two API hosts, one is live and the other one is for sandboxing.\n\n**Live:** https://api.motaword.com\n\n**Sandbox:** https://sandbox.motaword.com\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Sandboxing\"\n}\n[/block]\nBy using our Sandbox host, you can execute any API endpoint and receive responses. Your projects will be persistent between requests just like a live API, however, your projects will not be made live when you issue a */launch* request. Instead, some endpoints will be simulated with random or similar data.\n\n**/progress:** Will return random translation and proofreading progress percentage figures.\n\n**/download:** Will return the original source documents, as if they are the translated versions.\n\n**/activities:** Activity endpoints will only return sample data.","createdAt":"2015-04-16T14:09:55.739Z","sync_unique":"","excerpt":"","link_url":"","title":"API Hosts","__v":3,"api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"url":""},"link_external":false,"order":8,"project":"55105fa24980621900063340","type":"basic","updates":[],"user":"55105f652dd9010d0019e17b","category":"5512229cc1b13537009f5d97","githubsync":"","parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

API Hosts


We have two API hosts, one is live and the other one is for sandboxing. **Live:** https://api.motaword.com **Sandbox:** https://sandbox.motaword.com [block:api-header] { "type": "basic", "title": "Sandboxing" } [/block] By using our Sandbox host, you can execute any API endpoint and receive responses. Your projects will be persistent between requests just like a live API, however, your projects will not be made live when you issue a */launch* request. Instead, some endpoints will be simulated with random or similar data. **/progress:** Will return random translation and proofreading progress percentage figures. **/download:** Will return the original source documents, as if they are the translated versions. **/activities:** Activity endpoints will only return sample data.
We have two API hosts, one is live and the other one is for sandboxing. **Live:** https://api.motaword.com **Sandbox:** https://sandbox.motaword.com [block:api-header] { "type": "basic", "title": "Sandboxing" } [/block] By using our Sandbox host, you can execute any API endpoint and receive responses. Your projects will be persistent between requests just like a live API, however, your projects will not be made live when you issue a */launch* request. Instead, some endpoints will be simulated with random or similar data. **/progress:** Will return random translation and proofreading progress percentage figures. **/download:** Will return the original source documents, as if they are the translated versions. **/activities:** Activity endpoints will only return sample data.
{"_id":"60a8ad4f059b3d02c66fccac","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"`motaword` CLI","type":"basic","slug":"motaword-cli","excerpt":"","body":"[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/102ea09-screenshot.png\",\n        \"screenshot.png\",\n        2054,\n        1582,\n        \"#333\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nUse MotaWord CLI to interact with your MotaWord account in many ways to manage your translation and localization needs.\n\nYou can use `motaword` locally or as part of your CI/CD for continuous localization of your software.","updates":[],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-05-22T07:05:51.275Z","user":"55105f652dd9010d0019e17b","category":"60a8ace53533b300235887da","version":"5512229bc1b13537009f5d96","project":"55105fa24980621900063340","__v":0,"childrenPages":[]}

`motaword` CLI


[block:image] { "images": [ { "image": [ "https://files.readme.io/102ea09-screenshot.png", "screenshot.png", 2054, 1582, "#333" ], "sizing": "full" } ] } [/block] Use MotaWord CLI to interact with your MotaWord account in many ways to manage your translation and localization needs. You can use `motaword` locally or as part of your CI/CD for continuous localization of your software.
[block:image] { "images": [ { "image": [ "https://files.readme.io/102ea09-screenshot.png", "screenshot.png", 2054, 1582, "#333" ], "sizing": "full" } ] } [/block] Use MotaWord CLI to interact with your MotaWord account in many ways to manage your translation and localization needs. You can use `motaword` locally or as part of your CI/CD for continuous localization of your software.
{"_id":"60a8ad5b1144ec001c4c6945","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Getting started","type":"basic","slug":"getting-started-1","excerpt":"","body":"To get a local copy up and running follow these simple steps.\n\n**Public assets for the CLI application lives here on GitHub:** [https://github.com/motaword/cli](https://github.com/motaword/cli)","updates":[],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-05-22T07:06:06.263Z","user":"55105f652dd9010d0019e17b","category":"60a8ace53533b300235887da","version":"5512229bc1b13537009f5d96","project":"55105fa24980621900063340","__v":0,"childrenPages":[]}

Getting started


To get a local copy up and running follow these simple steps. **Public assets for the CLI application lives here on GitHub:** [https://github.com/motaword/cli](https://github.com/motaword/cli)
To get a local copy up and running follow these simple steps. **Public assets for the CLI application lives here on GitHub:** [https://github.com/motaword/cli](https://github.com/motaword/cli)
{"_id":"60a8ad7716526d003ff123a7","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Download pre-built binary","type":"basic","slug":"download-pre-built-binary","excerpt":"","body":"Use Releases in this GitHub repository and download the application for your respective platform. We release `motaword` for Linux, Windows and MacOS in various configurations.\n\nDownload here: [Releases](https://github.com/motaword/cli/releases)","updates":[],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-05-22T07:06:31.155Z","user":"55105f652dd9010d0019e17b","category":"60a8ace53533b300235887da","version":"5512229bc1b13537009f5d96","project":"55105fa24980621900063340","__v":0,"childrenPages":[]}

Download pre-built binary


Use Releases in this GitHub repository and download the application for your respective platform. We release `motaword` for Linux, Windows and MacOS in various configurations. Download here: [Releases](https://github.com/motaword/cli/releases)
Use Releases in this GitHub repository and download the application for your respective platform. We release `motaword` for Linux, Windows and MacOS in various configurations. Download here: [Releases](https://github.com/motaword/cli/releases)
{"_id":"60a8ad996d84560066750aed","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Install via bash installer","type":"basic","slug":"install-via-bash-installer","excerpt":"","body":"We provide an `installer.sh` bash script that you use with `curl` to install the latest version of `motaword` CLI in your working directory. You can find the `installer.sh` script in [our public repository](https://github.com/motaword/cli).\n\nYou can install `motaword` by running this:\n`curl -s https://raw.githubusercontent.com/motaword/cli/master/installer.sh | bash`","updates":[],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-05-22T07:07:05.324Z","user":"55105f652dd9010d0019e17b","category":"60a8ace53533b300235887da","version":"5512229bc1b13537009f5d96","project":"55105fa24980621900063340","__v":0,"childrenPages":[]}

Install via bash installer


We provide an `installer.sh` bash script that you use with `curl` to install the latest version of `motaword` CLI in your working directory. You can find the `installer.sh` script in [our public repository](https://github.com/motaword/cli). You can install `motaword` by running this: `curl -s https://raw.githubusercontent.com/motaword/cli/master/installer.sh | bash`
We provide an `installer.sh` bash script that you use with `curl` to install the latest version of `motaword` CLI in your working directory. You can find the `installer.sh` script in [our public repository](https://github.com/motaword/cli). You can install `motaword` by running this: `curl -s https://raw.githubusercontent.com/motaword/cli/master/installer.sh | bash`
{"_id":"60a8adde032271001cae2701","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Install via Homebrew","type":"basic","slug":"install-via-homebrew","excerpt":"","body":"Mac users can install `motaword` simply via homebrew:\n1. Tap us\n    ```sh\n   brew tap motaword/homebrew-tap\n    ```\n2. Install `motaword`\n    ```sh\n   brew install motaword\n    ```\n\nNow you can run `motaword` anywhere in your system.","updates":[],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-05-22T07:08:14.126Z","user":"55105f652dd9010d0019e17b","category":"60a8ace53533b300235887da","version":"5512229bc1b13537009f5d96","project":"55105fa24980621900063340","__v":0,"childrenPages":[]}

Install via Homebrew


Mac users can install `motaword` simply via homebrew: 1. Tap us ```sh brew tap motaword/homebrew-tap ``` 2. Install `motaword` ```sh brew install motaword ``` Now you can run `motaword` anywhere in your system.
Mac users can install `motaword` simply via homebrew: 1. Tap us ```sh brew tap motaword/homebrew-tap ``` 2. Install `motaword` ```sh brew install motaword ``` Now you can run `motaword` anywhere in your system.
{"_id":"60a8ade9253bac00803a1597","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Usage","type":"basic","slug":"usage","excerpt":"","body":"","updates":[],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-05-22T07:08:25.941Z","user":"55105f652dd9010d0019e17b","category":"60a8ace53533b300235887da","version":"5512229bc1b13537009f5d96","project":"55105fa24980621900063340","__v":0,"childrenPages":[]}
{"_id":"60a8ae526214b9002a96e38d","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Command categories / parent commands","type":"basic","slug":"command-categories-parent-commands","excerpt":"","body":"`motaword` allows you to access all aspects of MotaWord platform, from submitting files for translation to getting reports, from managing your glossary to style guides.\n\nFor all commands that `motaword` support, run:\n```sh\n> motaword help\n\nUsage:\nmotaword [command]\n\nAvailable Commands:\n  async               Manage async operations\n  auth                Authentication settings\n  continuous-projects Manage your continuous projects\n  debug               Debug your MotaWord configuration and environment\n  documents           Manage documents\n  get-access-token    Retrieve an access token to interact with the API.\n  glossaries          Manage glossaries\n  help                Help about any command\n  help-config         Show CLI configuration help\n  help-input          Show CLI input help\n  projects            Manage projects\n  reports             Manage reports\n  search              Manage search operations\n  static              Manage static endpoints\n  stats               Manage stats\n  strings             Manage strings\n  styleguides         Manage styleguides\n  translate           Instantly translate your content with your existing TM and MT resources. This is an alias to `continuous-projects translate`\n  users               Manage users\n  webhooks            Manage webhooks\n\nFlags:\n  -h, --help                   help for motaword\n  -o, --output-format string   Output format [json, yaml] (default \"json\")\n      --profile string         Credentials profile to use for authentication (default \"default\")\n  -q, --query string           Filter / project results using JMESPath\n      --raw                    Output result as raw rather than pretty JSON\n      --server string          Override server URL\n      --v                      Enable WARN level verbose log output\n      --verbose                Enable DEBUG level verbose log output, same as --vvv flag\n      --vv                     Enable INFO level verbose log output\n      --vvv                    Enable DEBUG level verbose log output\n\nAdditional help topics:\n  motaword blog                Manage blog articles\n  motaword clients             Manage client account\n  motaword token               Manage token operations\n\nUse \"motaword [command] --help\" for more information about a command.\n  ```\n\nThese are categories of commands. There are subcommands under each category.","updates":[],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-05-22T07:10:10.627Z","user":"55105f652dd9010d0019e17b","category":"60a8ace53533b300235887da","version":"5512229bc1b13537009f5d96","project":"55105fa24980621900063340","__v":0,"childrenPages":[]}

Command categories / parent commands


`motaword` allows you to access all aspects of MotaWord platform, from submitting files for translation to getting reports, from managing your glossary to style guides. For all commands that `motaword` support, run: ```sh > motaword help Usage: motaword [command] Available Commands: async Manage async operations auth Authentication settings continuous-projects Manage your continuous projects debug Debug your MotaWord configuration and environment documents Manage documents get-access-token Retrieve an access token to interact with the API. glossaries Manage glossaries help Help about any command help-config Show CLI configuration help help-input Show CLI input help projects Manage projects reports Manage reports search Manage search operations static Manage static endpoints stats Manage stats strings Manage strings styleguides Manage styleguides translate Instantly translate your content with your existing TM and MT resources. This is an alias to `continuous-projects translate` users Manage users webhooks Manage webhooks Flags: -h, --help help for motaword -o, --output-format string Output format [json, yaml] (default "json") --profile string Credentials profile to use for authentication (default "default") -q, --query string Filter / project results using JMESPath --raw Output result as raw rather than pretty JSON --server string Override server URL --v Enable WARN level verbose log output --verbose Enable DEBUG level verbose log output, same as --vvv flag --vv Enable INFO level verbose log output --vvv Enable DEBUG level verbose log output Additional help topics: motaword blog Manage blog articles motaword clients Manage client account motaword token Manage token operations Use "motaword [command] --help" for more information about a command. ``` These are categories of commands. There are subcommands under each category.
`motaword` allows you to access all aspects of MotaWord platform, from submitting files for translation to getting reports, from managing your glossary to style guides. For all commands that `motaword` support, run: ```sh > motaword help Usage: motaword [command] Available Commands: async Manage async operations auth Authentication settings continuous-projects Manage your continuous projects debug Debug your MotaWord configuration and environment documents Manage documents get-access-token Retrieve an access token to interact with the API. glossaries Manage glossaries help Help about any command help-config Show CLI configuration help help-input Show CLI input help projects Manage projects reports Manage reports search Manage search operations static Manage static endpoints stats Manage stats strings Manage strings styleguides Manage styleguides translate Instantly translate your content with your existing TM and MT resources. This is an alias to `continuous-projects translate` users Manage users webhooks Manage webhooks Flags: -h, --help help for motaword -o, --output-format string Output format [json, yaml] (default "json") --profile string Credentials profile to use for authentication (default "default") -q, --query string Filter / project results using JMESPath --raw Output result as raw rather than pretty JSON --server string Override server URL --v Enable WARN level verbose log output --verbose Enable DEBUG level verbose log output, same as --vvv flag --vv Enable INFO level verbose log output --vvv Enable DEBUG level verbose log output Additional help topics: motaword blog Manage blog articles motaword clients Manage client account motaword token Manage token operations Use "motaword [command] --help" for more information about a command. ``` These are categories of commands. There are subcommands under each category.
{"_id":"60a8af44d498df0050792c6c","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Subcommands","type":"basic","slug":"subcommands","excerpt":"","body":"Let's say we want to get some reports about my account:\n\n```sh\n> motaword reports\nUsage:\n  motaword reports [command]\n\nAvailable Commands:\n  get-language-pairs-report Returns a report of language pairs.\n  get-projects-report       Returns a report of corporate account users.\n  get-users-report          Returns a report of corporate account users.\n```\n\nWe now see the available commands under `reports` category. Let's use `get-language-pairs-report` subcommand:\n\n```sh\n> motaword reports get-language-pairs-report\n\n{\n  \"meta\": {\n    \"paging\": {\n      \"links\": {\n        \"next\": null,\n        \"previous\": null,\n        \"self\": {\n          \"href\": \"https://api.staging.motaword.com/v0/reports/language-pairs\"\n        }\n      },\n      \"page\": 1,\n      \"per_page\": 2,\n      \"total_count\": 2\n    }\n  },\n  \"report\": [\n    {\n      \"language_pair\": {\n        \"source_language\": \"af\",\n        \"target_language\": \"ak\"\n      },\n      \"spending\": \"343.42\",\n      \"word_count\": \"2475\"\n    },\n    {\n      \"language_pair\": {\n        \"source_language\": \"en-US\",\n        \"target_language\": \"fr\"\n      },\n      \"spending\": \"11.70\",\n      \"word_count\": \"195\"\n    }\n  ]\n}\n```\n\nMost commands will return a JSON response. By using a tool like `jq`, you can process these JSON responses. Here is an example for getting a human-readable output from the above response:\n\n```sh\n> motaword reports get-language-pairs-report \\\n| jq '.report[] | \"For \\(.language_pair.source_language) into \\(.language_pair.target_language), we spent $\\(.spending)\"'\n\n\n\"For af into ak, we spent $343.42\"\n\"For en-US into fr, we spent $11.70\"\n```","updates":[],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-05-22T07:14:12.477Z","user":"55105f652dd9010d0019e17b","category":"60a8ace53533b300235887da","version":"5512229bc1b13537009f5d96","project":"55105fa24980621900063340","__v":0,"childrenPages":[]}

Subcommands


Let's say we want to get some reports about my account: ```sh > motaword reports Usage: motaword reports [command] Available Commands: get-language-pairs-report Returns a report of language pairs. get-projects-report Returns a report of corporate account users. get-users-report Returns a report of corporate account users. ``` We now see the available commands under `reports` category. Let's use `get-language-pairs-report` subcommand: ```sh > motaword reports get-language-pairs-report { "meta": { "paging": { "links": { "next": null, "previous": null, "self": { "href": "https://api.staging.motaword.com/v0/reports/language-pairs" } }, "page": 1, "per_page": 2, "total_count": 2 } }, "report": [ { "language_pair": { "source_language": "af", "target_language": "ak" }, "spending": "343.42", "word_count": "2475" }, { "language_pair": { "source_language": "en-US", "target_language": "fr" }, "spending": "11.70", "word_count": "195" } ] } ``` Most commands will return a JSON response. By using a tool like `jq`, you can process these JSON responses. Here is an example for getting a human-readable output from the above response: ```sh > motaword reports get-language-pairs-report \ | jq '.report[] | "For \(.language_pair.source_language) into \(.language_pair.target_language), we spent $\(.spending)"' "For af into ak, we spent $343.42" "For en-US into fr, we spent $11.70" ```
Let's say we want to get some reports about my account: ```sh > motaword reports Usage: motaword reports [command] Available Commands: get-language-pairs-report Returns a report of language pairs. get-projects-report Returns a report of corporate account users. get-users-report Returns a report of corporate account users. ``` We now see the available commands under `reports` category. Let's use `get-language-pairs-report` subcommand: ```sh > motaword reports get-language-pairs-report { "meta": { "paging": { "links": { "next": null, "previous": null, "self": { "href": "https://api.staging.motaword.com/v0/reports/language-pairs" } }, "page": 1, "per_page": 2, "total_count": 2 } }, "report": [ { "language_pair": { "source_language": "af", "target_language": "ak" }, "spending": "343.42", "word_count": "2475" }, { "language_pair": { "source_language": "en-US", "target_language": "fr" }, "spending": "11.70", "word_count": "195" } ] } ``` Most commands will return a JSON response. By using a tool like `jq`, you can process these JSON responses. Here is an example for getting a human-readable output from the above response: ```sh > motaword reports get-language-pairs-report \ | jq '.report[] | "For \(.language_pair.source_language) into \(.language_pair.target_language), we spent $\(.spending)"' "For af into ak, we spent $343.42" "For en-US into fr, we spent $11.70" ```
{"_id":"60a8af5a0f898f0033a2be25","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Command parameters","type":"basic","slug":"command-parameters","excerpt":"","body":"Some commands accept parameters and JSON payloads. We can view what kind of parameters or JSON payload they can accept, we can use the `--help` flag:\n\n```sh\n> motaword projects get-project --help\n\nGet single project\n\nUsage:\n  motaword projects get-project id [flags]\n\nFlags:\n  -h, --help            help for get-project\n      --with[] string   Include detailed information. Possible values 'client', 'vendor', 'score'\n```\n\n`get-project` command only accepts and `id` parameter and `with[]` flag.\n\nSome commands will accept JSON payloads, these are usually create/update commands (e.g. POST/PUT requests in HTTP). \n\nWe can view the shape of the request payload via `--help`. The request description is an OpenAPI specification. Here is an example *(removed descriptions for brevity)*:\n\n```sh\n> motaword reports get-projects-report --help\n\n## Request Schema (application/json)\n\nproperties:\n  budget_code:\n    type: string\n  date_from:\n    format: date-time\n    type: string\n  date_to:\n    format: date-time\n    type: string\n  source_languages:\n    items:\n      type: string\n    type: array\n  target_languages:\n    items:\n      type: string\n    type: array\n  users:\n    items:\n      format: int64\n      type: integer\n    type: array\ntype: object\n\nUsage:\n  motaword reports get-projects-report [flags]\n\nFlags:\n  -h, --help   help for get-projects-report\n```\n\nAccording to the request schema in the help output, you can send this payload with this command (which will generate your projects report within these dates):\n\n```json\n{\n   \"date_from\":\"2021-04-21T16:07:12.727Z\",\n   \"date_to\":\"2021-05-21T16:07:12.727Z\"\n}\n```","updates":[],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-05-22T07:14:34.402Z","user":"55105f652dd9010d0019e17b","category":"60a8ace53533b300235887da","version":"5512229bc1b13537009f5d96","project":"55105fa24980621900063340","__v":0,"childrenPages":[]}

Command parameters


Some commands accept parameters and JSON payloads. We can view what kind of parameters or JSON payload they can accept, we can use the `--help` flag: ```sh > motaword projects get-project --help Get single project Usage: motaword projects get-project id [flags] Flags: -h, --help help for get-project --with[] string Include detailed information. Possible values 'client', 'vendor', 'score' ``` `get-project` command only accepts and `id` parameter and `with[]` flag. Some commands will accept JSON payloads, these are usually create/update commands (e.g. POST/PUT requests in HTTP). We can view the shape of the request payload via `--help`. The request description is an OpenAPI specification. Here is an example *(removed descriptions for brevity)*: ```sh > motaword reports get-projects-report --help ## Request Schema (application/json) properties: budget_code: type: string date_from: format: date-time type: string date_to: format: date-time type: string source_languages: items: type: string type: array target_languages: items: type: string type: array users: items: format: int64 type: integer type: array type: object Usage: motaword reports get-projects-report [flags] Flags: -h, --help help for get-projects-report ``` According to the request schema in the help output, you can send this payload with this command (which will generate your projects report within these dates): ```json { "date_from":"2021-04-21T16:07:12.727Z", "date_to":"2021-05-21T16:07:12.727Z" } ```
Some commands accept parameters and JSON payloads. We can view what kind of parameters or JSON payload they can accept, we can use the `--help` flag: ```sh > motaword projects get-project --help Get single project Usage: motaword projects get-project id [flags] Flags: -h, --help help for get-project --with[] string Include detailed information. Possible values 'client', 'vendor', 'score' ``` `get-project` command only accepts and `id` parameter and `with[]` flag. Some commands will accept JSON payloads, these are usually create/update commands (e.g. POST/PUT requests in HTTP). We can view the shape of the request payload via `--help`. The request description is an OpenAPI specification. Here is an example *(removed descriptions for brevity)*: ```sh > motaword reports get-projects-report --help ## Request Schema (application/json) properties: budget_code: type: string date_from: format: date-time type: string date_to: format: date-time type: string source_languages: items: type: string type: array target_languages: items: type: string type: array users: items: format: int64 type: integer type: array type: object Usage: motaword reports get-projects-report [flags] Flags: -h, --help help for get-projects-report ``` According to the request schema in the help output, you can send this payload with this command (which will generate your projects report within these dates): ```json { "date_from":"2021-04-21T16:07:12.727Z", "date_to":"2021-05-21T16:07:12.727Z" } ```
{"_id":"60a8af720543c000733ac1c3","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Sending JSON payload","type":"basic","slug":"sending-json-payload","excerpt":"","body":"JSON payloads like above can be sent by piping `STDIN` into the command.\n\nIf you have a simple payload, you can simply do this:\n```sh\n> echo '{\"date_from\":\"2021-05-21T16:07:12.727Z\",\"date_to\":\"2021-05-21T16:07:12.727Z\"}' \\\n   | motaword reports get-projects-report\n```\n\nIf you have a more complex payload, we recommend putting it in a file first, and then piping the file into the command:\n\n```sh\n> motaword reports get-projects-report < my-complex-payload.json\n```","updates":[],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-05-22T07:14:58.718Z","user":"55105f652dd9010d0019e17b","category":"60a8ace53533b300235887da","version":"5512229bc1b13537009f5d96","project":"55105fa24980621900063340","__v":0,"childrenPages":[]}

Sending JSON payload


JSON payloads like above can be sent by piping `STDIN` into the command. If you have a simple payload, you can simply do this: ```sh > echo '{"date_from":"2021-05-21T16:07:12.727Z","date_to":"2021-05-21T16:07:12.727Z"}' \ | motaword reports get-projects-report ``` If you have a more complex payload, we recommend putting it in a file first, and then piping the file into the command: ```sh > motaword reports get-projects-report < my-complex-payload.json ```
JSON payloads like above can be sent by piping `STDIN` into the command. If you have a simple payload, you can simply do this: ```sh > echo '{"date_from":"2021-05-21T16:07:12.727Z","date_to":"2021-05-21T16:07:12.727Z"}' \ | motaword reports get-projects-report ``` If you have a more complex payload, we recommend putting it in a file first, and then piping the file into the command: ```sh > motaword reports get-projects-report < my-complex-payload.json ```
{"_id":"60a8af8a032271001cae2703","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Configuration","type":"basic","slug":"configuration-1","excerpt":"","body":"`motaword` CLI application looks for `.motaword/` directory to configure itself. It looks for configuration in this order:\n\n1. Working directory\n2. `$HOME/.motaword`\n3. `/etc/.motaword`\n\nWe keep 2 files in this directory:\n- credentials.json\n- config.json\n\n`credentials.json` holds your MotaWord API client ID and client secret. This file can be generated via `motaword` CLI itself. See **Authentication** below for more information.\n\n`config.json` lets you configure all aspects of your `motaword` CLI, and especially tailored for `motaword translate` command which is typically used in development and CI/CD environments. You can learn more about `translate` command below.\n\nUnless you are using `translate` command, `config.json` file is optional.","updates":[],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-05-22T07:15:22.564Z","user":"55105f652dd9010d0019e17b","category":"60a8ace53533b300235887da","version":"5512229bc1b13537009f5d96","project":"55105fa24980621900063340","__v":0,"childrenPages":[]}

Configuration


`motaword` CLI application looks for `.motaword/` directory to configure itself. It looks for configuration in this order: 1. Working directory 2. `$HOME/.motaword` 3. `/etc/.motaword` We keep 2 files in this directory: - credentials.json - config.json `credentials.json` holds your MotaWord API client ID and client secret. This file can be generated via `motaword` CLI itself. See **Authentication** below for more information. `config.json` lets you configure all aspects of your `motaword` CLI, and especially tailored for `motaword translate` command which is typically used in development and CI/CD environments. You can learn more about `translate` command below. Unless you are using `translate` command, `config.json` file is optional.
`motaword` CLI application looks for `.motaword/` directory to configure itself. It looks for configuration in this order: 1. Working directory 2. `$HOME/.motaword` 3. `/etc/.motaword` We keep 2 files in this directory: - credentials.json - config.json `credentials.json` holds your MotaWord API client ID and client secret. This file can be generated via `motaword` CLI itself. See **Authentication** below for more information. `config.json` lets you configure all aspects of your `motaword` CLI, and especially tailored for `motaword translate` command which is typically used in development and CI/CD environments. You can learn more about `translate` command below. Unless you are using `translate` command, `config.json` file is optional.
{"_id":"60a8afa33e52e202e8c16446","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Authenticating","type":"basic","slug":"authenticating","excerpt":"","body":"### TL;DR\nAdd a default authentication profile to automatically create `.motaword/credentials.json`:\n```shell\nmotaword auth add-profile client-credentials default MY-CLIENT-ID MY-CLIENT-SECRET\n```\n\n### Authentication details\n`motaword` CLI requires a MotaWord developer account and an API client (\"app\" as we call them). You can create one here: [https://www.motaword.com/developer](https://www.motaword.com/developer)\n\nOnce you have a developer account, create a new app on your Developer Portal. Now you can access your API client ID and secret for this app. \n\nYou need to use these keys with your `motaword` CLI by putting them in `.motaword/credentials.json` file. This is what `credentials.json` looks like:\n\n```json\n{\n  \"profiles\": {\n    \"default\": {\n      \"client_id\": \"my-client-id\",\n      \"client_secret\": \"my-client-secret\",\n      \"type\": \"client-credentials\"\n    }\n  }\n}\n```\n\n`motaword` CLI lets you have multiple **profiles** for authentication. `default` profile is sufficient in most use cases, but you can have multiple profiles with arbitrary names (e.g `secondary-profile` in place of `default` in the example above).\n\nWe provide a way to automatically manage your authentication profiles:\n\n```shell\n> motaword auth\n\nAuthentication settings\n\nUsage:\n  motaword auth [command]\n\nAvailable Commands:\n  add-profile   Add user profile for authentication\n  list-profiles List available configured authentication profiles\n\nFlags:\n  -h, --help   help for auth\n```\n\nYou can add a profile with this command:\n```shell\n> motaword auth add-profile client-credentials <name> <client-id> <client-secret>\n```\n\nLet's add a **default** profile:\n```shell\nmotaword auth add-profile client-credentials default my-client-id my-client-secret\n```\n\nThat's it! `motaword` CLI will manage the authentication for you including reusing and refreshing your API access tokens.","updates":[],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-05-22T07:15:47.027Z","user":"55105f652dd9010d0019e17b","category":"60a8ace53533b300235887da","version":"5512229bc1b13537009f5d96","project":"55105fa24980621900063340","__v":0,"childrenPages":[]}

Authenticating


### TL;DR Add a default authentication profile to automatically create `.motaword/credentials.json`: ```shell motaword auth add-profile client-credentials default MY-CLIENT-ID MY-CLIENT-SECRET ``` ### Authentication details `motaword` CLI requires a MotaWord developer account and an API client ("app" as we call them). You can create one here: [https://www.motaword.com/developer](https://www.motaword.com/developer) Once you have a developer account, create a new app on your Developer Portal. Now you can access your API client ID and secret for this app. You need to use these keys with your `motaword` CLI by putting them in `.motaword/credentials.json` file. This is what `credentials.json` looks like: ```json { "profiles": { "default": { "client_id": "my-client-id", "client_secret": "my-client-secret", "type": "client-credentials" } } } ``` `motaword` CLI lets you have multiple **profiles** for authentication. `default` profile is sufficient in most use cases, but you can have multiple profiles with arbitrary names (e.g `secondary-profile` in place of `default` in the example above). We provide a way to automatically manage your authentication profiles: ```shell > motaword auth Authentication settings Usage: motaword auth [command] Available Commands: add-profile Add user profile for authentication list-profiles List available configured authentication profiles Flags: -h, --help help for auth ``` You can add a profile with this command: ```shell > motaword auth add-profile client-credentials <name> <client-id> <client-secret> ``` Let's add a **default** profile: ```shell motaword auth add-profile client-credentials default my-client-id my-client-secret ``` That's it! `motaword` CLI will manage the authentication for you including reusing and refreshing your API access tokens.
### TL;DR Add a default authentication profile to automatically create `.motaword/credentials.json`: ```shell motaword auth add-profile client-credentials default MY-CLIENT-ID MY-CLIENT-SECRET ``` ### Authentication details `motaword` CLI requires a MotaWord developer account and an API client ("app" as we call them). You can create one here: [https://www.motaword.com/developer](https://www.motaword.com/developer) Once you have a developer account, create a new app on your Developer Portal. Now you can access your API client ID and secret for this app. You need to use these keys with your `motaword` CLI by putting them in `.motaword/credentials.json` file. This is what `credentials.json` looks like: ```json { "profiles": { "default": { "client_id": "my-client-id", "client_secret": "my-client-secret", "type": "client-credentials" } } } ``` `motaword` CLI lets you have multiple **profiles** for authentication. `default` profile is sufficient in most use cases, but you can have multiple profiles with arbitrary names (e.g `secondary-profile` in place of `default` in the example above). We provide a way to automatically manage your authentication profiles: ```shell > motaword auth Authentication settings Usage: motaword auth [command] Available Commands: add-profile Add user profile for authentication list-profiles List available configured authentication profiles Flags: -h, --help help for auth ``` You can add a profile with this command: ```shell > motaword auth add-profile client-credentials <name> <client-id> <client-secret> ``` Let's add a **default** profile: ```shell motaword auth add-profile client-credentials default my-client-id my-client-secret ``` That's it! `motaword` CLI will manage the authentication for you including reusing and refreshing your API access tokens.
{"_id":"60a8afecee24960079926e6e","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Translating","type":"basic","slug":"translating","excerpt":"","body":"Needless to say, translating your files is the most important thing that our CLI tool does. You can use any of the document upload, project download/package commands, **BUT**, there is one exclusive command that **solves everything for you**:\n\n```sh\n> motaword translate --help\n\nUsage:\n  motaword translate [target-language] [flags]\n\nFlags:\n  -h, --help   help for translate\n```\n\nThis command is much smarter than it looks and comes with its own set of configuration to handle your file translations. This is especially used in code bases and CI/CD environments.\n\n**What does it do exactly?** It uploads your language resource files, downloads the translated versions and puts them in the correct place in your directory structure. Let's dive in.","updates":[],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-05-22T07:17:00.343Z","user":"55105f652dd9010d0019e17b","category":"60a8ace53533b300235887da","version":"5512229bc1b13537009f5d96","project":"55105fa24980621900063340","__v":0,"childrenPages":[]}

Translating


Needless to say, translating your files is the most important thing that our CLI tool does. You can use any of the document upload, project download/package commands, **BUT**, there is one exclusive command that **solves everything for you**: ```sh > motaword translate --help Usage: motaword translate [target-language] [flags] Flags: -h, --help help for translate ``` This command is much smarter than it looks and comes with its own set of configuration to handle your file translations. This is especially used in code bases and CI/CD environments. **What does it do exactly?** It uploads your language resource files, downloads the translated versions and puts them in the correct place in your directory structure. Let's dive in.
Needless to say, translating your files is the most important thing that our CLI tool does. You can use any of the document upload, project download/package commands, **BUT**, there is one exclusive command that **solves everything for you**: ```sh > motaword translate --help Usage: motaword translate [target-language] [flags] Flags: -h, --help help for translate ``` This command is much smarter than it looks and comes with its own set of configuration to handle your file translations. This is especially used in code bases and CI/CD environments. **What does it do exactly?** It uploads your language resource files, downloads the translated versions and puts them in the correct place in your directory structure. Let's dive in.
{"_id":"60a8b002158fe700482a5159","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Configuring translations","type":"basic","slug":"configuring-translations","excerpt":"","body":"`translate` command comes with a highly flexible configuration to enable your translations in all use cases. Let's take a look at them:\n\n\n| Config Key             | Type                         | Required | Default Value                          | Description                                                                                                                                                                                                                                                                                                                                                                      |\n|------------------------|------------------------------|----------|----------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| project-id             | integer \\ string            | yes      | `null`                                 | This is the continuous project ID given to you by MotaWord.                                                                                                                                                                                                                                                                                                                      |\n| source-directory       | string                       | yes      | `null`                                 | The base directory for `motaword` CLI to start looking for source files. The actual source file detection can be managed by `rules` configuration. All rules are based on this source directory.                                                                                                                                                                                 |\n| translations-directory | string                       | no       | `source-directory`/{locale}            | The base directory for `motaword` CLI to start placing your translated files. The translated file patterns `rules` configuration will be based on this directory. Can be same with `source-directory`.   By default, we will put translations in each `{locale}` directory under `source-directory`. **Beware, the default value is probably not the correct way in your case.** |\n| rules                  | JSON Map  `{string: string}` | yes      | `{` `\"**/*\" : \"{path}/{basename}\"` `}` | List of `glob`-like file path patterns to specify your source files and how to place their translated versions. See below for more available variables, detailed explanation and examples.                                                                                                                                                                                       |\n| exclude-rules          | JSON Array  [string]         | no       | []                                     | List of `glob`-like excluded source file patterns. We will skip these files during translation.                                                                                                                                                                                                                                                                                  |","updates":[],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-05-22T07:17:22.898Z","user":"55105f652dd9010d0019e17b","category":"60a8ace53533b300235887da","version":"5512229bc1b13537009f5d96","project":"55105fa24980621900063340","__v":0,"childrenPages":[]}

Configuring translations


`translate` command comes with a highly flexible configuration to enable your translations in all use cases. Let's take a look at them: | Config Key | Type | Required | Default Value | Description | |------------------------|------------------------------|----------|----------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | project-id | integer \ string | yes | `null` | This is the continuous project ID given to you by MotaWord. | | source-directory | string | yes | `null` | The base directory for `motaword` CLI to start looking for source files. The actual source file detection can be managed by `rules` configuration. All rules are based on this source directory. | | translations-directory | string | no | `source-directory`/{locale} | The base directory for `motaword` CLI to start placing your translated files. The translated file patterns `rules` configuration will be based on this directory. Can be same with `source-directory`. By default, we will put translations in each `{locale}` directory under `source-directory`. **Beware, the default value is probably not the correct way in your case.** | | rules | JSON Map `{string: string}` | yes | `{` `"**/*" : "{path}/{basename}"` `}` | List of `glob`-like file path patterns to specify your source files and how to place their translated versions. See below for more available variables, detailed explanation and examples. | | exclude-rules | JSON Array [string] | no | [] | List of `glob`-like excluded source file patterns. We will skip these files during translation. |
`translate` command comes with a highly flexible configuration to enable your translations in all use cases. Let's take a look at them: | Config Key | Type | Required | Default Value | Description | |------------------------|------------------------------|----------|----------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | project-id | integer \ string | yes | `null` | This is the continuous project ID given to you by MotaWord. | | source-directory | string | yes | `null` | The base directory for `motaword` CLI to start looking for source files. The actual source file detection can be managed by `rules` configuration. All rules are based on this source directory. | | translations-directory | string | no | `source-directory`/{locale} | The base directory for `motaword` CLI to start placing your translated files. The translated file patterns `rules` configuration will be based on this directory. Can be same with `source-directory`. By default, we will put translations in each `{locale}` directory under `source-directory`. **Beware, the default value is probably not the correct way in your case.** | | rules | JSON Map `{string: string}` | yes | `{` `"**/*" : "{path}/{basename}"` `}` | List of `glob`-like file path patterns to specify your source files and how to place their translated versions. See below for more available variables, detailed explanation and examples. | | exclude-rules | JSON Array [string] | no | [] | List of `glob`-like excluded source file patterns. We will skip these files during translation. |
{"_id":"60a8b026545640007603db75","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Translation rules","type":"basic","slug":"translation-rules","excerpt":"","body":"`rules` configuration is quite versatile to enable the correct directory structure in many use cases. Each rule uses `glob`-like path patterns to collect a list of source files. You can specify multiple rules to combine different directory structures into your MotaWord translations.\n\nLet's look at the default value for `rules`:\n```json\n{\n   \"source-directory\": \"src/en\",\n   \"translations-directory\": \"src/{locale}\",\n   \"rules\": {\n      \"**/*\": \"{path}/{basename}\"\n   }\n}\n```\n\nThis rule tells `motaword` CLI:\n\n> take all the files in my `src/en` directory as source files and put their translations in the same path structure inside the `src/{locale}` directory where `{locale}` is each of your translation languages.\n\nIf your source and translations directories are organized in a simple manner, this can be sufficient for you. However, rules can handle very complex use cases. Let's take a look at one that is a little more complex than the default one:\n\n> You should look at the section **Available variables in rules** before the complex example, it will make the example easier to digest.\n\n```json\n{\n  \"source-directory\": \"src/main/resources/strings\",\n  \"translations-directory\": \"src/main/resources/translations\",\n  \"rules\": {\n    \"frontend/json/*.json\": \"{locale}/{path}/{basename}\",\n    \"frontend/**/*.yml\": \"{locale}/{path}/{filename}.yaml\",\n    \"pot/*.pot\": \"{locale}/{path}/{basename}\",\n    \"md/*.md\": \"markdown-translations/{locale}/{path}/{filename}.md\"\n  },\n  \"exclude-rules\": [\n    \"pot/passwords*\"\n  ]\n}\n```\n\nA `rules` configuration like this says a lot :) \n\n**To debug and understand what your rules say,** you can always run `motaword debug`. It will tell you how your rules are interpreted. \n\nLet's go through the complex rules above:\n\n> Given we are translating our files into French, which has the language code `fr`\n\n1. Take `src/main/resources/strings` as the base directory for my source files.\n2. Take `src/main/resources/translations` as the base directory for translated files. The last folder is different than the source path.\n3. Translate all of `.json` files in `src/main/resources/strings/frontend/json/` directory, **without going down subdirectories**\n   1. And put their (e.g. French) translations into `src/main/resources/translations/fr/frontend/json/`\n4. Translate all of `.yml` files under `src/main/resources/strings/frontend/` directory, going **recursively in all subdirectories**\n   1. And put their (e.g. French) translations under `src/main/resources/translations/fr/`, by using respective relative path of the source file.\n5. Translate all of `.md` files in `src/main/resources/strings/md/` directory, **without going down subdirectories**\n   1. And put their (e.g. French) translations into `src/main/resources/translations/fr/md/`\n6. And finally, while doing all of that, exclude all files in `src/main/resources/strings/pot` directory whose file name starts with `passwords`.\n\nIf you are still here, you are an expert `motaword` configurer :)","updates":[],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-05-22T07:17:58.691Z","user":"55105f652dd9010d0019e17b","category":"60a8ace53533b300235887da","version":"5512229bc1b13537009f5d96","project":"55105fa24980621900063340","__v":0,"childrenPages":[]}

Translation rules


`rules` configuration is quite versatile to enable the correct directory structure in many use cases. Each rule uses `glob`-like path patterns to collect a list of source files. You can specify multiple rules to combine different directory structures into your MotaWord translations. Let's look at the default value for `rules`: ```json { "source-directory": "src/en", "translations-directory": "src/{locale}", "rules": { "**/*": "{path}/{basename}" } } ``` This rule tells `motaword` CLI: > take all the files in my `src/en` directory as source files and put their translations in the same path structure inside the `src/{locale}` directory where `{locale}` is each of your translation languages. If your source and translations directories are organized in a simple manner, this can be sufficient for you. However, rules can handle very complex use cases. Let's take a look at one that is a little more complex than the default one: > You should look at the section **Available variables in rules** before the complex example, it will make the example easier to digest. ```json { "source-directory": "src/main/resources/strings", "translations-directory": "src/main/resources/translations", "rules": { "frontend/json/*.json": "{locale}/{path}/{basename}", "frontend/**/*.yml": "{locale}/{path}/{filename}.yaml", "pot/*.pot": "{locale}/{path}/{basename}", "md/*.md": "markdown-translations/{locale}/{path}/{filename}.md" }, "exclude-rules": [ "pot/passwords*" ] } ``` A `rules` configuration like this says a lot :) **To debug and understand what your rules say,** you can always run `motaword debug`. It will tell you how your rules are interpreted. Let's go through the complex rules above: > Given we are translating our files into French, which has the language code `fr` 1. Take `src/main/resources/strings` as the base directory for my source files. 2. Take `src/main/resources/translations` as the base directory for translated files. The last folder is different than the source path. 3. Translate all of `.json` files in `src/main/resources/strings/frontend/json/` directory, **without going down subdirectories** 1. And put their (e.g. French) translations into `src/main/resources/translations/fr/frontend/json/` 4. Translate all of `.yml` files under `src/main/resources/strings/frontend/` directory, going **recursively in all subdirectories** 1. And put their (e.g. French) translations under `src/main/resources/translations/fr/`, by using respective relative path of the source file. 5. Translate all of `.md` files in `src/main/resources/strings/md/` directory, **without going down subdirectories** 1. And put their (e.g. French) translations into `src/main/resources/translations/fr/md/` 6. And finally, while doing all of that, exclude all files in `src/main/resources/strings/pot` directory whose file name starts with `passwords`. If you are still here, you are an expert `motaword` configurer :)
`rules` configuration is quite versatile to enable the correct directory structure in many use cases. Each rule uses `glob`-like path patterns to collect a list of source files. You can specify multiple rules to combine different directory structures into your MotaWord translations. Let's look at the default value for `rules`: ```json { "source-directory": "src/en", "translations-directory": "src/{locale}", "rules": { "**/*": "{path}/{basename}" } } ``` This rule tells `motaword` CLI: > take all the files in my `src/en` directory as source files and put their translations in the same path structure inside the `src/{locale}` directory where `{locale}` is each of your translation languages. If your source and translations directories are organized in a simple manner, this can be sufficient for you. However, rules can handle very complex use cases. Let's take a look at one that is a little more complex than the default one: > You should look at the section **Available variables in rules** before the complex example, it will make the example easier to digest. ```json { "source-directory": "src/main/resources/strings", "translations-directory": "src/main/resources/translations", "rules": { "frontend/json/*.json": "{locale}/{path}/{basename}", "frontend/**/*.yml": "{locale}/{path}/{filename}.yaml", "pot/*.pot": "{locale}/{path}/{basename}", "md/*.md": "markdown-translations/{locale}/{path}/{filename}.md" }, "exclude-rules": [ "pot/passwords*" ] } ``` A `rules` configuration like this says a lot :) **To debug and understand what your rules say,** you can always run `motaword debug`. It will tell you how your rules are interpreted. Let's go through the complex rules above: > Given we are translating our files into French, which has the language code `fr` 1. Take `src/main/resources/strings` as the base directory for my source files. 2. Take `src/main/resources/translations` as the base directory for translated files. The last folder is different than the source path. 3. Translate all of `.json` files in `src/main/resources/strings/frontend/json/` directory, **without going down subdirectories** 1. And put their (e.g. French) translations into `src/main/resources/translations/fr/frontend/json/` 4. Translate all of `.yml` files under `src/main/resources/strings/frontend/` directory, going **recursively in all subdirectories** 1. And put their (e.g. French) translations under `src/main/resources/translations/fr/`, by using respective relative path of the source file. 5. Translate all of `.md` files in `src/main/resources/strings/md/` directory, **without going down subdirectories** 1. And put their (e.g. French) translations into `src/main/resources/translations/fr/md/` 6. And finally, while doing all of that, exclude all files in `src/main/resources/strings/pot` directory whose file name starts with `passwords`. If you are still here, you are an expert `motaword` configurer :)
{"_id":"60a8b03ec15896005cfcba05","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Available variables in rules","type":"basic","slug":"available-variables-in-rules","excerpt":"","body":"| Variable     | Description                                                                                                                                                               | Example                                                                                                                                                   |\n|--------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `{basename}` | Full name of the file, including file extension                                                                                                                           | If source directory is: `./source-directory`<br><br>Given: `./source-directory/json-files/ui.json`<br><br>Then `{basename}`: `ui.json`                    |\n| `{filename}` | Name of the file without the file extension.<br><br>This variable is usually used to change the extension of translated files.                                            | If source directory is: `./source-directory`<br><br>Given: `./source-directory/json-files/ui.json`<br><br>Then `{filename}`: `ui`                         |\n| `{path}`     | The directory path from the source directory onto the file.<br><br>This is the most useful variable to modify your directory structure.                                   | If source directory is: `./source-directory`<br><br>Given: `./source-directory/json-files/v1/public/ui.json`<br><br>Then `{path}`: `json-files/v1/public` |\n| `{locale}`   | The translation language code that is being processed.<br><br>This is most useful when your translation directories have different needs for target language directories. | `en-US`, `fr`, `zh-CN` etc...                                                                                                                             |","updates":[],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-05-22T07:18:22.874Z","user":"55105f652dd9010d0019e17b","category":"60a8ace53533b300235887da","version":"5512229bc1b13537009f5d96","project":"55105fa24980621900063340","__v":0,"childrenPages":[]}

Available variables in rules


| Variable | Description | Example | |--------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------| | `{basename}` | Full name of the file, including file extension | If source directory is: `./source-directory`<br><br>Given: `./source-directory/json-files/ui.json`<br><br>Then `{basename}`: `ui.json` | | `{filename}` | Name of the file without the file extension.<br><br>This variable is usually used to change the extension of translated files. | If source directory is: `./source-directory`<br><br>Given: `./source-directory/json-files/ui.json`<br><br>Then `{filename}`: `ui` | | `{path}` | The directory path from the source directory onto the file.<br><br>This is the most useful variable to modify your directory structure. | If source directory is: `./source-directory`<br><br>Given: `./source-directory/json-files/v1/public/ui.json`<br><br>Then `{path}`: `json-files/v1/public` | | `{locale}` | The translation language code that is being processed.<br><br>This is most useful when your translation directories have different needs for target language directories. | `en-US`, `fr`, `zh-CN` etc... |
| Variable | Description | Example | |--------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------| | `{basename}` | Full name of the file, including file extension | If source directory is: `./source-directory`<br><br>Given: `./source-directory/json-files/ui.json`<br><br>Then `{basename}`: `ui.json` | | `{filename}` | Name of the file without the file extension.<br><br>This variable is usually used to change the extension of translated files. | If source directory is: `./source-directory`<br><br>Given: `./source-directory/json-files/ui.json`<br><br>Then `{filename}`: `ui` | | `{path}` | The directory path from the source directory onto the file.<br><br>This is the most useful variable to modify your directory structure. | If source directory is: `./source-directory`<br><br>Given: `./source-directory/json-files/v1/public/ui.json`<br><br>Then `{path}`: `json-files/v1/public` | | `{locale}` | The translation language code that is being processed.<br><br>This is most useful when your translation directories have different needs for target language directories. | `en-US`, `fr`, `zh-CN` etc... |
{"_id":"60a8b05015fd0f0030d5428d","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Translation configuration examples","type":"basic","slug":"translation-configuration-examples","excerpt":"","body":"Look at the [`./examples`](https://github.com/motaword/cli/tree/master/examples) directory in this repository for various configuration examples.","updates":[],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-05-22T07:18:40.832Z","user":"55105f652dd9010d0019e17b","category":"60a8ace53533b300235887da","version":"5512229bc1b13537009f5d96","project":"55105fa24980621900063340","__v":0,"childrenPages":[]}

Translation configuration examples


Look at the [`./examples`](https://github.com/motaword/cli/tree/master/examples) directory in this repository for various configuration examples.
Look at the [`./examples`](https://github.com/motaword/cli/tree/master/examples) directory in this repository for various configuration examples.
{"_id":"60a8b069cc7260001c5af09e","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Debugging","type":"basic","slug":"debugging","excerpt":"","body":"All `motaword` CLI commands can get some debugging flags. Use `--help` to see the flags.\n\nYou can configure the level of output by using verbose flags:\n\n| Flag                   |                  |\n|------------------------|------------------|\n| `--v`                  | WARN level logs  |\n| `--vv`                 | INFO level logs  |\n| `--vvv` or `--verbose` | DEBUG level logs |\n\nThere is also a `debug` command available for your `config.json` configuration file:\n\n```sh\n> motaword debug\n```\n\nThis will output the detected source files and their corresponding translation paths.","updates":[],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-05-22T07:19:05.901Z","user":"55105f652dd9010d0019e17b","category":"60a8ace53533b300235887da","version":"5512229bc1b13537009f5d96","project":"55105fa24980621900063340","__v":0,"childrenPages":[]}

Debugging


All `motaword` CLI commands can get some debugging flags. Use `--help` to see the flags. You can configure the level of output by using verbose flags: | Flag | | |------------------------|------------------| | `--v` | WARN level logs | | `--vv` | INFO level logs | | `--vvv` or `--verbose` | DEBUG level logs | There is also a `debug` command available for your `config.json` configuration file: ```sh > motaword debug ``` This will output the detected source files and their corresponding translation paths.
All `motaword` CLI commands can get some debugging flags. Use `--help` to see the flags. You can configure the level of output by using verbose flags: | Flag | | |------------------------|------------------| | `--v` | WARN level logs | | `--vv` | INFO level logs | | `--vvv` or `--verbose` | DEBUG level logs | There is also a `debug` command available for your `config.json` configuration file: ```sh > motaword debug ``` This will output the detected source files and their corresponding translation paths.
{"_id":"609cdced035fef00580ab41f","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"MotaWord Active JS","type":"basic","slug":"active-js","excerpt":"","body":"[block:embed]\n{\n  \"html\": \"<iframe class=\\\"embedly-embed\\\" src=\\\"//cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fj0JFW3mf9Mw%3Ffeature%3Doembed&display_name=YouTube&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dj0JFW3mf9Mw&image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fj0JFW3mf9Mw%2Fhqdefault.jpg&key=f2aa6fc3595946d0afc3d76cbbd25dc3&type=text%2Fhtml&schema=youtube\\\" width=\\\"854\\\" height=\\\"480\\\" scrolling=\\\"no\\\" title=\\\"YouTube embed\\\" frameborder=\\\"0\\\" allow=\\\"autoplay; fullscreen\\\" allowfullscreen=\\\"true\\\"></iframe>\",\n  \"url\": \"https://www.youtube.com/watch?v=j0JFW3mf9Mw\",\n  \"title\": \"MotaWord Active - Page Demo\",\n  \"favicon\": \"https://www.youtube.com/s/desktop/cae8a583/img/favicon.ico\",\n  \"image\": \"https://i.ytimg.com/vi/j0JFW3mf9Mw/hqdefault.jpg\"\n}\n[/block]","updates":[],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-05-13T08:01:49.944Z","user":"55105f652dd9010d0019e17b","category":"609cdcc58ed6d8007bda0d9e","version":"5512229bc1b13537009f5d96","project":"55105fa24980621900063340","__v":0,"parentDoc":null,"childrenPages":[]}

MotaWord Active JS


[block:embed] { "html": "<iframe class=\"embedly-embed\" src=\"//cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fj0JFW3mf9Mw%3Ffeature%3Doembed&display_name=YouTube&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dj0JFW3mf9Mw&image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fj0JFW3mf9Mw%2Fhqdefault.jpg&key=f2aa6fc3595946d0afc3d76cbbd25dc3&type=text%2Fhtml&schema=youtube\" width=\"854\" height=\"480\" scrolling=\"no\" title=\"YouTube embed\" frameborder=\"0\" allow=\"autoplay; fullscreen\" allowfullscreen=\"true\"></iframe>", "url": "https://www.youtube.com/watch?v=j0JFW3mf9Mw", "title": "MotaWord Active - Page Demo", "favicon": "https://www.youtube.com/s/desktop/cae8a583/img/favicon.ico", "image": "https://i.ytimg.com/vi/j0JFW3mf9Mw/hqdefault.jpg" } [/block]
[block:embed] { "html": "<iframe class=\"embedly-embed\" src=\"//cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fj0JFW3mf9Mw%3Ffeature%3Doembed&display_name=YouTube&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dj0JFW3mf9Mw&image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fj0JFW3mf9Mw%2Fhqdefault.jpg&key=f2aa6fc3595946d0afc3d76cbbd25dc3&type=text%2Fhtml&schema=youtube\" width=\"854\" height=\"480\" scrolling=\"no\" title=\"YouTube embed\" frameborder=\"0\" allow=\"autoplay; fullscreen\" allowfullscreen=\"true\"></iframe>", "url": "https://www.youtube.com/watch?v=j0JFW3mf9Mw", "title": "MotaWord Active - Page Demo", "favicon": "https://www.youtube.com/s/desktop/cae8a583/img/favicon.ico", "image": "https://i.ytimg.com/vi/j0JFW3mf9Mw/hqdefault.jpg" } [/block]
{"_id":"609cdd662c8933001d6217e0","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Usage from our CDN","type":"basic","slug":"installing","excerpt":"","body":"Simply insert Active JS `<script>` tag inside your `<head>` tag.\n\n```html\n<script src=\"https://active.motaword.com/index.js\" data-token=\"token\" data-project-id=\"project-id\"></script>\n```\n\n#### Recommendations for including `<script>` tag\n- Put it inside `<head>` tag, as early as possible\n\n- Use `async`\n```html\n    <script src=\"https://active.motaword.com/index.js\" async></script>\n```    \nThis way, Active JS will load asynchronously, as early as possible, and will start putting the translations as the DOM elements become available.\n\n- If your page is large, enable `useDynamicTranslations` or `data-use-dynamic-translation` in your Active configuration along with `async` loading of the script. This is enabled for you by default.  \n\n- Do not use `defer` in your `<script>` tag as it delays translating the DOM and increases blink experience","updates":[],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-05-13T08:03:50.436Z","user":"55105f652dd9010d0019e17b","category":"609cdcc58ed6d8007bda0d9e","version":"5512229bc1b13537009f5d96","project":"55105fa24980621900063340","__v":0,"parentDoc":null,"childrenPages":[]}

Usage from our CDN


Simply insert Active JS `<script>` tag inside your `<head>` tag. ```html <script src="https://active.motaword.com/index.js" data-token="token" data-project-id="project-id"></script> ``` #### Recommendations for including `<script>` tag - Put it inside `<head>` tag, as early as possible - Use `async` ```html <script src="https://active.motaword.com/index.js" async></script> ``` This way, Active JS will load asynchronously, as early as possible, and will start putting the translations as the DOM elements become available. - If your page is large, enable `useDynamicTranslations` or `data-use-dynamic-translation` in your Active configuration along with `async` loading of the script. This is enabled for you by default. - Do not use `defer` in your `<script>` tag as it delays translating the DOM and increases blink experience
Simply insert Active JS `<script>` tag inside your `<head>` tag. ```html <script src="https://active.motaword.com/index.js" data-token="token" data-project-id="project-id"></script> ``` #### Recommendations for including `<script>` tag - Put it inside `<head>` tag, as early as possible - Use `async` ```html <script src="https://active.motaword.com/index.js" async></script> ``` This way, Active JS will load asynchronously, as early as possible, and will start putting the translations as the DOM elements become available. - If your page is large, enable `useDynamicTranslations` or `data-use-dynamic-translation` in your Active configuration along with `async` loading of the script. This is enabled for you by default. - Do not use `defer` in your `<script>` tag as it delays translating the DOM and increases blink experience
{"_id":"609cddf1142f510048435f8a","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Usage as a library from CDN","type":"basic","slug":"installation-cdn-manual-initialization","excerpt":"","body":"Simply insert the script in your page, and then you can use the `window.Active` object to initialize Active JS.\n\n```html\n<script src=\"https://active.motaword.com/index.js\"></script>\n```\n\n```js\nlet Active = window.Active.default;\nlet Configuration = window.Active.Configuration;\n\nconst config = new Configuration();\nconst activeInstance = new Active(config);\n// .........\n```","updates":[],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-05-13T08:06:09.976Z","user":"55105f652dd9010d0019e17b","category":"609cdcc58ed6d8007bda0d9e","version":"5512229bc1b13537009f5d96","project":"55105fa24980621900063340","__v":0,"childrenPages":[]}

Usage as a library from CDN


Simply insert the script in your page, and then you can use the `window.Active` object to initialize Active JS. ```html <script src="https://active.motaword.com/index.js"></script> ``` ```js let Active = window.Active.default; let Configuration = window.Active.Configuration; const config = new Configuration(); const activeInstance = new Active(config); // ......... ```
Simply insert the script in your page, and then you can use the `window.Active` object to initialize Active JS. ```html <script src="https://active.motaword.com/index.js"></script> ``` ```js let Active = window.Active.default; let Configuration = window.Active.Configuration; const config = new Configuration(); const activeInstance = new Active(config); // ......... ```
{"_id":"609cde38c084f80024ee552d","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Usage as an NPM library","type":"basic","slug":"usage-as-an-npm-library","excerpt":"","body":"```js\nimport Active from 'motaword-active-js';\nimport Configuration from 'motaword-active-js/configuration';\n\nconst config = new Configuration();\nconst activeInstance = new Active(config);\n...\n```","updates":[],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-05-13T08:07:20.927Z","user":"55105f652dd9010d0019e17b","category":"609cdcc58ed6d8007bda0d9e","version":"5512229bc1b13537009f5d96","project":"55105fa24980621900063340","__v":0,"childrenPages":[]}

Usage as an NPM library


```js import Active from 'motaword-active-js'; import Configuration from 'motaword-active-js/configuration'; const config = new Configuration(); const activeInstance = new Active(config); ... ```
```js import Active from 'motaword-active-js'; import Configuration from 'motaword-active-js/configuration'; const config = new Configuration(); const activeInstance = new Active(config); ... ```
{"_id":"609ce14cacce9c000ffe56b2","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Configuration","type":"basic","slug":"configuration","excerpt":"","body":"You can configure your Active implementation in several ways: via script tag attributes, `Configuration` object in the library or even URL query parameters! The last one should be used only for debugging purposes.","updates":[],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-05-13T08:20:28.113Z","user":"55105f652dd9010d0019e17b","category":"609cdcc58ed6d8007bda0d9e","version":"5512229bc1b13537009f5d96","project":"55105fa24980621900063340","__v":0,"childrenPages":[]}

Configuration


You can configure your Active implementation in several ways: via script tag attributes, `Configuration` object in the library or even URL query parameters! The last one should be used only for debugging purposes.
You can configure your Active implementation in several ways: via script tag attributes, `Configuration` object in the library or even URL query parameters! The last one should be used only for debugging purposes.
{"_id":"609ce15e4db20600160e6275","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Configuring via script tag attributes","type":"basic","slug":"configuring-via-script-tag-attributes","excerpt":"","body":"You can provide each configuration as an attribute to the `<script>` tag that you are using to load ActivejS.\n\n**Example:**\n\n```html\n<script \n    src=\"https://active.motaword.com/index.js\" \n    data-token=\"token\" \n    data-project-id=\"project-id\"\n    data-current-language=\"en-US\"\n    data-render-widget=\"true\"\n    data-widget-element=\"#my-language-selector\"\n    data-theme=\"light\"\n    data-position=\"in-place-down\"\n    data-follow-user=\"true\"\n    data-use-dummy-translations=\"false\"\n    data-use-dynamic-translations=\"true\"\n    data-change-mode=\"history\"\n    data-url-mode=\"path\"\n    data-modify-links=\"true\"\n    data-query-name=\"locale\"\n    data-wait-for-dom=\"true\"></script>\n```","updates":[],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-05-13T08:20:46.722Z","user":"55105f652dd9010d0019e17b","category":"609cdcc58ed6d8007bda0d9e","version":"5512229bc1b13537009f5d96","project":"55105fa24980621900063340","__v":0,"childrenPages":[]}

Configuring via script tag attributes


You can provide each configuration as an attribute to the `<script>` tag that you are using to load ActivejS. **Example:** ```html <script src="https://active.motaword.com/index.js" data-token="token" data-project-id="project-id" data-current-language="en-US" data-render-widget="true" data-widget-element="#my-language-selector" data-theme="light" data-position="in-place-down" data-follow-user="true" data-use-dummy-translations="false" data-use-dynamic-translations="true" data-change-mode="history" data-url-mode="path" data-modify-links="true" data-query-name="locale" data-wait-for-dom="true"></script> ```
You can provide each configuration as an attribute to the `<script>` tag that you are using to load ActivejS. **Example:** ```html <script src="https://active.motaword.com/index.js" data-token="token" data-project-id="project-id" data-current-language="en-US" data-render-widget="true" data-widget-element="#my-language-selector" data-theme="light" data-position="in-place-down" data-follow-user="true" data-use-dummy-translations="false" data-use-dynamic-translations="true" data-change-mode="history" data-url-mode="path" data-modify-links="true" data-query-name="locale" data-wait-for-dom="true"></script> ```
{"_id":"609ce1766c609900628f2b45","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Configuring library use","type":"basic","slug":"configuring-library-use","excerpt":"","body":"You can provide each configuration as an attribute to the `<script>` tag that you are using to load ActivejS.\n\n**Example:**\n\n```js\nimport Active from 'motaword-active-js';\nimport Configuration from 'motaword-active-js/configuration';\n\nconst config = new Configuration();\nconfig.accessToken = \"my-token\";\nconfig.projectId = \"123\";\nconfig.currentLanguage = \"en-US\";\nconfig.widgetElement = \"#mw-active\";\nconfig.renderWidget = true;\nconfig.theme = \"light\";\nconfig.position = \"bottom-left\";\nconfig.followUser = true;\nconfig.useDummyTranslations = true;\nconfig.useDynamicTranslations = true;\nconfig.changeMode = \"history\";\nconfig.urlMode = \"path\";\nconfig.queryName = \"locale\";\nconfig.waitForDom = true;\n\nconst activeInstance = new Active(config);\n...\n```","updates":[],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-05-13T08:21:10.565Z","user":"55105f652dd9010d0019e17b","category":"609cdcc58ed6d8007bda0d9e","version":"5512229bc1b13537009f5d96","project":"55105fa24980621900063340","__v":0,"childrenPages":[]}

Configuring library use


You can provide each configuration as an attribute to the `<script>` tag that you are using to load ActivejS. **Example:** ```js import Active from 'motaword-active-js'; import Configuration from 'motaword-active-js/configuration'; const config = new Configuration(); config.accessToken = "my-token"; config.projectId = "123"; config.currentLanguage = "en-US"; config.widgetElement = "#mw-active"; config.renderWidget = true; config.theme = "light"; config.position = "bottom-left"; config.followUser = true; config.useDummyTranslations = true; config.useDynamicTranslations = true; config.changeMode = "history"; config.urlMode = "path"; config.queryName = "locale"; config.waitForDom = true; const activeInstance = new Active(config); ... ```
You can provide each configuration as an attribute to the `<script>` tag that you are using to load ActivejS. **Example:** ```js import Active from 'motaword-active-js'; import Configuration from 'motaword-active-js/configuration'; const config = new Configuration(); config.accessToken = "my-token"; config.projectId = "123"; config.currentLanguage = "en-US"; config.widgetElement = "#mw-active"; config.renderWidget = true; config.theme = "light"; config.position = "bottom-left"; config.followUser = true; config.useDummyTranslations = true; config.useDynamicTranslations = true; config.changeMode = "history"; config.urlMode = "path"; config.queryName = "locale"; config.waitForDom = true; const activeInstance = new Active(config); ... ```
{"_id":"609ce1a1dcc8280071d1a9e4","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Configuring via URL","type":"basic","slug":"configuring-via-url","excerpt":"","body":"*This method is mostly for debugging purposes.* \n\nYou can provide each configuration as query parameter in your page URL, prefixed with `mwActive`.\n\n**Example:**\n\n```\nhttps://www.example.com/about?\n    mwActiveAccessToken=my-token\n    &mwActiveProjectId=123\n    &mwActiveCurrentLanguage=en-US\n    &mwActiveWidgetElement=%23mw-active\n    &mwActiveRenderWidget=true\n    &mwActiveTheme=light\n    &mwActivePosition=bottom-left\n    &mwActiveFollowUser=true\n    &mwActiveUseDummyTranslations=true\n    &mwActiveUseDynamicTranslations=true\n    &mwActiveChangeMode=history\n    &mwActiveUrlMode=path\n    &mwActiveModifyLinks=true\n    &mwActiveQueryName=locale\n    &mwActiveWaitForDom=true\n```","updates":[],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-05-13T08:21:53.055Z","user":"55105f652dd9010d0019e17b","category":"609cdcc58ed6d8007bda0d9e","version":"5512229bc1b13537009f5d96","project":"55105fa24980621900063340","__v":0,"childrenPages":[]}

Configuring via URL


*This method is mostly for debugging purposes.* You can provide each configuration as query parameter in your page URL, prefixed with `mwActive`. **Example:** ``` https://www.example.com/about? mwActiveAccessToken=my-token &mwActiveProjectId=123 &mwActiveCurrentLanguage=en-US &mwActiveWidgetElement=%23mw-active &mwActiveRenderWidget=true &mwActiveTheme=light &mwActivePosition=bottom-left &mwActiveFollowUser=true &mwActiveUseDummyTranslations=true &mwActiveUseDynamicTranslations=true &mwActiveChangeMode=history &mwActiveUrlMode=path &mwActiveModifyLinks=true &mwActiveQueryName=locale &mwActiveWaitForDom=true ```
*This method is mostly for debugging purposes.* You can provide each configuration as query parameter in your page URL, prefixed with `mwActive`. **Example:** ``` https://www.example.com/about? mwActiveAccessToken=my-token &mwActiveProjectId=123 &mwActiveCurrentLanguage=en-US &mwActiveWidgetElement=%23mw-active &mwActiveRenderWidget=true &mwActiveTheme=light &mwActivePosition=bottom-left &mwActiveFollowUser=true &mwActiveUseDummyTranslations=true &mwActiveUseDynamicTranslations=true &mwActiveChangeMode=history &mwActiveUrlMode=path &mwActiveModifyLinks=true &mwActiveQueryName=locale &mwActiveWaitForDom=true ```
{"_id":"609ce1b77a06cc002a80e0e1","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Configuration options","type":"basic","slug":"configuration-options","excerpt":"","body":"[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter Name\",\n    \"h-1\": \"Script Tag Data Attribute Name\",\n    \"h-2\": \"URL Query Parameter Name\",\n    \"h-3\": \"Default Value\",\n    \"h-4\": \"Required\",\n    \"h-5\": \"Available Options\",\n    \"h-6\": \"Description\",\n    \"0-0\": \"Token\",\n    \"1-0\": \"Project ID\",\n    \"1-1\": \"data-project-id\",\n    \"1-2\": \"mwActiveProjectId\",\n    \"1-3\": \"null\",\n    \"1-4\": \"yes\",\n    \"1-5\": \"\",\n    \"1-6\": \"This is the project ID given to you by MotaWord.\",\n    \"0-1\": \"data-token\",\n    \"0-2\": \"mwActiveToken\",\n    \"0-3\": \"null\",\n    \"0-4\": \"yes\",\n    \"0-5\": \"\",\n    \"0-6\": \"This is the token given to you by MotaWord.\",\n    \"2-0\": \"Current Language\",\n    \"2-1\": \"data-current-language\",\n    \"2-2\": \"mwActiveCurrentLanguage\",\n    \"2-3\": \"null\",\n    \"2-4\": \"no\",\n    \"2-5\": \"any language code that your website project supports\",\n    \"2-6\": \"You can tell us the current locale language that the user should view. Usually given from backend systems.\",\n    \"3-0\": \"Render Widget\",\n    \"3-1\": \"data-render-widget\",\n    \"3-2\": \"mwActiveRenderWidget\",\n    \"3-3\": \"true\",\n    \"3-4\": \"no\",\n    \"3-5\": \"\\\"false\\\", \\\"no\\\", \\\"0\\\", true\\\", \\\"yes\\\", \\\"1\\\"\",\n    \"3-6\": \"Tell Active JS to render a widget. You can also use Active programmatically without rendering a language selection widget.\",\n    \"4-0\": \"Widget Element\",\n    \"4-1\": \"data-widget-element\",\n    \"4-2\": \"mwActiveWidgetElement\",\n    \"4-3\": \"`#mw-active`\",\n    \"4-4\": \"no\",\n    \"4-5\": \"DOM selector to render the widget inside or \\\"\\\", \\\"NULL\\\"\",\n    \"4-6\": \"Given a widget element, we'll render the widget inside this element. If not, we will create and use our default floating widget element.\",\n    \"5-0\": \"Theme\",\n    \"5-1\": \"data-theme\",\n    \"5-2\": \"mwActiveTheme\",\n    \"5-3\": \"light\",\n    \"5-4\": \"no\",\n    \"5-5\": \"light, dark\",\n    \"5-6\": \"Specify which theme you would like to use with our widget.\",\n    \"6-0\": \"Position\",\n    \"6-1\": \"data-position\",\n    \"6-2\": \"mwActivePosition\",\n    \"6-3\": \"bottom-left\",\n    \"6-4\": \"no\",\n    \"6-6\": \"Specify where to render the widget. Giving \\\"\\\" empty string or \\\"NULL\\\" string will render the widget inline without the dropdown.\",\n    \"6-5\": \"bottom-left, bottom-right, in-place, \\\"\\\", \\\"NULL\\\"\",\n    \"7-0\": \"Follow User\",\n    \"7-1\": \"data-follow-user\",\n    \"7-2\": \"mwActiveFollowUser\",\n    \"7-3\": \"true\",\n    \"7-4\": \"no\",\n    \"7-5\": \"\\\"false\\\", \\\"no\\\", \\\"0\\\", true\\\", \\\"yes\\\", \\\"1\\\"\",\n    \"7-6\": \"Specify whether we should follow the user around in your website and automatically translate pages.\",\n    \"8-0\": \"Use Dummy Translations\",\n    \"8-1\": \"data-use-dummy-translations\",\n    \"8-2\": \"mwActiveUseDummyTranslations\",\n    \"8-3\": \"false\",\n    \"8-4\": \"no\",\n    \"8-5\": \"\\\"false\\\", \\\"no\\\", \\\"0\\\", true\\\", \\\"yes\\\", \\\"1\\\"\",\n    \"8-6\": \"When enabled, we will simply prefix all translatable content with `Translated ({languageCode}) - `\",\n    \"9-0\": \"Use Dynamic Translations\",\n    \"9-1\": \"data-use-dynamic-translations\",\n    \"9-2\": \"mwActiveUseDynamicTranslations\",\n    \"9-3\": \"true\",\n    \"9-4\": \"no\",\n    \"9-5\": \"\\\"false\\\", \\\"no\\\", \\\"0\\\", true\\\", \\\"yes\\\", \\\"1\\\"\",\n    \"9-6\": \"When enabled, we will use Intersection and Mutation observers to translate the page. Otherwise, we will simply parse the whole DOM and translate only once.\",\n    \"10-0\": \"Locale Change Mode\",\n    \"10-1\": \"data-change-mode\",\n    \"10-2\": \"mwActiveChangeMode\",\n    \"10-3\": \"history\",\n    \"10-4\": \"no\",\n    \"10-5\": \"history, redirect, `NULL`\",\n    \"10-6\": \"When a user changes locale (or when we automatically detect and change it for them), we will change the URL of the page they are in. We can do this by actually redirecting the user to the new page, or by simply changing the URL in the address bar via browser's History API. When `NULL`, we won't apply any URL changes.\",\n    \"11-0\": \"Locale URL Mode\",\n    \"11-1\": \"data-url-mode\",\n    \"11-2\": \"mwActiveUrlMode\",\n    \"11-3\": \"path\",\n    \"11-4\": \"no\",\n    \"11-5\": \"path, query, `NULL`\",\n    \"11-6\": \"When a user changes locale (or when we automatically detect and change it for them), we will change the URL of the page they are in. We can either change the path of the URL to prefix it with the locale code, or we can add a query parameter to the URL. We also use this mode to detect the locale for the current page when a user directly loads a page. When `NULL`, locale detection from URL will be disabled (even then, if the user has selected a locale manually, and `followUser` is enabled, we will still automatically translate the page in user's locale.\",\n    \"12-0\": \"Modify Links\",\n    \"12-1\": \"data-modify-links\",\n    \"12-2\": \"mwActiveModifyLinks\",\n    \"12-3\": \"true\",\n    \"12-4\": \"no\",\n    \"12-5\": \"\\\"false\\\", \\\"no\\\", \\\"0\\\", true\\\", \\\"yes\\\", \\\"1\\\"\",\n    \"12-6\": \"We can automatically localize the same-domain URLs in your page. The way we localize the URL depends on `urlMode` configuration. We can either add/update the locale query parameter, or add/update the path of the URL.\",\n    \"13-0\": \"Query Parameter Name\",\n    \"13-1\": \"data-query-name\",\n    \"13-2\": \"mwActiveQueryName\",\n    \"13-3\": \"locale\",\n    \"13-4\": \"no\",\n    \"13-5\": \"any string value\",\n    \"13-6\": \"When `urlMode` is `query`, we will use this query parameter name in the URL,   to detect the requested locale to update the URL when user changes locale to modify the links on page when `modifyLinks` is enabled.\",\n    \"14-0\": \"Wait For DOM\",\n    \"14-1\": \"data-wait-for-dom\",\n    \"14-2\": \"mwActiveWaitForDom\",\n    \"14-3\": \"mixed\",\n    \"14-4\": \"no\",\n    \"14-5\": \"\\\"false\\\", \\\"no\\\", \\\"0\\\", true\\\", \\\"yes\\\", \\\"1\\\"\",\n    \"14-6\": \"Should we wait until the DOM is ready to translate the content? When you put ActiveJS script inside `<head>` tag, we will automatically make this `true` unless you explicitly specify otherwise. When ActiveJS script is used within `<body>`, this is `false` by default.\"\n  },\n  \"cols\": 7,\n  \"rows\": 15\n}\n[/block]","updates":[],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-05-13T08:22:15.071Z","user":"55105f652dd9010d0019e17b","category":"609cdcc58ed6d8007bda0d9e","version":"5512229bc1b13537009f5d96","project":"55105fa24980621900063340","__v":0,"childrenPages":[]}

Configuration options


[block:parameters] { "data": { "h-0": "Parameter Name", "h-1": "Script Tag Data Attribute Name", "h-2": "URL Query Parameter Name", "h-3": "Default Value", "h-4": "Required", "h-5": "Available Options", "h-6": "Description", "0-0": "Token", "1-0": "Project ID", "1-1": "data-project-id", "1-2": "mwActiveProjectId", "1-3": "null", "1-4": "yes", "1-5": "", "1-6": "This is the project ID given to you by MotaWord.", "0-1": "data-token", "0-2": "mwActiveToken", "0-3": "null", "0-4": "yes", "0-5": "", "0-6": "This is the token given to you by MotaWord.", "2-0": "Current Language", "2-1": "data-current-language", "2-2": "mwActiveCurrentLanguage", "2-3": "null", "2-4": "no", "2-5": "any language code that your website project supports", "2-6": "You can tell us the current locale language that the user should view. Usually given from backend systems.", "3-0": "Render Widget", "3-1": "data-render-widget", "3-2": "mwActiveRenderWidget", "3-3": "true", "3-4": "no", "3-5": "\"false\", \"no\", \"0\", true\", \"yes\", \"1\"", "3-6": "Tell Active JS to render a widget. You can also use Active programmatically without rendering a language selection widget.", "4-0": "Widget Element", "4-1": "data-widget-element", "4-2": "mwActiveWidgetElement", "4-3": "`#mw-active`", "4-4": "no", "4-5": "DOM selector to render the widget inside or \"\", \"NULL\"", "4-6": "Given a widget element, we'll render the widget inside this element. If not, we will create and use our default floating widget element.", "5-0": "Theme", "5-1": "data-theme", "5-2": "mwActiveTheme", "5-3": "light", "5-4": "no", "5-5": "light, dark", "5-6": "Specify which theme you would like to use with our widget.", "6-0": "Position", "6-1": "data-position", "6-2": "mwActivePosition", "6-3": "bottom-left", "6-4": "no", "6-6": "Specify where to render the widget. Giving \"\" empty string or \"NULL\" string will render the widget inline without the dropdown.", "6-5": "bottom-left, bottom-right, in-place, \"\", \"NULL\"", "7-0": "Follow User", "7-1": "data-follow-user", "7-2": "mwActiveFollowUser", "7-3": "true", "7-4": "no", "7-5": "\"false\", \"no\", \"0\", true\", \"yes\", \"1\"", "7-6": "Specify whether we should follow the user around in your website and automatically translate pages.", "8-0": "Use Dummy Translations", "8-1": "data-use-dummy-translations", "8-2": "mwActiveUseDummyTranslations", "8-3": "false", "8-4": "no", "8-5": "\"false\", \"no\", \"0\", true\", \"yes\", \"1\"", "8-6": "When enabled, we will simply prefix all translatable content with `Translated ({languageCode}) - `", "9-0": "Use Dynamic Translations", "9-1": "data-use-dynamic-translations", "9-2": "mwActiveUseDynamicTranslations", "9-3": "true", "9-4": "no", "9-5": "\"false\", \"no\", \"0\", true\", \"yes\", \"1\"", "9-6": "When enabled, we will use Intersection and Mutation observers to translate the page. Otherwise, we will simply parse the whole DOM and translate only once.", "10-0": "Locale Change Mode", "10-1": "data-change-mode", "10-2": "mwActiveChangeMode", "10-3": "history", "10-4": "no", "10-5": "history, redirect, `NULL`", "10-6": "When a user changes locale (or when we automatically detect and change it for them), we will change the URL of the page they are in. We can do this by actually redirecting the user to the new page, or by simply changing the URL in the address bar via browser's History API. When `NULL`, we won't apply any URL changes.", "11-0": "Locale URL Mode", "11-1": "data-url-mode", "11-2": "mwActiveUrlMode", "11-3": "path", "11-4": "no", "11-5": "path, query, `NULL`", "11-6": "When a user changes locale (or when we automatically detect and change it for them), we will change the URL of the page they are in. We can either change the path of the URL to prefix it with the locale code, or we can add a query parameter to the URL. We also use this mode to detect the locale for the current page when a user directly loads a page. When `NULL`, locale detection from URL will be disabled (even then, if the user has selected a locale manually, and `followUser` is enabled, we will still automatically translate the page in user's locale.", "12-0": "Modify Links", "12-1": "data-modify-links", "12-2": "mwActiveModifyLinks", "12-3": "true", "12-4": "no", "12-5": "\"false\", \"no\", \"0\", true\", \"yes\", \"1\"", "12-6": "We can automatically localize the same-domain URLs in your page. The way we localize the URL depends on `urlMode` configuration. We can either add/update the locale query parameter, or add/update the path of the URL.", "13-0": "Query Parameter Name", "13-1": "data-query-name", "13-2": "mwActiveQueryName", "13-3": "locale", "13-4": "no", "13-5": "any string value", "13-6": "When `urlMode` is `query`, we will use this query parameter name in the URL, to detect the requested locale to update the URL when user changes locale to modify the links on page when `modifyLinks` is enabled.", "14-0": "Wait For DOM", "14-1": "data-wait-for-dom", "14-2": "mwActiveWaitForDom", "14-3": "mixed", "14-4": "no", "14-5": "\"false\", \"no\", \"0\", true\", \"yes\", \"1\"", "14-6": "Should we wait until the DOM is ready to translate the content? When you put ActiveJS script inside `<head>` tag, we will automatically make this `true` unless you explicitly specify otherwise. When ActiveJS script is used within `<body>`, this is `false` by default." }, "cols": 7, "rows": 15 } [/block]
[block:parameters] { "data": { "h-0": "Parameter Name", "h-1": "Script Tag Data Attribute Name", "h-2": "URL Query Parameter Name", "h-3": "Default Value", "h-4": "Required", "h-5": "Available Options", "h-6": "Description", "0-0": "Token", "1-0": "Project ID", "1-1": "data-project-id", "1-2": "mwActiveProjectId", "1-3": "null", "1-4": "yes", "1-5": "", "1-6": "This is the project ID given to you by MotaWord.", "0-1": "data-token", "0-2": "mwActiveToken", "0-3": "null", "0-4": "yes", "0-5": "", "0-6": "This is the token given to you by MotaWord.", "2-0": "Current Language", "2-1": "data-current-language", "2-2": "mwActiveCurrentLanguage", "2-3": "null", "2-4": "no", "2-5": "any language code that your website project supports", "2-6": "You can tell us the current locale language that the user should view. Usually given from backend systems.", "3-0": "Render Widget", "3-1": "data-render-widget", "3-2": "mwActiveRenderWidget", "3-3": "true", "3-4": "no", "3-5": "\"false\", \"no\", \"0\", true\", \"yes\", \"1\"", "3-6": "Tell Active JS to render a widget. You can also use Active programmatically without rendering a language selection widget.", "4-0": "Widget Element", "4-1": "data-widget-element", "4-2": "mwActiveWidgetElement", "4-3": "`#mw-active`", "4-4": "no", "4-5": "DOM selector to render the widget inside or \"\", \"NULL\"", "4-6": "Given a widget element, we'll render the widget inside this element. If not, we will create and use our default floating widget element.", "5-0": "Theme", "5-1": "data-theme", "5-2": "mwActiveTheme", "5-3": "light", "5-4": "no", "5-5": "light, dark", "5-6": "Specify which theme you would like to use with our widget.", "6-0": "Position", "6-1": "data-position", "6-2": "mwActivePosition", "6-3": "bottom-left", "6-4": "no", "6-6": "Specify where to render the widget. Giving \"\" empty string or \"NULL\" string will render the widget inline without the dropdown.", "6-5": "bottom-left, bottom-right, in-place, \"\", \"NULL\"", "7-0": "Follow User", "7-1": "data-follow-user", "7-2": "mwActiveFollowUser", "7-3": "true", "7-4": "no", "7-5": "\"false\", \"no\", \"0\", true\", \"yes\", \"1\"", "7-6": "Specify whether we should follow the user around in your website and automatically translate pages.", "8-0": "Use Dummy Translations", "8-1": "data-use-dummy-translations", "8-2": "mwActiveUseDummyTranslations", "8-3": "false", "8-4": "no", "8-5": "\"false\", \"no\", \"0\", true\", \"yes\", \"1\"", "8-6": "When enabled, we will simply prefix all translatable content with `Translated ({languageCode}) - `", "9-0": "Use Dynamic Translations", "9-1": "data-use-dynamic-translations", "9-2": "mwActiveUseDynamicTranslations", "9-3": "true", "9-4": "no", "9-5": "\"false\", \"no\", \"0\", true\", \"yes\", \"1\"", "9-6": "When enabled, we will use Intersection and Mutation observers to translate the page. Otherwise, we will simply parse the whole DOM and translate only once.", "10-0": "Locale Change Mode", "10-1": "data-change-mode", "10-2": "mwActiveChangeMode", "10-3": "history", "10-4": "no", "10-5": "history, redirect, `NULL`", "10-6": "When a user changes locale (or when we automatically detect and change it for them), we will change the URL of the page they are in. We can do this by actually redirecting the user to the new page, or by simply changing the URL in the address bar via browser's History API. When `NULL`, we won't apply any URL changes.", "11-0": "Locale URL Mode", "11-1": "data-url-mode", "11-2": "mwActiveUrlMode", "11-3": "path", "11-4": "no", "11-5": "path, query, `NULL`", "11-6": "When a user changes locale (or when we automatically detect and change it for them), we will change the URL of the page they are in. We can either change the path of the URL to prefix it with the locale code, or we can add a query parameter to the URL. We also use this mode to detect the locale for the current page when a user directly loads a page. When `NULL`, locale detection from URL will be disabled (even then, if the user has selected a locale manually, and `followUser` is enabled, we will still automatically translate the page in user's locale.", "12-0": "Modify Links", "12-1": "data-modify-links", "12-2": "mwActiveModifyLinks", "12-3": "true", "12-4": "no", "12-5": "\"false\", \"no\", \"0\", true\", \"yes\", \"1\"", "12-6": "We can automatically localize the same-domain URLs in your page. The way we localize the URL depends on `urlMode` configuration. We can either add/update the locale query parameter, or add/update the path of the URL.", "13-0": "Query Parameter Name", "13-1": "data-query-name", "13-2": "mwActiveQueryName", "13-3": "locale", "13-4": "no", "13-5": "any string value", "13-6": "When `urlMode` is `query`, we will use this query parameter name in the URL, to detect the requested locale to update the URL when user changes locale to modify the links on page when `modifyLinks` is enabled.", "14-0": "Wait For DOM", "14-1": "data-wait-for-dom", "14-2": "mwActiveWaitForDom", "14-3": "mixed", "14-4": "no", "14-5": "\"false\", \"no\", \"0\", true\", \"yes\", \"1\"", "14-6": "Should we wait until the DOM is ready to translate the content? When you put ActiveJS script inside `<head>` tag, we will automatically make this `true` unless you explicitly specify otherwise. When ActiveJS script is used within `<body>`, this is `false` by default." }, "cols": 7, "rows": 15 } [/block]
{"_id":"609ce7bd40b4bc003118b30c","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Testing","type":"basic","slug":"testing","excerpt":"","body":"Our most important suggestion for testing your Active implementation is to enable `useDummyTranslation` option (via script tag, library or URL). This option will disable actual translation and won't incur any costs to you.","updates":[],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-05-13T08:47:57.994Z","user":"55105f652dd9010d0019e17b","category":"609cdcc58ed6d8007bda0d9e","version":"5512229bc1b13537009f5d96","project":"55105fa24980621900063340","__v":0,"childrenPages":[]}

Testing


Our most important suggestion for testing your Active implementation is to enable `useDummyTranslation` option (via script tag, library or URL). This option will disable actual translation and won't incur any costs to you.
Our most important suggestion for testing your Active implementation is to enable `useDummyTranslation` option (via script tag, library or URL). This option will disable actual translation and won't incur any costs to you.
{"_id":"609ce7d08c10020065f2ddb2","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Implementation recommendations","type":"basic","slug":"implementation-recommendations","excerpt":"","body":"- Put your `<script>` tag inside `<head>` tag, as early as possible. If you are using Active as a library, initialize it as early as possible. This prevents \"blinking\" experience for end-users while translating the page.\n\n- Use `async`\n```html\n    <script src=\"https://active.motaword.com/index.js\" async></script>\n```    \nThis way, Active JS will load asynchronously, as early as possible, and will start putting the translations as the DOM elements become available.\n\n- If your page is large, enable `useDynamicTranslations` or `data-use-dynamic-translation` in your Active configuration along with `async` loading of the script. This is enabled for you by default, and we do not recommend disabling it for most of the websites. If disabled, interactive elements on your page won't be translated properly.\n\n- Do not use `defer` in your `<script>` tag as it delays translating the DOM and increases \"blinking\" experience for end-users.\n\n- During testing and/or on staging environments, enable `useDummyTranslations` option so that you won't incur any costs.","updates":[],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-05-13T08:48:16.111Z","user":"55105f652dd9010d0019e17b","category":"609cdcc58ed6d8007bda0d9e","version":"5512229bc1b13537009f5d96","project":"55105fa24980621900063340","__v":0,"childrenPages":[]}

Implementation recommendations


- Put your `<script>` tag inside `<head>` tag, as early as possible. If you are using Active as a library, initialize it as early as possible. This prevents "blinking" experience for end-users while translating the page. - Use `async` ```html <script src="https://active.motaword.com/index.js" async></script> ``` This way, Active JS will load asynchronously, as early as possible, and will start putting the translations as the DOM elements become available. - If your page is large, enable `useDynamicTranslations` or `data-use-dynamic-translation` in your Active configuration along with `async` loading of the script. This is enabled for you by default, and we do not recommend disabling it for most of the websites. If disabled, interactive elements on your page won't be translated properly. - Do not use `defer` in your `<script>` tag as it delays translating the DOM and increases "blinking" experience for end-users. - During testing and/or on staging environments, enable `useDummyTranslations` option so that you won't incur any costs.
- Put your `<script>` tag inside `<head>` tag, as early as possible. If you are using Active as a library, initialize it as early as possible. This prevents "blinking" experience for end-users while translating the page. - Use `async` ```html <script src="https://active.motaword.com/index.js" async></script> ``` This way, Active JS will load asynchronously, as early as possible, and will start putting the translations as the DOM elements become available. - If your page is large, enable `useDynamicTranslations` or `data-use-dynamic-translation` in your Active configuration along with `async` loading of the script. This is enabled for you by default, and we do not recommend disabling it for most of the websites. If disabled, interactive elements on your page won't be translated properly. - Do not use `defer` in your `<script>` tag as it delays translating the DOM and increases "blinking" experience for end-users. - During testing and/or on staging environments, enable `useDummyTranslations` option so that you won't incur any costs.
{"_id":"609ce944782138004aa2a5b7","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Support","type":"basic","slug":"support","excerpt":"","body":"For any feedback, feature requests, issues, you can come chat with us on [our website](https://www.motaword.com). We are 24/7 available and you will be talking to real humans. :)\n\nFor MotaWord Active, we developed one of the smartest DOM parsers in the wild. If you encounter any elements on your page that are not being translated, we would love to know about them!\n\nIf you have a feature request, came up with an idea for Active, or just general feedback, we are always open to improvements and ideas. Come chat with us!","updates":[],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-05-13T08:54:28.098Z","user":"55105f652dd9010d0019e17b","category":"609cdcc58ed6d8007bda0d9e","version":"5512229bc1b13537009f5d96","project":"55105fa24980621900063340","__v":0,"childrenPages":[]}

Support


For any feedback, feature requests, issues, you can come chat with us on [our website](https://www.motaword.com). We are 24/7 available and you will be talking to real humans. :) For MotaWord Active, we developed one of the smartest DOM parsers in the wild. If you encounter any elements on your page that are not being translated, we would love to know about them! If you have a feature request, came up with an idea for Active, or just general feedback, we are always open to improvements and ideas. Come chat with us!
For any feedback, feature requests, issues, you can come chat with us on [our website](https://www.motaword.com). We are 24/7 available and you will be talking to real humans. :) For MotaWord Active, we developed one of the smartest DOM parsers in the wild. If you encounter any elements on your page that are not being translated, we would love to know about them! If you have a feature request, came up with an idea for Active, or just general feedback, we are always open to improvements and ideas. Come chat with us!
{"_id":"5bf55792aa99e7000d2abc51","project":"55105fa24980621900063340","version":"5512229bc1b13537009f5d96","category":"5bd75391752af4005b5c1a43","user":"55105f652dd9010d0019e17b","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-11-21T13:03:14.398Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"Plugins are ways to extend and add to the functionality of existing systems. As our needs change every day, we develop plugins to make our lives easier.\n\nTake a look at our plugins below. We keep developing new ones, and if you have a favorite system without a MotaWord plugin, let us know!","excerpt":"","slug":"plugins","type":"basic","title":"Plugins","__v":0,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

Plugins


Plugins are ways to extend and add to the functionality of existing systems. As our needs change every day, we develop plugins to make our lives easier. Take a look at our plugins below. We keep developing new ones, and if you have a favorite system without a MotaWord plugin, let us know!
Plugins are ways to extend and add to the functionality of existing systems. As our needs change every day, we develop plugins to make our lives easier. Take a look at our plugins below. We keep developing new ones, and if you have a favorite system without a MotaWord plugin, let us know!
{"_id":"5bd753b8d32ae70020b87fdb","project":"55105fa24980621900063340","version":"5512229bc1b13537009f5d96","category":"5bd75391752af4005b5c1a43","user":"55105f652dd9010d0019e17b","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-10-29T18:38:48.892Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"You can head to [WordPress plugin repository](https://wordpress.org/plugins/motaword/) or your WordPress installation's admin panel to install it.\n\nOur plugin allows you to seamlessly submit your posts for translation to MotaWord from within your Wordpress admin panel.\n\nMajor benefits of translating your website using the plugin:\n\n- Access to [high-quality translation of your website content](https://www.motaword.com) in over 70 languages using professional translators\n- Fast translation turnaround time (a 10 page site can be translated into 15 languages within 24 hours - a blog post can be done within an hour)\n- At least 60% cheaper than any translation agency\n- No subscriptions, no bulk purchases, no minimum charges - you pay only for the # of words you are translating - whenever you need it. \n- Translation Memory allowing you to leverage already translated content (you never have to pay for translating the same sentence twice)\n- 100% quality guarantee on all MotaWord translations\n- API & Plugin support via e-mail\n\nPS. You will need an API key to use the MotaWord plugin. They are completely free. Just visit [motaword.com/developer](https://www.motaword.com/developer) and register for a developer account. Then create an API application for WordPress. Click \"View API Keys\" button to see your client ID and secret.","excerpt":"","slug":"wordpress","type":"basic","title":"WordPress","__v":0,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

WordPress


You can head to [WordPress plugin repository](https://wordpress.org/plugins/motaword/) or your WordPress installation's admin panel to install it. Our plugin allows you to seamlessly submit your posts for translation to MotaWord from within your Wordpress admin panel. Major benefits of translating your website using the plugin: - Access to [high-quality translation of your website content](https://www.motaword.com) in over 70 languages using professional translators - Fast translation turnaround time (a 10 page site can be translated into 15 languages within 24 hours - a blog post can be done within an hour) - At least 60% cheaper than any translation agency - No subscriptions, no bulk purchases, no minimum charges - you pay only for the # of words you are translating - whenever you need it. - Translation Memory allowing you to leverage already translated content (you never have to pay for translating the same sentence twice) - 100% quality guarantee on all MotaWord translations - API & Plugin support via e-mail PS. You will need an API key to use the MotaWord plugin. They are completely free. Just visit [motaword.com/developer](https://www.motaword.com/developer) and register for a developer account. Then create an API application for WordPress. Click "View API Keys" button to see your client ID and secret.
You can head to [WordPress plugin repository](https://wordpress.org/plugins/motaword/) or your WordPress installation's admin panel to install it. Our plugin allows you to seamlessly submit your posts for translation to MotaWord from within your Wordpress admin panel. Major benefits of translating your website using the plugin: - Access to [high-quality translation of your website content](https://www.motaword.com) in over 70 languages using professional translators - Fast translation turnaround time (a 10 page site can be translated into 15 languages within 24 hours - a blog post can be done within an hour) - At least 60% cheaper than any translation agency - No subscriptions, no bulk purchases, no minimum charges - you pay only for the # of words you are translating - whenever you need it. - Translation Memory allowing you to leverage already translated content (you never have to pay for translating the same sentence twice) - 100% quality guarantee on all MotaWord translations - API & Plugin support via e-mail PS. You will need an API key to use the MotaWord plugin. They are completely free. Just visit [motaword.com/developer](https://www.motaword.com/developer) and register for a developer account. Then create an API application for WordPress. Click "View API Keys" button to see your client ID and secret.
{"_id":"5bd753c5b89cfd0013d81207","project":"55105fa24980621900063340","version":"5512229bc1b13537009f5d96","category":"5bd75391752af4005b5c1a43","user":"55105f652dd9010d0019e17b","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-10-29T18:39:01.723Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"Our Drupal module provides the same functionalities with the WordPress plugin, you can achieve almost everything that you can do with our API directly in your Drupal's administration interface.\n\nJust visit our module page to install: [https://www.drupal.org/project/tmgmt_motaword](https://www.drupal.org/project/tmgmt_motaword)","excerpt":"","slug":"drupal","type":"basic","title":"Drupal","__v":0,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

Drupal


Our Drupal module provides the same functionalities with the WordPress plugin, you can achieve almost everything that you can do with our API directly in your Drupal's administration interface. Just visit our module page to install: [https://www.drupal.org/project/tmgmt_motaword](https://www.drupal.org/project/tmgmt_motaword)
Our Drupal module provides the same functionalities with the WordPress plugin, you can achieve almost everything that you can do with our API directly in your Drupal's administration interface. Just visit our module page to install: [https://www.drupal.org/project/tmgmt_motaword](https://www.drupal.org/project/tmgmt_motaword)
{"_id":"5bd753dd4e457e0012ee48f1","project":"55105fa24980621900063340","version":"5512229bc1b13537009f5d96","category":"5bd75391752af4005b5c1a43","user":"55105f652dd9010d0019e17b","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-10-29T18:39:25.417Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"With the new Google Chrome browser extension, you can now translate any content from your websites or any web page you surf during the day, without the copy paste hassle. You basically install it in seconds from Chrome’s Web Store and you can start ordering translations right away with your MotaWord account credentials.\n\nDownloading the extension and creating a MotaWord account are completely free, there are no purchase requirements and support is available around the clock on their website or via a simple email to [email protected]\n\nDownload our Google Chrome Extension, \"MotaWord Grabber\" by visiting this link while you are using Google Chrome browser: [https://chrome.google.com/webstore/detail/motaword-grabber/pjeamjmkiplgoaldgkpjbobheihgloaj](https://chrome.google.com/webstore/detail/motaword-grabber/pjeamjmkiplgoaldgkpjbobheihgloaj)","excerpt":"","slug":"extension-google-chrome","type":"basic","title":"Google Chrome extension","__v":0,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

Google Chrome extension


With the new Google Chrome browser extension, you can now translate any content from your websites or any web page you surf during the day, without the copy paste hassle. You basically install it in seconds from Chrome’s Web Store and you can start ordering translations right away with your MotaWord account credentials. Downloading the extension and creating a MotaWord account are completely free, there are no purchase requirements and support is available around the clock on their website or via a simple email to [email protected] Download our Google Chrome Extension, "MotaWord Grabber" by visiting this link while you are using Google Chrome browser: [https://chrome.google.com/webstore/detail/motaword-grabber/pjeamjmkiplgoaldgkpjbobheihgloaj](https://chrome.google.com/webstore/detail/motaword-grabber/pjeamjmkiplgoaldgkpjbobheihgloaj)
With the new Google Chrome browser extension, you can now translate any content from your websites or any web page you surf during the day, without the copy paste hassle. You basically install it in seconds from Chrome’s Web Store and you can start ordering translations right away with your MotaWord account credentials. Downloading the extension and creating a MotaWord account are completely free, there are no purchase requirements and support is available around the clock on their website or via a simple email to [email protected] Download our Google Chrome Extension, "MotaWord Grabber" by visiting this link while you are using Google Chrome browser: [https://chrome.google.com/webstore/detail/motaword-grabber/pjeamjmkiplgoaldgkpjbobheihgloaj](https://chrome.google.com/webstore/detail/motaword-grabber/pjeamjmkiplgoaldgkpjbobheihgloaj)
{"_id":"5bd753fa8e243b0050a3c1f6","project":"55105fa24980621900063340","version":"5512229bc1b13537009f5d96","category":"5bd75391752af4005b5c1a43","user":"55105f652dd9010d0019e17b","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-10-29T18:39:54.791Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":4,"body":"Going forward you can submit Google Drive documents of any kind directly on to MotaWord and get them translated immediately.\n\nThe only thing you need to do is install the [MotaWord - Google Drive App](https://chrome.google.com/webstore/detail/motaword-google-drive-app/hadlhnacbomchhkmeedgklibnghbeban?hl=en) from Chrome Web Store. \n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/de605c4-unnamed.jpg\",\n        \"unnamed.jpg\",\n        640,\n        400,\n        \"#edeeee\"\n      ],\n      \"caption\": \"\"\n    }\n  ]\n}\n[/block]\nOnce installed and your browser has been restarted, you will be able to select a document directly from your Google Drive to be sent to MotaWord for translation into any of our 73 languages.\n\nOur new Google Drive App also supports automatic language detection for Google Apps documents, spreadsheets and presentations. (for image type files you'll just have to select the source document language manually)\n\nSelecting a document for translation couldn't be easier.\n\n- Find it in your Google Drive \n- Right click (or Ctrl + Click on Mac) the document \n- Select \"Open With\" from the drop down menu and\n- Select MotaWord to follow the simple prompts\n\nJust like in any other document, if you would like to not have a sentence translated within your document you can mark those with double curly brackets \"{{\" and \"}}\". Sentences or paragraphs marked with these braces will not be counted or reflected in our quotes and they will not be translated. \n\nWe know you will love it and we will keep on working on further integration with other platforms. Until then we want to make sure that you know of our API, [MotaWord Grabber Chrome Extension](https://motaword.readme.io/docs/extension-google-chrome) for online article translations, [WordPress](https://motaword.readme.io/docs/wordpress) and [Drupal](https://motaword.readme.io/docs/drupal) plug-ins. \n\nFor any integration requests just send us a message using our \"[contact us](https://www.motaword.com/contact)\" form. We look forward to hearing from you.","excerpt":"","slug":"google-drive","type":"basic","title":"Google Drive add-on","__v":0,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

Google Drive add-on


Going forward you can submit Google Drive documents of any kind directly on to MotaWord and get them translated immediately. The only thing you need to do is install the [MotaWord - Google Drive App](https://chrome.google.com/webstore/detail/motaword-google-drive-app/hadlhnacbomchhkmeedgklibnghbeban?hl=en) from Chrome Web Store. [block:image] { "images": [ { "image": [ "https://files.readme.io/de605c4-unnamed.jpg", "unnamed.jpg", 640, 400, "#edeeee" ], "caption": "" } ] } [/block] Once installed and your browser has been restarted, you will be able to select a document directly from your Google Drive to be sent to MotaWord for translation into any of our 73 languages. Our new Google Drive App also supports automatic language detection for Google Apps documents, spreadsheets and presentations. (for image type files you'll just have to select the source document language manually) Selecting a document for translation couldn't be easier. - Find it in your Google Drive - Right click (or Ctrl + Click on Mac) the document - Select "Open With" from the drop down menu and - Select MotaWord to follow the simple prompts Just like in any other document, if you would like to not have a sentence translated within your document you can mark those with double curly brackets "{{" and "}}". Sentences or paragraphs marked with these braces will not be counted or reflected in our quotes and they will not be translated. We know you will love it and we will keep on working on further integration with other platforms. Until then we want to make sure that you know of our API, [MotaWord Grabber Chrome Extension](https://motaword.readme.io/docs/extension-google-chrome) for online article translations, [WordPress](https://motaword.readme.io/docs/wordpress) and [Drupal](https://motaword.readme.io/docs/drupal) plug-ins. For any integration requests just send us a message using our "[contact us](https://www.motaword.com/contact)" form. We look forward to hearing from you.
Going forward you can submit Google Drive documents of any kind directly on to MotaWord and get them translated immediately. The only thing you need to do is install the [MotaWord - Google Drive App](https://chrome.google.com/webstore/detail/motaword-google-drive-app/hadlhnacbomchhkmeedgklibnghbeban?hl=en) from Chrome Web Store. [block:image] { "images": [ { "image": [ "https://files.readme.io/de605c4-unnamed.jpg", "unnamed.jpg", 640, 400, "#edeeee" ], "caption": "" } ] } [/block] Once installed and your browser has been restarted, you will be able to select a document directly from your Google Drive to be sent to MotaWord for translation into any of our 73 languages. Our new Google Drive App also supports automatic language detection for Google Apps documents, spreadsheets and presentations. (for image type files you'll just have to select the source document language manually) Selecting a document for translation couldn't be easier. - Find it in your Google Drive - Right click (or Ctrl + Click on Mac) the document - Select "Open With" from the drop down menu and - Select MotaWord to follow the simple prompts Just like in any other document, if you would like to not have a sentence translated within your document you can mark those with double curly brackets "{{" and "}}". Sentences or paragraphs marked with these braces will not be counted or reflected in our quotes and they will not be translated. We know you will love it and we will keep on working on further integration with other platforms. Until then we want to make sure that you know of our API, [MotaWord Grabber Chrome Extension](https://motaword.readme.io/docs/extension-google-chrome) for online article translations, [WordPress](https://motaword.readme.io/docs/wordpress) and [Drupal](https://motaword.readme.io/docs/drupal) plug-ins. For any integration requests just send us a message using our "[contact us](https://www.motaword.com/contact)" form. We look forward to hearing from you.
{"_id":"55122b890c1a08190077f975","githubsync":"","category":"55122b1fdf56423b003c3a20","editedParams":true,"order":0,"type":"post","createdAt":"2015-03-25T03:29:13.854Z","hidden":false,"editedParams2":true,"excerpt":"","link_external":false,"link_url":"","slug":"token","sync_unique":"","__v":5,"title":"Getting an access token","updates":[],"project":"55105fa24980621900063340","user":"55105f652dd9010d0019e17b","version":"5512229bc1b13537009f5d96","api":{"method":"post","params":[{"type":"string","in":"body","_id":"55123144f9ece423005b243f","default":"client_credentials","desc":"\"client_credentials\" is the only acceptable value for now. In the future, we may provide other grant types, so you must specify this grant type even though it is the only available one.","name":"grant_type","required":true},{"type":"string","in":"body","_id":"551ff4979aa80d0d00e17780","default":"Basic ***","desc":"This is the \"HTTP Basic Authorization\" HEADER. See below for details.","name":"Authorization","required":true}],"results":{"codes":[{"name":"","code":"{\n  \"access_token\": \"string\",\n  \"expires_in\": integer,\n  \"token_type\": \"string\",\n  \"scope\": \"string\"\n}","language":"json","status":200},{"name":"","code":"{\n    \"error\": {\n        \"code\": \"InvalidCredentials\",\n        \"http_code\": 401,\n        \"message\": \"Your credentials are wrong.\",\n        \"help\": \"https://developer.motaword.com/support\"\n    }\n}","language":"json","status":401}]},"url":"/token","auth":"never"},"body":"To obtain your access token before requesting any other API endpoint, you need two parameters.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"grant_type\"\n}\n[/block]\n**Type:** Query String\n\nThis parameter specifies the OAuth2 grant type you would like obtain your access token with. We currently support only client_credentials type of grant, but we may add new grant types in the future. For any requests just contact us at [email protected]\n\nThe default and only value is \"client_credentials\".\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Authorization\"\n}\n[/block]\n**Type:** Header parameter\n\nThis parameter is the HTTP Basic Authentication header. [Here](http://en.wikipedia.org/wiki/Basic_access_authentication) is the Wikipedia page to save you some trouble. :)\n\nBasically, this header parameter is constructed by encoding your application ID and application secret key with base64. Here is an example for the value of this parameter:\n\n**You combine your application ID and secret key with a colon between them:**\n\n```\nMyFirstAppID:MyFirstAppSecret\n```\n\n**Then you encode this with base64: **\n\n```\nTXlGaXJzdEFwcElEOk15Rmlyc3RBcHBTZWNyZXQ=\n```\n\n**Final header adds the static word \"Basic\" and must read like this: **\n\n```\nAuthorization: Basic TXlGaXJzdEFwcElEOk15Rmlyc3RBcHBTZWNyZXQ=\n```\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"The API explorer widget does not work well with authorization. We suggest using the [Authorization Tool](https://www.motaword.com/developer/tools) and then follow the link generated for you to experiment on this documentation.\",\n  \"title\": \"Authorization Tool\"\n}\n[/block]","parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

postGetting an access token


Body Params

grant_type:
required
stringclient_credentials
"client_credentials" is the only acceptable value for now. In the future, we may provide other grant types, so you must specify this grant type even though it is the only available one.
Authorization:
required
stringBasic ***
This is the "HTTP Basic Authorization" HEADER. See below for details.
To obtain your access token before requesting any other API endpoint, you need two parameters. [block:api-header] { "type": "basic", "title": "grant_type" } [/block] **Type:** Query String This parameter specifies the OAuth2 grant type you would like obtain your access token with. We currently support only client_credentials type of grant, but we may add new grant types in the future. For any requests just contact us at [email protected] The default and only value is "client_credentials". [block:api-header] { "type": "basic", "title": "Authorization" } [/block] **Type:** Header parameter This parameter is the HTTP Basic Authentication header. [Here](http://en.wikipedia.org/wiki/Basic_access_authentication) is the Wikipedia page to save you some trouble. :) Basically, this header parameter is constructed by encoding your application ID and application secret key with base64. Here is an example for the value of this parameter: **You combine your application ID and secret key with a colon between them:** ``` MyFirstAppID:MyFirstAppSecret ``` **Then you encode this with base64: ** ``` TXlGaXJzdEFwcElEOk15Rmlyc3RBcHBTZWNyZXQ= ``` **Final header adds the static word "Basic" and must read like this: ** ``` Authorization: Basic TXlGaXJzdEFwcElEOk15Rmlyc3RBcHBTZWNyZXQ= ``` [block:callout] { "type": "warning", "body": "The API explorer widget does not work well with authorization. We suggest using the [Authorization Tool](https://www.motaword.com/developer/tools) and then follow the link generated for you to experiment on this documentation.", "title": "Authorization Tool" } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



To obtain your access token before requesting any other API endpoint, you need two parameters. [block:api-header] { "type": "basic", "title": "grant_type" } [/block] **Type:** Query String This parameter specifies the OAuth2 grant type you would like obtain your access token with. We currently support only client_credentials type of grant, but we may add new grant types in the future. For any requests just contact us at [email protected] The default and only value is "client_credentials". [block:api-header] { "type": "basic", "title": "Authorization" } [/block] **Type:** Header parameter This parameter is the HTTP Basic Authentication header. [Here](http://en.wikipedia.org/wiki/Basic_access_authentication) is the Wikipedia page to save you some trouble. :) Basically, this header parameter is constructed by encoding your application ID and application secret key with base64. Here is an example for the value of this parameter: **You combine your application ID and secret key with a colon between them:** ``` MyFirstAppID:MyFirstAppSecret ``` **Then you encode this with base64: ** ``` TXlGaXJzdEFwcElEOk15Rmlyc3RBcHBTZWNyZXQ= ``` **Final header adds the static word "Basic" and must read like this: ** ``` Authorization: Basic TXlGaXJzdEFwcElEOk15Rmlyc3RBcHBTZWNyZXQ= ``` [block:callout] { "type": "warning", "body": "The API explorer widget does not work well with authorization. We suggest using the [Authorization Tool](https://www.motaword.com/developer/tools) and then follow the link generated for you to experiment on this documentation.", "title": "Authorization Tool" } [/block]
{"_id":"55122ba93228bc2500819a74","project":"55105fa24980621900063340","sync_unique":"","title":"API Definition","updates":[],"user":"55105f652dd9010d0019e17b","api":{"auth":"never","method":"get","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"code":"{}","name":"","status":400,"language":"json"}]},"url":"/"},"category":"55122b0f3228bc2500819a72","createdAt":"2015-03-25T03:29:45.569Z","excerpt":"","githubsync":"","link_external":false,"slug":"endpoints","type":"get","__v":7,"body":"This endpoint returns the JSON representation of our Swagger API definition.","order":0,"link_url":"","version":"5512229bc1b13537009f5d96","hidden":false,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

getAPI Definition


This endpoint returns the JSON representation of our Swagger API definition.

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



This endpoint returns the JSON representation of our Swagger API definition.
{"_id":"55122bbbf9ece423005b243b","user":"55105f652dd9010d0019e17b","version":"5512229bc1b13537009f5d96","body":"Returns the list of languages MotaWord support. Here is a list of languages we currently support: [https://www.motaword.com/languages](https://www.motaword.com/languages) \n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Are we missing a language?\",\n  \"body\": \"Just [let us know](https://www.motaword.com/contact) and we'll work on getting a base of translators for that language and train them. It takes our vendor managers around 2 weeks to get viable translator candidates for a new language and train them. By the time you are done with programming around our API, we would be done with adding the human resources.\"\n}\n[/block]","hidden":false,"project":"55105fa24980621900063340","slug":"supported-languages","updates":[],"link_url":"","order":1,"createdAt":"2015-03-25T03:30:03.562Z","link_external":false,"sync_unique":"","type":"get","githubsync":"","title":"Supported languages","__v":11,"api":{"auth":"never","method":"get","params":[],"results":{"codes":[{"name":"","code":"[\n  {\n    \"code\": \"string\",\n    \"name\": \"string\"\n  }\n]","language":"json","status":200},{"language":"json","status":401,"name":"","code":"{\n    \"error\": {\n        \"code\": \"InvalidApiClient\",\n        \"http_code\": 401,\n        \"message\": \"Your access token is wrong.\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}"}]},"url":"/languages","examples":{"codes":[]},"settings":""},"category":"55122b0f3228bc2500819a72","excerpt":"","parentDoc":null,"isReference":false,"next":{"description":"","pages":[]},"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

getSupported languages


Returns the list of languages MotaWord support. Here is a list of languages we currently support: [https://www.motaword.com/languages](https://www.motaword.com/languages) [block:callout] { "type": "info", "title": "Are we missing a language?", "body": "Just [let us know](https://www.motaword.com/contact) and we'll work on getting a base of translators for that language and train them. It takes our vendor managers around 2 weeks to get viable translator candidates for a new language and train them. By the time you are done with programming around our API, we would be done with adding the human resources." } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Returns the list of languages MotaWord support. Here is a list of languages we currently support: [https://www.motaword.com/languages](https://www.motaword.com/languages) [block:callout] { "type": "info", "title": "Are we missing a language?", "body": "Just [let us know](https://www.motaword.com/contact) and we'll work on getting a base of translators for that language and train them. It takes our vendor managers around 2 weeks to get viable translator candidates for a new language and train them. By the time you are done with programming around our API, we would be done with adding the human resources." } [/block]
{"_id":"552f23228f136c0d0050314b","__v":3,"api":{"results":{"codes":[{"name":"","code":"{\n  \"documents\": [\"string\"],\n  \"styleguides\": [\"string\"],\n  \"glossaries\": [\"string\"],\n}","language":"json","status":200},{"name":"","code":"{\n    \"error\": {\n        \"code\": \"InvalidApiClient\",\n        \"http_code\": 401,\n        \"message\": \"Your access token is wrong.\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","language":"json","status":401}]},"url":"/formats","auth":"never","method":"get","params":[],"examples":{"codes":[]},"settings":""},"category":"55122b0f3228bc2500819a72","link_external":false,"project":"55105fa24980621900063340","title":"Supported formats","createdAt":"2015-04-16T02:49:06.560Z","githubsync":"","updates":[],"user":"55105f652dd9010d0019e17b","version":"5512229bc1b13537009f5d96","body":"Returns a list of supported file extensions for documents, style guides and glossaries. Here is a list of file formats we currently support: [https://www.motaword.com/formats](https://www.motaword.com/formats)","excerpt":"","hidden":false,"order":2,"slug":"supported-formats","sync_unique":"","type":"get","link_url":"","parentDoc":null,"isReference":false,"next":{"description":"","pages":[]},"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

getSupported formats


Returns a list of supported file extensions for documents, style guides and glossaries. Here is a list of file formats we currently support: [https://www.motaword.com/formats](https://www.motaword.com/formats)

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Returns a list of supported file extensions for documents, style guides and glossaries. Here is a list of file formats we currently support: [https://www.motaword.com/formats](https://www.motaword.com/formats)
{"_id":"59c96da53a4eb30026a23e90","project":"55105fa24980621900063340","version":"5512229bc1b13537009f5d96","category":"55122b0f3228bc2500819a72","user":"55105f652dd9010d0019e17b","updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-09-25T20:57:09.172Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"A webhook is an internet address that we will notify about project updates. For example when a project's translation is complete, you will get a \"translated\" action; same for \"proofread\" and \"completed\" statuses. The URL specified must be able to process the information a webhook sends, make use of it, and return a successful response to the MotaWord webhook request.\n\nMotaWord API provides webhooks currently for 3 actions:\n\n- Project **translated**\n- Project **proofread**\n- Project **completed**\n\nTo start receiving webhook callbacks, specify `callback_url` when you are creating a project. See [Create a project](doc:create-a-project). \n\nMotaWord will send the URL you specify calls with this payload:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"type\\\": \\\"project\\\",\\n  \\\"action\\\": \\\"translated\\\",\\n  \\\"project\\\": {\\n    \\\"id\\\": 1,\\n    \\\"source_language\\\": \\\"string\\\",\\n    \\\"target_languages\\\": [\\n      \\\"string\\\"\\n    ],\\n    \\\"word_count\\\": 123,\\n    \\\"price\\\": {\\n      \\\"amount\\\": 1.00,\\n      \\\"currency\\\": \\\"usd\\\"\\n    },\\n    \\\"status\\\": \\\"string\\\",\\n    \\\"delivery_at\\\": \\\"2015-04-04\\\",\\n    \\\"valid_until\\\": \\\"2015-04-04\\\",\\n    \\\"callback_url\\\": \\\"string\\\",\\n    \\\"custom\\\": {},\\n    \\\"created_at\\\": \\\"2015-04-04\\\",\\n    \\\"links\\\": {\\n      \\\"self\\\": {\\n        \\\"href\\\": \\\"https://api.motaword.com/v0/projects/1\\\"\\n      },\\n      \\\"documents\\\": {\\n        \\\"href\\\": \\\"https://api.motaword.com/v0/projects/1/documents\\\"\\n      },\\n      \\\"styleguides\\\": {\\n        \\\"href\\\": \\\"https://api.motaword.com/v0/projects/1/styleguides\\\"\\n      },\\n      \\\"glossaries\\\": {\\n        \\\"href\\\": \\\"https://api.motaword.com/v0/projects/1/glossaries\\\"\\n      }\\n    }\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"`type`\",\n    \"h-0\": \"Key\",\n    \"h-1\": \"Possible values\",\n    \"h-2\": \"Description\",\n    \"0-1\": \"`project`\",\n    \"0-2\": \"The object type which this webhook is sending an update about. Currently only `project` value will be sent.\",\n    \"1-0\": \"`action`\",\n    \"1-1\": \"`translated`, `proofread`, `completed`\",\n    \"1-2\": \"This is the action that the webhook is notifying you about. When a project is translated, proofread or completed, you will receive calls for each separately.\",\n    \"2-0\": \"`project`\",\n    \"2-2\": \"Project object. See [Get a project](doc:get-a-project) for details.\"\n  },\n  \"cols\": 3,\n  \"rows\": 3\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Triggering a webhook manually\",\n  \"body\": \"Easy! We have an endpoint for that. See [Trigger a Webhook](doc:trigger-a-webhook) for details.\"\n}\n[/block]","excerpt":"","slug":"webhooks","type":"basic","title":"Webhooks","__v":0,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

Webhooks


A webhook is an internet address that we will notify about project updates. For example when a project's translation is complete, you will get a "translated" action; same for "proofread" and "completed" statuses. The URL specified must be able to process the information a webhook sends, make use of it, and return a successful response to the MotaWord webhook request. MotaWord API provides webhooks currently for 3 actions: - Project **translated** - Project **proofread** - Project **completed** To start receiving webhook callbacks, specify `callback_url` when you are creating a project. See [Create a project](doc:create-a-project). MotaWord will send the URL you specify calls with this payload: [block:code] { "codes": [ { "code": "{\n \"type\": \"project\",\n \"action\": \"translated\",\n \"project\": {\n \"id\": 1,\n \"source_language\": \"string\",\n \"target_languages\": [\n \"string\"\n ],\n \"word_count\": 123,\n \"price\": {\n \"amount\": 1.00,\n \"currency\": \"usd\"\n },\n \"status\": \"string\",\n \"delivery_at\": \"2015-04-04\",\n \"valid_until\": \"2015-04-04\",\n \"callback_url\": \"string\",\n \"custom\": {},\n \"created_at\": \"2015-04-04\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.motaword.com/v0/projects/1\"\n },\n \"documents\": {\n \"href\": \"https://api.motaword.com/v0/projects/1/documents\"\n },\n \"styleguides\": {\n \"href\": \"https://api.motaword.com/v0/projects/1/styleguides\"\n },\n \"glossaries\": {\n \"href\": \"https://api.motaword.com/v0/projects/1/glossaries\"\n }\n }\n }\n}", "language": "json" } ] } [/block] [block:parameters] { "data": { "0-0": "`type`", "h-0": "Key", "h-1": "Possible values", "h-2": "Description", "0-1": "`project`", "0-2": "The object type which this webhook is sending an update about. Currently only `project` value will be sent.", "1-0": "`action`", "1-1": "`translated`, `proofread`, `completed`", "1-2": "This is the action that the webhook is notifying you about. When a project is translated, proofread or completed, you will receive calls for each separately.", "2-0": "`project`", "2-2": "Project object. See [Get a project](doc:get-a-project) for details." }, "cols": 3, "rows": 3 } [/block] [block:callout] { "type": "info", "title": "Triggering a webhook manually", "body": "Easy! We have an endpoint for that. See [Trigger a Webhook](doc:trigger-a-webhook) for details." } [/block]
A webhook is an internet address that we will notify about project updates. For example when a project's translation is complete, you will get a "translated" action; same for "proofread" and "completed" statuses. The URL specified must be able to process the information a webhook sends, make use of it, and return a successful response to the MotaWord webhook request. MotaWord API provides webhooks currently for 3 actions: - Project **translated** - Project **proofread** - Project **completed** To start receiving webhook callbacks, specify `callback_url` when you are creating a project. See [Create a project](doc:create-a-project). MotaWord will send the URL you specify calls with this payload: [block:code] { "codes": [ { "code": "{\n \"type\": \"project\",\n \"action\": \"translated\",\n \"project\": {\n \"id\": 1,\n \"source_language\": \"string\",\n \"target_languages\": [\n \"string\"\n ],\n \"word_count\": 123,\n \"price\": {\n \"amount\": 1.00,\n \"currency\": \"usd\"\n },\n \"status\": \"string\",\n \"delivery_at\": \"2015-04-04\",\n \"valid_until\": \"2015-04-04\",\n \"callback_url\": \"string\",\n \"custom\": {},\n \"created_at\": \"2015-04-04\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.motaword.com/v0/projects/1\"\n },\n \"documents\": {\n \"href\": \"https://api.motaword.com/v0/projects/1/documents\"\n },\n \"styleguides\": {\n \"href\": \"https://api.motaword.com/v0/projects/1/styleguides\"\n },\n \"glossaries\": {\n \"href\": \"https://api.motaword.com/v0/projects/1/glossaries\"\n }\n }\n }\n}", "language": "json" } ] } [/block] [block:parameters] { "data": { "0-0": "`type`", "h-0": "Key", "h-1": "Possible values", "h-2": "Description", "0-1": "`project`", "0-2": "The object type which this webhook is sending an update about. Currently only `project` value will be sent.", "1-0": "`action`", "1-1": "`translated`, `proofread`, `completed`", "1-2": "This is the action that the webhook is notifying you about. When a project is translated, proofread or completed, you will receive calls for each separately.", "2-0": "`project`", "2-2": "Project object. See [Get a project](doc:get-a-project) for details." }, "cols": 3, "rows": 3 } [/block] [block:callout] { "type": "info", "title": "Triggering a webhook manually", "body": "Easy! We have an endpoint for that. See [Trigger a Webhook](doc:trigger-a-webhook) for details." } [/block]
{"_id":"551ffc8e9aa80d0d00e17789","slug":"list-projects","category":"55122abdc1b13537009f5dab","order":0,"project":"55105fa24980621900063340","hidden":false,"type":"get","version":"5512229bc1b13537009f5d96","link_external":false,"link_url":"","updates":[],"__v":2,"body":"Projects are the core of MotaWord API. Any time you create a new translation project, you will be getting a translation quote. You can add documents, style guides and glossaries to your project or update its language pairs before launching it; some actions such as modifying documents or language pairs will change the price of the project. \n\nWhen you decide to launch a project, begin its translation, you need to issue a `launch` call. For details about launching and project payments, [see this section](http://motaword.readme.io/docs/start-a-project).\n\n*Communicating context to translator is of utmost importance for a high-quality translation. Uploading files that assist translators with context such as style guides and glossaries are absolutely no-cost features and [we encourage you to use them](http://motaword.readme.io/docs/list-style-guides)!* \n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Project status\"\n}\n[/block]\n`status` field in project detail can be one of the followings:\n\n- **pending:** The project is pending for payment, has not started yet. This is basically a quote at the moment.\n- **started:** The project was launched and the translation has begun.\n- **completed:** The project's translation and proofreading were completed and ready to be delivered.","excerpt":"Get a list of your projects","githubsync":"","sync_unique":"","title":"List projects","user":"55105f652dd9010d0019e17b","api":{"auth":"required","method":"get","params":[{"_id":"551ffd64623ff50d009b2bac","ref":"","in":"query","required":false,"desc":"Number of projects per page","default":"10","type":"int","name":"per_page"},{"_id":"551ffd64623ff50d009b2bab","ref":"","in":"query","required":false,"desc":"Current page","default":"1","type":"int","name":"page"}],"results":{"codes":[{"status":200,"name":"","code":"{\n\t\"projects\": [\n  \t{\n      \"id\": 1,\n      \"source_language\": \"string\",\n      \"target_languages\": [\n        \"string\"\n      ],\n      \"word_count\": 123,\n      \"price\": {\n      \t\"amount\": 1.00,\n        \"currency\": \"usd\"\n      },\n      \"status\": \"string\",\n      \"delivery_at\": 1553880303,\n      \"valid_until\": 1553880303,\n      \"callback_url\": \"string\",\n      \"custom\": {},\n      \"created_at\": 1553880303,\n      \"links\": {\n        \"self\": {\n          \"href\": \"https://api.motaword.com/v0/projects/1\"\n        },\n        \"documents\": {\n          \"href\": \"https://api.motaword.com/v0/projects/1/documents\"\n        },\n        \"styleguides\": {\n          \"href\": \"https://api.motaword.com/v0/projects/1/styleguides\"\n        },\n        \"glossaries\": {\n          \"href\": \"https://api.motaword.com/v0/projects/1/glossaries\"\n        }\n      }\n    }\n  ],\n  \"meta\": {\n    \"paging\": {\n      \"links\": {\n        \"next\": \"string\",\n        \"previous\": \"string\",\n        \"self\": \"string\"\n      },\n      \"page\": 1,\n      \"per_page\": 10,\n      \"total_count\": 12\n    }\n  }\n}","language":"json"},{"name":"","code":"{\n    \"error\": {\n        \"code\": \"InvalidApiClient\",\n        \"http_code\": 401,\n        \"message\": \"Your access token is wrong.\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","language":"json","status":401}]},"url":"/projects","examples":{"codes":[]},"settings":""},"createdAt":"2015-04-04T15:00:30.750Z","editedParams":true,"editedParams2":true,"parentDoc":null,"isReference":false,"next":{"description":"","pages":[]},"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

getList projects

Get a list of your projects

Query Params

per_page:
integer10
Number of projects per page
page:
integer1
Current page
Projects are the core of MotaWord API. Any time you create a new translation project, you will be getting a translation quote. You can add documents, style guides and glossaries to your project or update its language pairs before launching it; some actions such as modifying documents or language pairs will change the price of the project. When you decide to launch a project, begin its translation, you need to issue a `launch` call. For details about launching and project payments, [see this section](http://motaword.readme.io/docs/start-a-project). *Communicating context to translator is of utmost importance for a high-quality translation. Uploading files that assist translators with context such as style guides and glossaries are absolutely no-cost features and [we encourage you to use them](http://motaword.readme.io/docs/list-style-guides)!* [block:api-header] { "type": "basic", "title": "Project status" } [/block] `status` field in project detail can be one of the followings: - **pending:** The project is pending for payment, has not started yet. This is basically a quote at the moment. - **started:** The project was launched and the translation has begun. - **completed:** The project's translation and proofreading were completed and ready to be delivered.

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Projects are the core of MotaWord API. Any time you create a new translation project, you will be getting a translation quote. You can add documents, style guides and glossaries to your project or update its language pairs before launching it; some actions such as modifying documents or language pairs will change the price of the project. When you decide to launch a project, begin its translation, you need to issue a `launch` call. For details about launching and project payments, [see this section](http://motaword.readme.io/docs/start-a-project). *Communicating context to translator is of utmost importance for a high-quality translation. Uploading files that assist translators with context such as style guides and glossaries are absolutely no-cost features and [we encourage you to use them](http://motaword.readme.io/docs/list-style-guides)!* [block:api-header] { "type": "basic", "title": "Project status" } [/block] `status` field in project detail can be one of the followings: - **pending:** The project is pending for payment, has not started yet. This is basically a quote at the moment. - **started:** The project was launched and the translation has begun. - **completed:** The project's translation and proofreading were completed and ready to be delivered.
{"_id":"552022b3504fd6230022ade8","api":{"auth":"required","method":"get","params":[{"_id":"552022b3504fd6230022ade9","ref":"","in":"path","required":false,"desc":"Project ID","default":"","type":"int","name":"id"}],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{\n  \"id\": 1,\n  \"source_language\": \"string\",\n  \"target_languages\": [\n    \"string\"\n  ],\n  \"word_count\": 123,\n  \"price\": {\n    \"amount\": 1.00,\n    \"currency\": \"usd\"\n  },\n  \"status\": \"string\",\n  \"delivery_at\": 1553880303,\n  \"valid_until\": 1553880303,\n  \"callback_url\": \"string\",\n  \"custom\": {},\n  \"created_at\": 1553880303,\n  \"links\": {\n    \"self\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1\"\n    },\n    \"documents\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1/documents\"\n    },\n    \"styleguides\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1/styleguides\"\n    },\n    \"glossaries\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1/glossaries\"\n    }\n  }\n}"},{"status":401,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"InvalidApiClient\",\n        \"http_code\": 401,\n        \"message\": \"Your access token is wrong.\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","name":""},{"status":404,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}"}]},"url":"/projects/:id","examples":{"codes":[]},"settings":""},"body":"Get a single project detail with its total word count, price, language pairs, status and related dates.\n\n**valid_until:** This field is only visible before you actually launch a project. It specifies the date until which this quote will be valid.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Dates\",\n  \"body\": \"All dates in our API is returned as Unix epoch time, which is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap seconds (in ISO 8601: 1970-01-01T00:00:00Z).\"\n}\n[/block]","updates":[],"editedParams":true,"excerpt":"","githubsync":"","sync_unique":"","type":"get","hidden":false,"link_url":"","order":1,"project":"55105fa24980621900063340","slug":"get-a-project","user":"55105f652dd9010d0019e17b","version":"5512229bc1b13537009f5d96","__v":1,"category":"55122abdc1b13537009f5dab","createdAt":"2015-04-04T17:43:15.728Z","editedParams2":true,"link_external":false,"title":"Get a project","parentDoc":null,"isReference":false,"next":{"description":"","pages":[]},"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

getGet a project


Path Params

id:
integer
Project ID
Get a single project detail with its total word count, price, language pairs, status and related dates. **valid_until:** This field is only visible before you actually launch a project. It specifies the date until which this quote will be valid. [block:callout] { "type": "info", "title": "Dates", "body": "All dates in our API is returned as Unix epoch time, which is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap seconds (in ISO 8601: 1970-01-01T00:00:00Z)." } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Get a single project detail with its total word count, price, language pairs, status and related dates. **valid_until:** This field is only visible before you actually launch a project. It specifies the date until which this quote will be valid. [block:callout] { "type": "info", "title": "Dates", "body": "All dates in our API is returned as Unix epoch time, which is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap seconds (in ISO 8601: 1970-01-01T00:00:00Z)." } [/block]
{"_id":"55202884504fd6230022adec","__v":2,"link_external":false,"order":2,"slug":"create-a-project","updates":[],"version":"5512229bc1b13537009f5d96","body":"[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"Creating and launching a project\",\n  \"body\": \"Creating a project is preparing your project to launch. Think of it like getting a quote. Until you [launch the project](doc:start-a-project), your translation project will not begin and you won't be charged for it.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Languages\"\n}\n[/block]\nEvery translation project must have a language pair: 1 source language , 1 or more target languages. These two fields are the only required parameters of creating a new project.\n\nTo get a list of language codes, see [Supported languages](doc:supported-languages).\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Project files\"\n}\n[/block]\nTranslation projects consist of 3 different files: documents, style guides, glossaries. \n\n**[Documents](doc:list-documents)** are the files that will be translated. Before you *launch* a project, it must have at least 1 document. On the other hand, **[style guides](doc:list-style-guides)** and **[glossaries](doc:list-glossaries)** are optional. If you provide, they will definitely increase the quality and speed of your projects.\n\nYou can either upload these files while creating a project, or you can later upload them via their own API endpoints, such as in [Upload a document](doc:upload-a-document) section.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"To get a list of supported file formats for documents, style guides and glossaries, see \\\"[Supported formats](doc:supported-formats)\\\" section.\",\n  \"title\": \"Supported file formats\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Uploading files as form data\",\n  \"body\": \"See **Upload a document**, **Upload a style guide** or **Upload a glossary** sections to learn more about how to upload your files directly as an array of form data, rather than an array of file handles.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Callback URL and custom data\"\n}\n[/block]\nA **callback URL** is an internet address that we will notify about project updates. For example when a project's translation is complete, you will get a \"translated\" action; same for \"proofread\" and \"completed\" statuses. To learn more, see the section \"Web Hooks\".\n\nAnd a piece of **custom data** is an information you want to receive with your project anytime you ask it. When you get details of your project, or on the web hooks you have, this custom data will always be presented to you for mutual data communication.","editedParams":true,"editedParams2":true,"githubsync":"","project":"55105fa24980621900063340","sync_unique":"","hidden":false,"isReference":false,"user":"55105f652dd9010d0019e17b","type":"post","api":{"auth":"required","examples":{"codes":[]},"method":"post","params":[{"_id":"55202884504fd6230022adf1","ref":"","in":"body","required":true,"desc":"Language code. Source language of your translation project.","default":"","type":"string","name":"source_language"},{"_id":"55202884504fd6230022adf0","ref":"","in":"body","required":true,"desc":"Array of language codes. Target language(s) that you want your source language to be translated into.","default":"","type":"array_string","name":"target_languages"},{"_id":"55202884504fd6230022adef","ref":"","in":"body","required":false,"desc":"Optional. Array of file type parameters. A list of documents to be translated.","default":"","type":"array_mixed","name":"documents"},{"_id":"55202884504fd6230022adee","ref":"","in":"body","required":false,"desc":"Optional. Array of file type parameters. A list of style guides to be presented to the vendors.","default":"","type":"array_mixed","name":"styleguides"},{"_id":"55202884504fd6230022aded","ref":"","in":"body","required":false,"desc":"Optional. Array of file type parameters. A list of glossaries to accompany the translation project. Currently, only 1 glossary is accepted.","default":"","type":"array_mixed","name":"glossaries"},{"_id":"552028e5d133b61900312556","ref":"","in":"body","required":false,"desc":"An absolute URL to receive hook notifications about your project.","default":"","type":"string","name":"callback_url"},{"_id":"552028e5d133b61900312555","ref":"","in":"body","required":false,"desc":"Any custom data to store with your project. This parameter will always be presented with the project model, wherever it appears. Arrays are accepted.","default":"","type":"array_mixed","name":"custom"}],"results":{"codes":[{"name":"","code":"{\n  \"id\": 1,\n  \"source_language\": \"string\",\n  \"target_languages\": [\n    \"string\"\n  ],\n  \"word_count\": 123,\n  \"price\": {\n    \"amount\": 1.00,\n    \"currency\": \"usd\"\n  },\n  \"status\": \"string\",\n  \"delivery_at\": 1553880303,\n  \"valid_until\": 1553880303,\n  \"callback_url\": \"string\",\n  \"custom\": {},\n  \"created_at\": 1553880303,\n  \"links\": {\n    \"self\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1\"\n    },\n    \"documents\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1/documents\"\n    },\n    \"styleguides\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1/styleguides\"\n    },\n    \"glossaries\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1/glossaries\"\n    }\n  }\n}","language":"json","status":200},{"status":401,"name":"","code":"{\n    \"error\": {\n        \"code\": \"InvalidApiClient\",\n        \"http_code\": 401,\n        \"message\": \"Your access token is wrong.\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","language":"json"},{"status":400,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"FileTooLarge\",\n        \"http_code\": 400,\n        \"message\": \"FileTooLarge\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"FileTooSmall\",\n        \"http_code\": 400,\n        \"message\": \"FileTooSmall\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"FileWasAlreadyUploaded\",\n        \"http_code\": 400,\n        \"message\": \"FileWasAlreadyUploaded\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}"},{"code":"{\n    \"error\": {\n        \"code\": \"UnsupportedDocumentFormat\",\n        \"http_code\": 405,\n        \"message\": \"UnsupportedDocumentFormat\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"UnsupportedStyleGuideFormat\",\n        \"http_code\": 405,\n        \"message\": \"UnsupportedStyleGuideFormat\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"UnsupportedGlossaryFormat\",\n        \"http_code\": 405,\n        \"message\": \"UnsupportedGlossaryFormat\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","language":"json","status":405},{"status":406,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"UnsupportedLanguage\",\n        \"http_code\": 406,\n        \"message\": \"UnsupportedLanguage\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"TooManyGlossaries\",\n        \"http_code\": 406,\n        \"message\": \"TooManyGlossaries\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"ProjectAlreadyHasGlossary\",\n        \"http_code\": 406,\n        \"message\": \"ProjectAlreadyHasGlossary\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}"},{"status":500,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectInsertFailed\",\n        \"http_code\": 500,\n        \"message\": \"ProjectInsertFailed\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}"}]},"settings":"","url":"/projects"},"category":"55122abdc1b13537009f5dab","createdAt":"2015-04-04T18:08:04.150Z","excerpt":"","link_url":"","title":"Create a project","parentDoc":null,"next":{"description":"","pages":[]},"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

postCreate a project


Body Params

source_language:
required
string
Language code. Source language of your translation project.
target_languages:
required
array of strings
Array of language codes. Target language(s) that you want your source language to be translated into.
documents:
array of mixed
Optional. Array of file type parameters. A list of documents to be translated.
styleguides:
array of mixed
Optional. Array of file type parameters. A list of style guides to be presented to the vendors.
glossaries:
array of mixed
Optional. Array of file type parameters. A list of glossaries to accompany the translation project. Currently, only 1 glossary is accepted.
callback_url:
string
An absolute URL to receive hook notifications about your project.
custom:
array of mixed
Any custom data to store with your project. This parameter will always be presented with the project model, wherever it appears. Arrays are accepted.
[block:callout] { "type": "success", "title": "Creating and launching a project", "body": "Creating a project is preparing your project to launch. Think of it like getting a quote. Until you [launch the project](doc:start-a-project), your translation project will not begin and you won't be charged for it." } [/block] [block:api-header] { "type": "basic", "title": "Languages" } [/block] Every translation project must have a language pair: 1 source language , 1 or more target languages. These two fields are the only required parameters of creating a new project. To get a list of language codes, see [Supported languages](doc:supported-languages). [block:api-header] { "type": "basic", "title": "Project files" } [/block] Translation projects consist of 3 different files: documents, style guides, glossaries. **[Documents](doc:list-documents)** are the files that will be translated. Before you *launch* a project, it must have at least 1 document. On the other hand, **[style guides](doc:list-style-guides)** and **[glossaries](doc:list-glossaries)** are optional. If you provide, they will definitely increase the quality and speed of your projects. You can either upload these files while creating a project, or you can later upload them via their own API endpoints, such as in [Upload a document](doc:upload-a-document) section. [block:callout] { "type": "info", "body": "To get a list of supported file formats for documents, style guides and glossaries, see \"[Supported formats](doc:supported-formats)\" section.", "title": "Supported file formats" } [/block] [block:callout] { "type": "info", "title": "Uploading files as form data", "body": "See **Upload a document**, **Upload a style guide** or **Upload a glossary** sections to learn more about how to upload your files directly as an array of form data, rather than an array of file handles." } [/block] [block:api-header] { "type": "basic", "title": "Callback URL and custom data" } [/block] A **callback URL** is an internet address that we will notify about project updates. For example when a project's translation is complete, you will get a "translated" action; same for "proofread" and "completed" statuses. To learn more, see the section "Web Hooks". And a piece of **custom data** is an information you want to receive with your project anytime you ask it. When you get details of your project, or on the web hooks you have, this custom data will always be presented to you for mutual data communication.

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



[block:callout] { "type": "success", "title": "Creating and launching a project", "body": "Creating a project is preparing your project to launch. Think of it like getting a quote. Until you [launch the project](doc:start-a-project), your translation project will not begin and you won't be charged for it." } [/block] [block:api-header] { "type": "basic", "title": "Languages" } [/block] Every translation project must have a language pair: 1 source language , 1 or more target languages. These two fields are the only required parameters of creating a new project. To get a list of language codes, see [Supported languages](doc:supported-languages). [block:api-header] { "type": "basic", "title": "Project files" } [/block] Translation projects consist of 3 different files: documents, style guides, glossaries. **[Documents](doc:list-documents)** are the files that will be translated. Before you *launch* a project, it must have at least 1 document. On the other hand, **[style guides](doc:list-style-guides)** and **[glossaries](doc:list-glossaries)** are optional. If you provide, they will definitely increase the quality and speed of your projects. You can either upload these files while creating a project, or you can later upload them via their own API endpoints, such as in [Upload a document](doc:upload-a-document) section. [block:callout] { "type": "info", "body": "To get a list of supported file formats for documents, style guides and glossaries, see \"[Supported formats](doc:supported-formats)\" section.", "title": "Supported file formats" } [/block] [block:callout] { "type": "info", "title": "Uploading files as form data", "body": "See **Upload a document**, **Upload a style guide** or **Upload a glossary** sections to learn more about how to upload your files directly as an array of form data, rather than an array of file handles." } [/block] [block:api-header] { "type": "basic", "title": "Callback URL and custom data" } [/block] A **callback URL** is an internet address that we will notify about project updates. For example when a project's translation is complete, you will get a "translated" action; same for "proofread" and "completed" statuses. To learn more, see the section "Web Hooks". And a piece of **custom data** is an information you want to receive with your project anytime you ask it. When you get details of your project, or on the web hooks you have, this custom data will always be presented to you for mutual data communication.
{"_id":"55202e00623ff50d009b2bc0","link_url":"","sync_unique":"","type":"put","version":"5512229bc1b13537009f5d96","editedParams2":true,"createdAt":"2015-04-04T18:31:28.097Z","editedParams":true,"project":"55105fa24980621900063340","body":"[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"Can't do PUT requests?\",\n  \"body\": \"You can replace PUT and DELETE requests by making a POST request with a query string: ```?method=put``` or ```?method=delete```\"\n}\n[/block]","api":{"results":{"codes":[{"code":"{\n  \"id\": 1,\n  \"source_language\": \"string\",\n  \"target_languages\": [\n    \"string\"\n  ],\n  \"word_count\": 123,\n  \"price\": {\n    \"amount\": 1.00,\n    \"currency\": \"usd\"\n  },\n  \"status\": \"string\",\n  \"delivery_at\": 1553880303,\n  \"valid_until\": 1553880303,\n  \"callback_url\": \"string\",\n  \"custom\": {},\n  \"created_at\": 1553880303,\n  \"links\": {\n    \"self\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1\"\n    },\n    \"documents\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1/documents\"\n    },\n    \"styleguides\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1/styleguides\"\n    },\n    \"glossaries\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1/glossaries\"\n    }\n  }\n}","name":"","status":200,"language":"json"},{"status":401,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"InvalidApiClient\",\n        \"http_code\": 401,\n        \"message\": \"Your access token is wrong.\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","name":""},{"status":404,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}"},{"language":"json","code":"{\n    \"error\": {\n        \"code\": \"UnsupportedLanguage\",\n        \"http_code\": 406,\n        \"message\": \"UnsupportedLanguage\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","status":406}]},"url":"/projects/:id","auth":"required","method":"put","params":[{"_id":"55202e00623ff50d009b2bc5","ref":"","in":"path","required":true,"desc":"Project ID.","default":"","type":"int","name":"id"},{"_id":"55202e00623ff50d009b2bc4","ref":"","in":"body","required":true,"desc":"Language code. Source language of your translation project.","default":"","type":"string","name":"source_language"},{"_id":"55202e00623ff50d009b2bc3","ref":"","in":"body","required":true,"desc":"Array of language codes. Target languages of your translation project.","default":"","type":"array_string","name":"target_languages"},{"_id":"55202e00623ff50d009b2bc2","ref":"","in":"body","required":false,"desc":"An absolute URL to receive hook notifications about your project.","default":"","type":"string","name":"callback_url"},{"_id":"55202e00623ff50d009b2bc1","ref":"","in":"body","required":false,"desc":"Any custom data to store with your project. This parameter will always be presented with the project model, wherever it appears. Arrays are accepted.","default":"","type":"array_mixed","name":"custom"}],"examples":{"codes":[]},"settings":""},"excerpt":"","githubsync":"","order":3,"slug":"update-a-project","user":"55105f652dd9010d0019e17b","__v":1,"hidden":false,"link_external":false,"title":"Update a project","updates":[],"category":"55122abdc1b13537009f5dab","parentDoc":null,"isReference":false,"next":{"description":"","pages":[]},"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

putUpdate a project


Path Params

id:
required
integer
Project ID.

Body Params

source_language:
required
string
Language code. Source language of your translation project.
target_languages:
required
array of strings
Array of language codes. Target languages of your translation project.
callback_url:
string
An absolute URL to receive hook notifications about your project.
custom:
array of mixed
Any custom data to store with your project. This parameter will always be presented with the project model, wherever it appears. Arrays are accepted.
[block:callout] { "type": "success", "title": "Can't do PUT requests?", "body": "You can replace PUT and DELETE requests by making a POST request with a query string: ```?method=put``` or ```?method=delete```" } [/block]

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



[block:callout] { "type": "success", "title": "Can't do PUT requests?", "body": "You can replace PUT and DELETE requests by making a POST request with a query string: ```?method=put``` or ```?method=delete```" } [/block]
{"_id":"552034a3504fd6230022adfe","category":"55122abdc1b13537009f5dab","createdAt":"2015-04-04T18:59:47.358Z","editedParams":true,"editedParams2":true,"excerpt":"","order":4,"type":"post","__v":1,"githubsync":"","link_url":"","project":"55105fa24980621900063340","sync_unique":"","api":{"method":"post","params":[{"desc":"Project ID.","default":"","type":"int","name":"id","in":"path","_id":"5520358c504fd6230022ae03","required":false},{"default":"client","type":"string","name":"payment_method","in":"body","_id":"5520358c504fd6230022ae02","required":false,"desc":"Optional. Determines which method to use for payment. Options are 'corporate', 'client'."},{"required":false,"desc":"Optional. According to your corporate account configuration, this may be required.","default":"","type":"string","name":"payment_code","in":"body","_id":"5520358c504fd6230022ae01"},{"desc":"Optional with corporate accounts. Not available for others.","default":"","type":"string","name":"budget_code","in":"body","_id":"5520358c504fd6230022ae00","required":false}],"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"status\": \"started\"\n}","name":""},{"status":400,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"MissingPaymentCode\",\n        \"http_code\": 400,\n        \"message\": \"MissingPaymentCode\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"MissingCorporateAccount\",\n        \"http_code\": 400,\n        \"message\": \"MissingCorporateAccount\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"MissingPaymentMethod\",\n        \"http_code\": 400,\n        \"message\": \"MissingPaymentMethod\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","name":""},{"status":401,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"CorporateAccountNotAllowedForApiPayment\",\n        \"http_code\": 401,\n        \"message\": \"CorporateAccountNotAllowedForApiPayment\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"ApiClientMissingPaymentInformation\",\n        \"http_code\": 401,\n        \"message\": \"ApiClientMissingPaymentInformation\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}"},{"status":404,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}"}]},"url":"/projects/:id/launch","auth":"required"},"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Payments\"\n}\n[/block]\nWhen you launch a project, your account will be charged for it. The price is shown on project model. You must save a credit card (or use a corporate payment code provided by us) for your application to be able to launch it.\n\nTo save or update your credit card, go to [Developer Portal](https://www.motaword.com/developer) and your application details. Click Add/Update/View Payment Methods button. In there you can save your credit card.\n\nIf your account belongs to a corporate account, you can also find your payment code at the same page.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Payment code\",\n  \"body\": \"Your corporate account configuration may not require payment code on API projects. [Contact us](https://www.motaword.com/contact) if you want learn more about corporate account status.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Payment method\",\n  \"body\": \"The default payment method is ```client```. This means that we will use the credit card you stored previously to charge for your translation project.\\n\\nIf you are part of a corporate account, you must provide ```corporate``` for the payment method parameter.\"\n}\n[/block]","hidden":false,"updates":[],"user":"55105f652dd9010d0019e17b","link_external":false,"slug":"start-a-project","title":"Launch a project","version":"5512229bc1b13537009f5d96","parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

postLaunch a project


Path Params

id:
integer
Project ID.

Body Params

payment_method:
stringclient
Optional. Determines which method to use for payment. Options are 'corporate', 'client'.
payment_code:
string
Optional. According to your corporate account configuration, this may be required.
budget_code:
string
Optional with corporate accounts. Not available for others.
[block:api-header] { "type": "basic", "title": "Payments" } [/block] When you launch a project, your account will be charged for it. The price is shown on project model. You must save a credit card (or use a corporate payment code provided by us) for your application to be able to launch it. To save or update your credit card, go to [Developer Portal](https://www.motaword.com/developer) and your application details. Click Add/Update/View Payment Methods button. In there you can save your credit card. If your account belongs to a corporate account, you can also find your payment code at the same page. [block:callout] { "type": "info", "title": "Payment code", "body": "Your corporate account configuration may not require payment code on API projects. [Contact us](https://www.motaword.com/contact) if you want learn more about corporate account status." } [/block] [block:callout] { "type": "warning", "title": "Payment method", "body": "The default payment method is ```client```. This means that we will use the credit card you stored previously to charge for your translation project.\n\nIf you are part of a corporate account, you must provide ```corporate``` for the payment method parameter." } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



[block:api-header] { "type": "basic", "title": "Payments" } [/block] When you launch a project, your account will be charged for it. The price is shown on project model. You must save a credit card (or use a corporate payment code provided by us) for your application to be able to launch it. To save or update your credit card, go to [Developer Portal](https://www.motaword.com/developer) and your application details. Click Add/Update/View Payment Methods button. In there you can save your credit card. If your account belongs to a corporate account, you can also find your payment code at the same page. [block:callout] { "type": "info", "title": "Payment code", "body": "Your corporate account configuration may not require payment code on API projects. [Contact us](https://www.motaword.com/contact) if you want learn more about corporate account status." } [/block] [block:callout] { "type": "warning", "title": "Payment method", "body": "The default payment method is ```client```. This means that we will use the credit card you stored previously to charge for your translation project.\n\nIf you are part of a corporate account, you must provide ```corporate``` for the payment method parameter." } [/block]
{"_id":"5931e2e3e9b0f1001b891c4d","project":"55105fa24980621900063340","version":"5512229bc1b13537009f5d96","category":"55122abdc1b13537009f5dab","user":"55105f652dd9010d0019e17b","updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-06-02T22:12:51.457Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[]},"settings":"","results":{"codes":[{"status":200,"language":"json","code":"{\n  \"status\": \"success\"\n}","name":null},{"status":404,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}"}]},"method":"post","auth":"required","params":[{"_id":"5520358c504fd6230022ae03","ref":"","in":"path","required":false,"desc":"Project ID.","default":"","type":"int","name":"id"},{"_id":"5520358c504fd6230022ae02","ref":"","in":"body","required":false,"desc":"Optional. Cancellation reason for the project.","default":"","type":"string","name":"reason"}],"url":"/projects/:id/cancel"},"isReference":false,"order":5,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"This method is an alternative method to DELETE project request; see the next \\\"Cancel a project\\\" section below.\"\n}\n[/block]","excerpt":"","slug":"cancel-a-project","type":"post","title":"Cancel a project","__v":0,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

postCancel a project


Path Params

id:
integer
Project ID.

Body Params

reason:
string
Optional. Cancellation reason for the project.
[block:callout] { "type": "info", "body": "This method is an alternative method to DELETE project request; see the next \"Cancel a project\" section below." } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



[block:callout] { "type": "info", "body": "This method is an alternative method to DELETE project request; see the next \"Cancel a project\" section below." } [/block]
{"_id":"5931e37979b26800253d16c4","project":"55105fa24980621900063340","version":"5512229bc1b13537009f5d96","category":"55122abdc1b13537009f5dab","user":"55105f652dd9010d0019e17b","updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-06-02T22:15:21.179Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"method":"delete","results":{"codes":[{"status":200,"language":"json","code":"{\n  \"status\": \"success\"\n}","name":null},{"status":404,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}"}]},"settings":"","examples":{"codes":[]},"auth":"required","params":[{"_id":"5520358c504fd6230022ae03","ref":"","in":"path","required":false,"desc":"Project ID.","default":"","type":"int","name":"id"},{"_id":"5520358c504fd6230022ae02","ref":"","in":"body","required":false,"desc":"Optional. Cancellation reason for the project.","default":"","type":"string","name":"reason"}],"url":"/projects/:id"},"isReference":false,"order":6,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"If you can't issue DELETE requests, you can use the other `cancel a project` method above with a POST request.\"\n}\n[/block]","excerpt":"","slug":"delete-a-project","type":"delete","title":"Cancel a project","__v":0,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

deleteCancel a project


Path Params

id:
integer
Project ID.

Body Params

reason:
string
Optional. Cancellation reason for the project.
[block:callout] { "type": "info", "body": "If you can't issue DELETE requests, you can use the other `cancel a project` method above with a POST request." } [/block]

User Information

Try It Out

delete
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



[block:callout] { "type": "info", "body": "If you can't issue DELETE requests, you can use the other `cancel a project` method above with a POST request." } [/block]
{"_id":"55203844623ff50d009b2bc8","body":"This endpoint returns separate percentage figures for translation, proofreading and their combined progress. It will also go into detail by providing progress figures for each target language.","editedParams":true,"editedParams2":true,"link_external":false,"project":"55105fa24980621900063340","api":{"url":"/projects/:id/progress","auth":"required","method":"get","params":[{"_id":"55203844623ff50d009b2bc9","required":false,"desc":"Project ID.","default":"","type":"int","name":"id","in":"path"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"total\": 100,\n    \"translation\": 100,\n    \"proofreading\": 100,\n    \"languages\": {\n        \"{languageCode}\": {\n            \"total\": 100,\n            \"translation\": 100,\n            \"proofreading\": 100\n        }\n    },\n    \"links\": {\n        \"self\": {\n            \"href\": \"https://api.motaword.com/v0/projects/1/progress\"\n        },\n        \"project\": {\n            \"href\": \"https://api.motaword.com/v0/projects/1\"\n        }\n    }\n}","name":""},{"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectNotLaunchedYet\",\n        \"http_code\": 402,\n        \"message\": \"ProjectNotLaunchedYet\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","name":"","status":402},{"code":"{\n    \"error\": {\n        \"code\": \"ProjectNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","language":"json","status":404}]}},"category":"55122abdc1b13537009f5dab","excerpt":"","hidden":false,"order":7,"sync_unique":"","version":"5512229bc1b13537009f5d96","__v":0,"link_url":"","title":"Track project progress","updates":[],"createdAt":"2015-04-04T19:15:16.891Z","githubsync":"","slug":"track-project-progress","type":"get","user":"55105f652dd9010d0019e17b","parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

getTrack project progress


Path Params

id:
integer
Project ID.
This endpoint returns separate percentage figures for translation, proofreading and their combined progress. It will also go into detail by providing progress figures for each target language.

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



This endpoint returns separate percentage figures for translation, proofreading and their combined progress. It will also go into detail by providing progress figures for each target language.
{"_id":"5931e5d3889407001bdcd3b3","project":"55105fa24980621900063340","version":"5512229bc1b13537009f5d96","category":"55122abdc1b13537009f5dab","user":"55105f652dd9010d0019e17b","updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-06-02T22:25:23.600Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"method":"post","results":{"codes":[{"status":200,"language":"json","code":"{\n  \"status\": \"success\"\n}","name":null},{"status":404,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}"},{"status":400,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"MissingMessage\",\n        \"http_code\": 404,\n        \"message\": \"You should provide required parameters!\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}"}]},"settings":"","examples":{"codes":[]},"auth":"required","params":[{"_id":"5520358c504fd6230022ae03","ref":"","in":"path","required":false,"desc":"Project ID.","default":"","type":"int","name":"id"},{"_id":"5520358c504fd6230022ae02","ref":"","in":"body","required":false,"desc":"Optional. Activity type for the report. (if applicable)","default":"","type":"string","name":"activity_type"},{"_id":"5931e5d3889407001bdcd3b4","ref":"","in":"body","required":false,"desc":"Required. Should include the contents of the report.","default":"","type":"string","name":"message"}],"url":"/projects/:id/reports"},"isReference":false,"order":8,"body":"","excerpt":"","slug":"submit-project-reports","type":"post","title":"Submit project reports","__v":0,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

postSubmit project reports


Path Params

id:
integer
Project ID.

Body Params

activity_type:
string
Optional. Activity type for the report. (if applicable)
message:
string
Required. Should include the contents of the report.

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



{"_id":"59c96b52bdd6a10010d6c4a5","project":"55105fa24980621900063340","version":"5512229bc1b13537009f5d96","category":"55122abdc1b13537009f5dab","user":"55105f652dd9010d0019e17b","updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-09-25T20:47:14.843Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[]},"settings":"","results":{"codes":[{"code":"{\n  \"action\": \"translated\",\n  \"url\": \"http://www.mysite.com/motaword/callback\",\n  \"data\": { // The data sent to the URL above\n    \"type\": \"project\",\n    \"action\": \"translated\",\n    \"url\": \"http://www.mysite.com/motaword/callback\",\n    \"project\": {\n      \"id\": 1,\n      \"source_language\": \"string\",\n      \"target_languages\": [\n        \"string\"\n      ],\n      \"word_count\": 123,\n      \"price\": {\n        \"amount\": 1.00,\n        \"currency\": \"usd\"\n      },\n      \"status\": \"string\",\n      \"delivery_at\": \"2015-04-04\",\n      \"valid_until\": \"2015-04-04\",\n      \"callback_url\": \"string\",\n      \"custom\": {},\n      \"created_at\": \"2015-04-04\",\n      \"links\": {\n        \"self\": {\n          \"href\": \"https://api.motaword.com/v0/projects/1\"\n        },\n        \"documents\": {\n          \"href\": \"https://api.motaword.com/v0/projects/1/documents\"\n        },\n        \"styleguides\": {\n          \"href\": \"https://api.motaword.com/v0/projects/1/styleguides\"\n        },\n        \"glossaries\": {\n          \"href\": \"https://api.motaword.com/v0/projects/1/glossaries\"\n        }\n      }\n    }\n  },\n  \"result\": \"\" // Webhook response from the URL above\n}","language":"json","status":200,"name":""},{"name":"","code":"{\n    \"error\": {\n        \"code\": \"InvalidApiClient\",\n        \"http_code\": 401,\n        \"message\": \"Your access token is wrong.\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","language":"json","status":401},{"code":"{\n    \"error\": {\n        \"code\": \"ProjectNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","language":"json","status":404}]},"method":"get","auth":"required","params":[{"_id":"552022b3504fd6230022ade9","ref":"","in":"path","required":false,"desc":"Project ID","default":"","type":"int","name":"id"},{"_id":"59c96d341883c7003aa13468","ref":"","in":"path","required":false,"desc":"Callback action to be triggered. One of: translated, proofread, completed. \"completed\" is when a project is ready to be delivered to the client.","default":"","type":"string","name":"actionType"}],"url":"/projects/:id/callback/:actionType"},"isReference":false,"order":9,"body":"This endpoint allows you to manually trigger a Webhook call to the URL specified when creating a project.\n\nFor details, see [Webhooks](doc:webhooks)","excerpt":"","slug":"trigger-a-webhook","type":"get","title":"Trigger a Webhook","__v":6,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

getTrigger a Webhook


Path Params

id:
integer
Project ID
actionType:
string
Callback action to be triggered. One of: translated, proofread, completed. "completed" is when a project is ready to be delivered to the client.
This endpoint allows you to manually trigger a Webhook call to the URL specified when creating a project. For details, see [Webhooks](doc:webhooks)

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



This endpoint allows you to manually trigger a Webhook call to the URL specified when creating a project. For details, see [Webhooks](doc:webhooks)
{"_id":"552052f84bf7e20d00aa352a","body":"Documents are the files to be translated. We support a wide range of document formats, such a simple MS Office formats (Word, Excel, PowerPoint) to programming formats for various platforms.\n\nYour documents will be delivered to you in their original format. If you give us a DOCX file, you will get the same file back, preserving the style formatting as well. If you give us a .resource file, you will get the same translated format back.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Legacy Office Formats and PDFs\",\n  \"body\": \"Although we do our best to deliver your translations in the exact same format you upload to MotaWord, there are a few exceptions to this.\\n\\n**MS Office Legacy:** We support legacy formats such as `.doc`, `.xls` and `.ppt`; however we convert them to their modern equivalents `.docx`, `.xlsx` and `.pptx` and deliver their translations in two different formats, one for legacy format and one for modern format.\\n\\nSo if you start a project with a single `MyTest.doc` file, when you download the translations of this project, you will get two files in the package: `MyTest.doc` and `MyTest.docx`. ***Both will be the translations, just in different formats.***\\n\\n**PDFs and images:** As you will see in [supported formats](http://motaword.readme.io/docs/supported-formats) endpoint, we also support PDF and image files. However, we deliver these files in `.docx` format. If your file is a PDF file, your translation package will have the translation both in DOCX and PDF format for your convenience. Image files are only delivered as a DOCX file.\"\n}\n[/block]","category":"55122ac3df56423b003c3a1e","editedParams2":true,"updates":[],"api":{"method":"get","params":[{"required":true,"type":"int","in":"path","_id":"552052f84bf7e20d00aa352b","default":"","desc":"Project ID.","name":"project_id"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"documents\": [\n        {\n            \"id\": 1,\n            \"name\": \"string\",\n            \"uploaded_at\": 1379470357, //unix time seconds\n            \"word_count\": 1712,\n            \"links\": {\n                \"self\": {\n                    \"href\": \"https://api.motaword.com/v0/projects/1/documents/1\"\n                },\n                \"download\": {\n                    \"href\": \"https://api.motaword.com/v0/projects/1/documents/1/download\"\n                },\n                \"project\": {\n                    \"href\": \"https://api.motaword.com/v0/projects/1\"\n                }\n            }\n        }\n    ],\n    \"meta\": {\n        \"paging\": {\n            \"page\": 1,\n            \"per_page\": 10,\n            \"total_count\": 12,\n            \"links\": {\n                \"next\": null,\n                \"self\": \"https://api.motaword.com/v0/projects/1/documents\",\n                \"previous\": null\n            }\n        }\n    }\n}","name":""},{"status":404,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","name":""}]},"url":"/projects/:project_id/documents","auth":"required","examples":{"codes":[{"language":"text","code":"","name":""}]}},"excerpt":"Get a list of documents to be translated in your project.","link_url":"","slug":"list-documents","sync_unique":"","__v":0,"editedParams":true,"title":"List documents","type":"get","version":"5512229bc1b13537009f5d96","createdAt":"2015-04-04T21:09:12.089Z","githubsync":"","hidden":false,"link_external":false,"order":0,"project":"55105fa24980621900063340","user":"55105f652dd9010d0019e17b","parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

getList documents

Get a list of documents to be translated in your project.

Path Params

project_id:
required
integer
Project ID.
Documents are the files to be translated. We support a wide range of document formats, such a simple MS Office formats (Word, Excel, PowerPoint) to programming formats for various platforms. Your documents will be delivered to you in their original format. If you give us a DOCX file, you will get the same file back, preserving the style formatting as well. If you give us a .resource file, you will get the same translated format back. [block:callout] { "type": "info", "title": "Legacy Office Formats and PDFs", "body": "Although we do our best to deliver your translations in the exact same format you upload to MotaWord, there are a few exceptions to this.\n\n**MS Office Legacy:** We support legacy formats such as `.doc`, `.xls` and `.ppt`; however we convert them to their modern equivalents `.docx`, `.xlsx` and `.pptx` and deliver their translations in two different formats, one for legacy format and one for modern format.\n\nSo if you start a project with a single `MyTest.doc` file, when you download the translations of this project, you will get two files in the package: `MyTest.doc` and `MyTest.docx`. ***Both will be the translations, just in different formats.***\n\n**PDFs and images:** As you will see in [supported formats](http://motaword.readme.io/docs/supported-formats) endpoint, we also support PDF and image files. However, we deliver these files in `.docx` format. If your file is a PDF file, your translation package will have the translation both in DOCX and PDF format for your convenience. Image files are only delivered as a DOCX file." } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Documents are the files to be translated. We support a wide range of document formats, such a simple MS Office formats (Word, Excel, PowerPoint) to programming formats for various platforms. Your documents will be delivered to you in their original format. If you give us a DOCX file, you will get the same file back, preserving the style formatting as well. If you give us a .resource file, you will get the same translated format back. [block:callout] { "type": "info", "title": "Legacy Office Formats and PDFs", "body": "Although we do our best to deliver your translations in the exact same format you upload to MotaWord, there are a few exceptions to this.\n\n**MS Office Legacy:** We support legacy formats such as `.doc`, `.xls` and `.ppt`; however we convert them to their modern equivalents `.docx`, `.xlsx` and `.pptx` and deliver their translations in two different formats, one for legacy format and one for modern format.\n\nSo if you start a project with a single `MyTest.doc` file, when you download the translations of this project, you will get two files in the package: `MyTest.doc` and `MyTest.docx`. ***Both will be the translations, just in different formats.***\n\n**PDFs and images:** As you will see in [supported formats](http://motaword.readme.io/docs/supported-formats) endpoint, we also support PDF and image files. However, we deliver these files in `.docx` format. If your file is a PDF file, your translation package will have the translation both in DOCX and PDF format for your convenience. Image files are only delivered as a DOCX file." } [/block]
{"_id":"5520547543c74c21005b6885","title":"Upload a document","type":"post","createdAt":"2015-04-04T21:15:33.063Z","order":1,"hidden":false,"project":"55105fa24980621900063340","updates":[],"version":"5512229bc1b13537009f5d96","category":"55122ac3df56423b003c3a1e","editedParams2":true,"githubsync":"","isReference":false,"link_external":false,"slug":"upload-a-document","user":"55105f652dd9010d0019e17b","api":{"examples":{"codes":[]},"method":"post","params":[{"_id":"5520547543c74c21005b6887","ref":"","in":"path","required":true,"desc":"Project ID.","default":"","type":"int","name":"project_id"},{"_id":"5520547543c74c21005b6886","ref":"","in":"body","required":true,"desc":"Array of file type parameters. A list of documents to be translated.","default":"","type":"array_mixed","name":"documents"},{"_id":"594beb4b1c0e61000fecbc01","ref":"","in":"body","required":false,"desc":"An array of JSON strings. If your documents have a scheme, as in cases of CSV files, use **the same array index keys** for `schemes` parameter to specify their schemes. See `Document Schemes` title in the API documentation.","default":"NULL","type":"array_string","name":"schemes"}],"results":{"codes":[{"name":"","code":"{\n    \"documents\": [\n        {\n            \"id\": 2,\n            \"name\": \"string\",\n            \"uploaded_at\": 1379470357, //unix time seconds\n            \"word_count\": 1712,\n          \t\"scheme\": {\"hasHeader\":\"0\",\"scheme\":[\"source\",\"translation_no\",\"translation_zh-CN\",\"translation_zh-TW\",\"translation_fr\",\"translation_de\",\"translation_id\",\"translation_ja\",\"translation_ko\",\"translation_pt-BR\",\"translation_es-ES\",\"translation_tr\"]},\n            \"links\": {\n                \"self\": {\n                    \"href\": \"https://api.motaword.com/v0/projects/1/documents/2\"\n                },\n                \"download\": {\n                    \"href\": \"https://api.motaword.com/v0/projects/1/documents/2/download\"\n                },\n                \"project\": {\n                    \"href\": \"https://api.motaword.com/v0/projects/1\"\n                }\n            }\n        }\n    ],\n    \"meta\": {\n        \"paging\": {\n            \"page\": 1,\n            \"per_page\": 1,\n            \"total_count\": 1,\n            \"links\": {\n                \"next\": null,\n                \"self\": \"https://api.motaword.com/v0/projects/1/documents\",\n                \"previous\": null\n            }\n        }\n    }\n}","language":"json","status":200},{"status":400,"name":"","code":"{\n    \"error\": {\n        \"code\": \"FileTooLarge\",\n        \"http_code\": 400,\n        \"message\": \"FileTooLarge\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"FileTooSmall\",\n        \"http_code\": 400,\n        \"message\": \"FileTooSmall\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"FileWasAlreadyUploaded\",\n        \"http_code\": 400,\n        \"message\": \"FileWasAlreadyUploaded\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","language":"json"},{"status":404,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}"},{"status":405,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"UnsupportedDocumentFormat\",\n        \"http_code\": 405,\n        \"message\": \"UnsupportedDocumentFormat\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}"},{"status":409,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectAlreadyStarted\",\n        \"http_code\": 409,\n        \"message\": \"ProjectAlreadyStarted\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}"},{"status":406,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"InvalidDocumentScheme\",\n        \"http_code\": 406,\n        \"message\": \"InvalidDocumentScheme\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}"}]},"settings":"","url":"/projects/:project_id/documents","auth":"required"},"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Supported formats\",\n  \"body\": \"See \\\"[Supported formats](http://motaword.readme.io/docs/supported-formats)\\\" section to get a list of supported formats for documents, style guides and glossaries.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"\",\n  \"body\": \"You can only add/update/delete documents before you launch the project.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Uploading documents as form data\"\n}\n[/block]\nYou can also upload your documents by providing their content directly in the POST request. Instead of providing an array of file handles in `documents` parameter, just enter `name` and `data` parameters for each document file.\n\n**Example:** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"----WebKitFormBoundary7MA4YWxkTrZu0gW\\nContent-Disposition: form-data; name=\\\"documents[0][name]\\\"\\n\\nTest.html\\n----WebKitFormBoundary7MA4YWxkTrZu0gW\\nContent-Disposition: form-data; name=\\\"documents[0][data]\\\"\\n\\n<html><head></head><body><p>This is my HTML document.</p></body></html>\\n----WebKitFormBoundary7MA4YWxkTrZu0gW\\nContent-Disposition: form-data; name=\\\"documents[1][name]\\\"\\n\\nTest.xlsx\\n----WebKitFormBoundary7MA4YWxkTrZu0gW\\nContent-Disposition: form-data; name=\\\"documents[1][data]\\\"\\n\\n[BINARY DATA...]\\n----WebKitFormBoundary7MA4YWxkTrZu0gW\",\n      \"language\": \"curl\"\n    },\n    {\n      \"code\": \"var form = new FormData();\\nform.append(\\\"source_language\\\", \\\"af\\\");\\nform.append(\\\"target_languages[]\\\", \\\"sq\\\");\\nform.append(\\\"documents[0][name]\\\", \\\"Test.html\\\");\\nform.append(\\\"documents[0][data]\\\", \\\"<html><head></head><body><p>This is my HTML document.</p></body></html>\\\");\\nform.append(\\\"documents[1][name]\\\", \\\"Test.xlsx\\\");\\nform.append(\\\"documents[1][data]\\\", \\\"[BINARY DATA...]\\\");\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"\",\n  \"body\": \"You can also upload style guide and glossary files in this scheme.\"\n}\n[/block]","editedParams":true,"sync_unique":"","__v":3,"excerpt":"","link_url":"","parentDoc":null,"next":{"description":"","pages":[]},"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

postUpload a document


Path Params

project_id:
required
integer
Project ID.

Body Params

documents:
required
array of mixed
Array of file type parameters. A list of documents to be translated.
schemes:
array of stringsNULL
An array of JSON strings. If your documents have a scheme, as in cases of CSV files, use **the same array index keys** for `schemes` parameter to specify their schemes. See `Document Schemes` title in the API documentation.
[block:callout] { "type": "info", "title": "Supported formats", "body": "See \"[Supported formats](http://motaword.readme.io/docs/supported-formats)\" section to get a list of supported formats for documents, style guides and glossaries." } [/block] [block:callout] { "type": "danger", "title": "", "body": "You can only add/update/delete documents before you launch the project." } [/block] [block:api-header] { "type": "basic", "title": "Uploading documents as form data" } [/block] You can also upload your documents by providing their content directly in the POST request. Instead of providing an array of file handles in `documents` parameter, just enter `name` and `data` parameters for each document file. **Example:** [block:code] { "codes": [ { "code": "----WebKitFormBoundary7MA4YWxkTrZu0gW\nContent-Disposition: form-data; name=\"documents[0][name]\"\n\nTest.html\n----WebKitFormBoundary7MA4YWxkTrZu0gW\nContent-Disposition: form-data; name=\"documents[0][data]\"\n\n<html><head></head><body><p>This is my HTML document.</p></body></html>\n----WebKitFormBoundary7MA4YWxkTrZu0gW\nContent-Disposition: form-data; name=\"documents[1][name]\"\n\nTest.xlsx\n----WebKitFormBoundary7MA4YWxkTrZu0gW\nContent-Disposition: form-data; name=\"documents[1][data]\"\n\n[BINARY DATA...]\n----WebKitFormBoundary7MA4YWxkTrZu0gW", "language": "curl" }, { "code": "var form = new FormData();\nform.append(\"source_language\", \"af\");\nform.append(\"target_languages[]\", \"sq\");\nform.append(\"documents[0][name]\", \"Test.html\");\nform.append(\"documents[0][data]\", \"<html><head></head><body><p>This is my HTML document.</p></body></html>\");\nform.append(\"documents[1][name]\", \"Test.xlsx\");\nform.append(\"documents[1][data]\", \"[BINARY DATA...]\");", "language": "javascript" } ] } [/block] [block:callout] { "type": "success", "title": "", "body": "You can also upload style guide and glossary files in this scheme." } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



[block:callout] { "type": "info", "title": "Supported formats", "body": "See \"[Supported formats](http://motaword.readme.io/docs/supported-formats)\" section to get a list of supported formats for documents, style guides and glossaries." } [/block] [block:callout] { "type": "danger", "title": "", "body": "You can only add/update/delete documents before you launch the project." } [/block] [block:api-header] { "type": "basic", "title": "Uploading documents as form data" } [/block] You can also upload your documents by providing their content directly in the POST request. Instead of providing an array of file handles in `documents` parameter, just enter `name` and `data` parameters for each document file. **Example:** [block:code] { "codes": [ { "code": "----WebKitFormBoundary7MA4YWxkTrZu0gW\nContent-Disposition: form-data; name=\"documents[0][name]\"\n\nTest.html\n----WebKitFormBoundary7MA4YWxkTrZu0gW\nContent-Disposition: form-data; name=\"documents[0][data]\"\n\n<html><head></head><body><p>This is my HTML document.</p></body></html>\n----WebKitFormBoundary7MA4YWxkTrZu0gW\nContent-Disposition: form-data; name=\"documents[1][name]\"\n\nTest.xlsx\n----WebKitFormBoundary7MA4YWxkTrZu0gW\nContent-Disposition: form-data; name=\"documents[1][data]\"\n\n[BINARY DATA...]\n----WebKitFormBoundary7MA4YWxkTrZu0gW", "language": "curl" }, { "code": "var form = new FormData();\nform.append(\"source_language\", \"af\");\nform.append(\"target_languages[]\", \"sq\");\nform.append(\"documents[0][name]\", \"Test.html\");\nform.append(\"documents[0][data]\", \"<html><head></head><body><p>This is my HTML document.</p></body></html>\");\nform.append(\"documents[1][name]\", \"Test.xlsx\");\nform.append(\"documents[1][data]\", \"[BINARY DATA...]\");", "language": "javascript" } ] } [/block] [block:callout] { "type": "success", "title": "", "body": "You can also upload style guide and glossary files in this scheme." } [/block]
{"_id":"552f0536b09eaf0d008dea62","excerpt":"Get a document detail","githubsync":"","type":"get","user":"55105f652dd9010d0019e17b","body":"Provides document details including word-count and the date and time of upload.","createdAt":"2015-04-16T00:41:26.492Z","editedParams":true,"link_external":false,"title":"Get a document","version":"5512229bc1b13537009f5d96","api":{"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"id\": 2,\n  \"name\": \"string\",\n  \"uploaded_at\": 1379470357, //unix time seconds\n  \"word_count\": 1712,\n  \"links\": {\n    \"self\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1/documents/2\"\n    },\n    \"download\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1/documents/2/download\"\n    },\n    \"project\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1\"\n    }\n  }\n}","name":""},{"status":404,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"DocumentNotFound\",\n        \"http_code\": 404,\n        \"message\": \"DocumentNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","name":""}]},"url":"/projects/:project_id/documents/:id","auth":"required","method":"get","params":[{"_id":"552f05d24329c20d00fa9bc9","required":true,"desc":"Document ID.","default":"","type":"int","name":"id","in":"path"},{"in":"path","_id":"552f05d24329c20d00fa9bc8","required":true,"desc":"Project ID.","default":"","type":"int","name":"project_id"}]},"hidden":false,"link_url":"","order":2,"updates":[],"category":"55122ac3df56423b003c3a1e","editedParams2":true,"project":"55105fa24980621900063340","slug":"get-a-document","sync_unique":"","__v":1,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

getGet a document

Get a document detail

Path Params

id:
required
integer
Document ID.
project_id:
required
integer
Project ID.
Provides document details including word-count and the date and time of upload.

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Provides document details including word-count and the date and time of upload.
{"_id":"552f05e94329c20d00fa9bca","project":"55105fa24980621900063340","type":"put","category":"55122ac3df56423b003c3a1e","editedParams2":true,"hidden":false,"link_external":false,"api":{"auth":"required","examples":{"codes":[]},"method":"put","params":[{"_id":"552f05d24329c20d00fa9bc9","ref":"","in":"path","required":true,"desc":"Document ID.","default":"","type":"int","name":"id"},{"_id":"552f05d24329c20d00fa9bc8","ref":"","in":"path","required":true,"desc":"Project ID.","default":"","type":"int","name":"project_id"},{"_id":"552f08018f136c0d0050311d","ref":"","in":"body","required":true,"desc":"Single file data. The name is plural to provide a consistent naming convention.","default":"","type":"file","name":"documents"},{"_id":"594beb6a4cd6c4000f145810","ref":"","in":"body","required":false,"desc":"JSON string. If your documents have a scheme, as in cases of CSV files, use the same array index keys for `schemes` parameter to specify their schemes. See `Document Schemes` title in the API documentation. The name is plural to provide a consistent naming convention.","default":"NULL","type":"string","name":"schemes"}],"results":{"codes":[{"name":"","code":"{\n  \"id\": 2,\n  \"name\": \"string\",\n  \"uploaded_at\": 1379470357, //unix time seconds\n  \"word_count\": 1712,\n  \"scheme\": {\"hasHeader\":\"0\",\"scheme\":[\"source\",\"translation_no\",\"translation_zh-CN\",\"translation_zh-TW\",\"translation_fr\",\"translation_de\",\"translation_id\",\"translation_ja\",\"translation_ko\",\"translation_pt-BR\",\"translation_es-ES\",\"translation_tr\"]},\n  \"links\": {\n    \"self\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1/documents/2\"\n    },\n    \"download\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1/documents/2/download\"\n    },\n    \"project\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1\"\n    }\n  }\n}","language":"json","status":200},{"name":"","code":"{\n    \"error\": {\n        \"code\": \"ProjectNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"DocumentNotFound\",\n        \"http_code\": 404,\n        \"message\": \"DocumentNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","language":"json","status":404},{"code":"{\n    \"error\": {\n        \"code\": \"FileTooLarge\",\n        \"http_code\": 400,\n        \"message\": \"FileTooLarge\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"FileTooSmall\",\n        \"http_code\": 400,\n        \"message\": \"FileTooSmall\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","language":"json","status":400},{"code":"{\n    \"error\": {\n        \"code\": \"UnsupportedDocumentFormat\",\n        \"http_code\": 405,\n        \"message\": \"UnsupportedDocumentFormat\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","language":"json","status":405},{"code":"{\n    \"error\": {\n        \"code\": \"ProjectAlreadyStarted\",\n        \"http_code\": 409,\n        \"message\": \"ProjectAlreadyStarted\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","language":"json","status":409},{"status":406,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"InvalidDocumentScheme\",\n        \"http_code\": 406,\n        \"message\": \"InvalidDocumentScheme\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}"}]},"settings":"","url":"/projects/:project_id/documents/:id"},"createdAt":"2015-04-16T00:44:25.890Z","editedParams":true,"title":"Update a document","user":"55105f652dd9010d0019e17b","version":"5512229bc1b13537009f5d96","excerpt":"","githubsync":"","sync_unique":"","order":3,"slug":"update-a-document","updates":[],"__v":2,"body":"[block:callout]\n{\n  \"type\": \"danger\",\n  \"body\": \"You can only add/update/delete documents before you launch the project.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Uploading documents as form data\",\n  \"body\": \"Check **Upload a document** section to learn more about how to upload document files directly as a form data.\"\n}\n[/block]","isReference":false,"link_url":"","parentDoc":null,"next":{"description":"","pages":[]},"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

putUpdate a document


Path Params

id:
required
integer
Document ID.
project_id:
required
integer
Project ID.

Body Params

documents:
required
file
Single file data. The name is plural to provide a consistent naming convention.
schemes:
stringNULL
JSON string. If your documents have a scheme, as in cases of CSV files, use the same array index keys for `schemes` parameter to specify their schemes. See `Document Schemes` title in the API documentation. The name is plural to provide a consistent naming convention.
[block:callout] { "type": "danger", "body": "You can only add/update/delete documents before you launch the project." } [/block] [block:callout] { "type": "info", "title": "Uploading documents as form data", "body": "Check **Upload a document** section to learn more about how to upload document files directly as a form data." } [/block]

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



[block:callout] { "type": "danger", "body": "You can only add/update/delete documents before you launch the project." } [/block] [block:callout] { "type": "info", "title": "Uploading documents as form data", "body": "Check **Upload a document** section to learn more about how to upload document files directly as a form data." } [/block]
{"_id":"552f086db09eaf0d008dea6b","githubsync":"","hidden":false,"link_external":false,"project":"55105fa24980621900063340","title":"Delete a document","__v":0,"category":"55122ac3df56423b003c3a1e","createdAt":"2015-04-16T00:55:09.972Z","user":"55105f652dd9010d0019e17b","excerpt":"","updates":[],"version":"5512229bc1b13537009f5d96","link_url":"","type":"delete","api":{"url":"/projects/:project_id/documents/:id","auth":"required","method":"delete","params":[{"_id":"552f05d24329c20d00fa9bc9","required":true,"desc":"Document ID.","default":"","type":"int","name":"id","in":"path"},{"_id":"552f05d24329c20d00fa9bc8","required":true,"desc":"Project ID.","default":"","type":"int","name":"project_id","in":"path"}],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{\n    \"status\": \"success\"\n}"},{"status":404,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"DocumentNotFound\",\n        \"http_code\": 404,\n        \"message\": \"DocumentNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","name":""},{"status":409,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectAlreadyStarted\",\n        \"http_code\": 409,\n        \"message\": \"ProjectAlreadyStarted\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}"}]}},"editedParams":true,"editedParams2":true,"slug":"delete-a-document","sync_unique":"","body":"[block:callout]\n{\n  \"type\": \"danger\",\n  \"body\": \"You can only add/update/delete documents before you launch the project.\"\n}\n[/block]","order":4,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

deleteDelete a document


Path Params

id:
required
integer
Document ID.
project_id:
required
integer
Project ID.
[block:callout] { "type": "danger", "body": "You can only add/update/delete documents before you launch the project." } [/block]

User Information

Try It Out

delete
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



[block:callout] { "type": "danger", "body": "You can only add/update/delete documents before you launch the project." } [/block]
{"_id":"552f08bf8f136c0d0050311e","category":"55122ac3df56423b003c3a1e","editedParams":true,"excerpt":"","link_external":false,"type":"get","__v":0,"user":"55105f652dd9010d0019e17b","sync_unique":"","api":{"results":{"codes":[{"name":"","status":200,"language":"text","code":"// file content."},{"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"DocumentNotFound\",\n        \"http_code\": 404,\n        \"message\": \"DocumentNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","name":"","status":404}]},"url":"/projects/:project_id/documents/:id/download","auth":"required","method":"get","params":[{"name":"id","in":"path","_id":"552f05d24329c20d00fa9bc9","required":true,"desc":"Document ID.","default":"","type":"int"},{"name":"project_id","in":"path","_id":"552f05d24329c20d00fa9bc8","required":true,"desc":"Project ID.","default":"","type":"int"}]},"body":"Allows you to download the exact document that you uploaded.","createdAt":"2015-04-16T00:56:31.403Z","editedParams2":true,"hidden":false,"slug":"download-a-document","updates":[],"link_url":"","order":5,"project":"55105fa24980621900063340","title":"Download a document","version":"5512229bc1b13537009f5d96","githubsync":"","parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

getDownload a document


Path Params

id:
required
integer
Document ID.
project_id:
required
integer
Project ID.
Allows you to download the exact document that you uploaded.

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Allows you to download the exact document that you uploaded.
{"_id":"594bf8404a385c000faf0bd8","project":"55105fa24980621900063340","version":"5512229bc1b13537009f5d96","category":"55122ac3df56423b003c3a1e","user":"55105f652dd9010d0019e17b","updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-06-22T17:02:56.662Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":6,"body":"Some documents that you can upload to MotaWord can be configurable. Currently, we support configuration of Excel and CSV files via API.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"CSV and Excel configuration\"\n}\n[/block]\nCSV and Excel files are formed with columns and rows. If you have columns such as source and translated text, you will need to let MotaWord know about them.\n\nYou can specify the scheme as a JSON string in `schemes` parameters while uploading or updating a document. Below is the format for CSV and Excel schemes.\n\n### `schemes` object\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Key\",\n    \"h-1\": \"Value\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"`hasHeader`\",\n    \"0-1\": \"`1`, `0`\",\n    \"0-2\": \"Optional. If the file includes a header row, specify `1` here. Your header row will not be counted in your quote.\",\n    \"1-0\": \"`delimiter`\",\n    \"1-1\": \"`,`, `\\\\t` (tab), `;`, `|`\",\n    \"1-2\": \"Optional. Valid for CSV files only. The column delimiter used in the file.\",\n    \"2-0\": \"`enclosure`\",\n    \"2-1\": \"`\\\"`, `'`\",\n    \"2-2\": \"Optional. Valid for CSV files only. The enclosure character used to enclose strings as cell content.\",\n    \"3-0\": \"`scheme`\",\n    \"3-1\": \"A list of column type strings\",\n    \"3-2\": \"For column types, see the table below.\"\n  },\n  \"cols\": 3,\n  \"rows\": 4\n}\n[/block]\n### Column types\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Column type\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"`source`\",\n    \"0-1\": \"This column contains the source text. Valid and required when a `translation` or `translation_{languageCode}` column is selected.\",\n    \"1-0\": \"`translation`\",\n    \"1-1\": \"Put the translation of `source` column in this column. This or `translation_{languageCode}` column type is required when `source` type is specified.\",\n    \"2-0\": \"`translation_{languageCode}`\",\n    \"2-1\": \"Put the `{languageCode}` translation of `source` column in this column. This or `translation` column type is required when `source` type is specified.\",\n    \"3-0\": \"`source_translation`\",\n    \"3-1\": \"This column contains the source text and put the translation of this source text back to the same column again. This will basically override the source column with the translations when you download the translations. When `source_translation` column type is specified, column types `source`, `translation` and `translation_{languageCode}` becomes invalid.\",\n    \"4-0\": \"`identifier`\",\n    \"4-1\": \"This column contains identifier values for a given row. The content of this column MUST be unique in each row. There can be no `NULL` values.\",\n    \"5-0\": \"`context`\",\n    \"5-1\": \"This column contains any contextual information about the source string or translation of a given row in the file. The information you provide here **will** be shown to the translators of with the source text of a given row. Not required in every row, but will only be shown for the source text in the row where context is not `NULL`.\",\n    \"6-0\": \"`max_length`\",\n    \"6-1\": \"This column contains integer value that specifies how long the translation must be at most.\"\n  },\n  \"cols\": 2,\n  \"rows\": 7\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Examples\"\n}\n[/block]\n### 1\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"ID,Source,French,German\\n1,Hello,,\\n2,World,,\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\\"hasHeader\\\":\\\"1\\\",\\\"scheme\\\":[\\\"identifier\\\",\\\"source\\\",\\\"translation_fr\\\",\\\"translation_de\\\"]}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n### 2\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"My Content Header Title\\nHello\\nWorld\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\\"hasHeader\\\":\\\"1\\\",\\\"scheme\\\":[\\\"source_translation\\\"]}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n### 3\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Source,Translation\\nHello,\\nWorld,\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\\"hasHeader\\\":\\\"1\\\",\\\"scheme\\\":[\\\"source\\\", \\\"translation\\\"]}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n### 4\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Hello,\\nWorld,\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\\"hasHeader\\\":\\\"0\\\",\\\"scheme\\\":[\\\"source\\\", \\\"translation\\\"]}\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n### 5\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"ID\\tSource\\tFrench\\tGerman\\n1\\t\\\"Hello\\\"\\t\\t\\n2\\t\\\"World\\\"\\t\\t\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\\"hasHeader\\\":\\\"1\\\", \\\"delimiter\\\": \\\"\\\\t\\\", \\\"enclosure\\\": \\\"\\\\\\\"\\\" \\\"scheme\\\":[\\\"identifier\\\",\\\"source\\\",\\\"translation_fr\\\",\\\"translation_de\\\"]}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"How to configure documents","slug":"document-schemes","type":"basic","title":"Document schemes","__v":0,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

Document schemes

How to configure documents

Some documents that you can upload to MotaWord can be configurable. Currently, we support configuration of Excel and CSV files via API. [block:api-header] { "type": "basic", "title": "CSV and Excel configuration" } [/block] CSV and Excel files are formed with columns and rows. If you have columns such as source and translated text, you will need to let MotaWord know about them. You can specify the scheme as a JSON string in `schemes` parameters while uploading or updating a document. Below is the format for CSV and Excel schemes. ### `schemes` object [block:parameters] { "data": { "h-0": "Key", "h-1": "Value", "h-2": "Description", "0-0": "`hasHeader`", "0-1": "`1`, `0`", "0-2": "Optional. If the file includes a header row, specify `1` here. Your header row will not be counted in your quote.", "1-0": "`delimiter`", "1-1": "`,`, `\\t` (tab), `;`, `|`", "1-2": "Optional. Valid for CSV files only. The column delimiter used in the file.", "2-0": "`enclosure`", "2-1": "`\"`, `'`", "2-2": "Optional. Valid for CSV files only. The enclosure character used to enclose strings as cell content.", "3-0": "`scheme`", "3-1": "A list of column type strings", "3-2": "For column types, see the table below." }, "cols": 3, "rows": 4 } [/block] ### Column types [block:parameters] { "data": { "h-0": "Column type", "h-1": "Description", "0-0": "`source`", "0-1": "This column contains the source text. Valid and required when a `translation` or `translation_{languageCode}` column is selected.", "1-0": "`translation`", "1-1": "Put the translation of `source` column in this column. This or `translation_{languageCode}` column type is required when `source` type is specified.", "2-0": "`translation_{languageCode}`", "2-1": "Put the `{languageCode}` translation of `source` column in this column. This or `translation` column type is required when `source` type is specified.", "3-0": "`source_translation`", "3-1": "This column contains the source text and put the translation of this source text back to the same column again. This will basically override the source column with the translations when you download the translations. When `source_translation` column type is specified, column types `source`, `translation` and `translation_{languageCode}` becomes invalid.", "4-0": "`identifier`", "4-1": "This column contains identifier values for a given row. The content of this column MUST be unique in each row. There can be no `NULL` values.", "5-0": "`context`", "5-1": "This column contains any contextual information about the source string or translation of a given row in the file. The information you provide here **will** be shown to the translators of with the source text of a given row. Not required in every row, but will only be shown for the source text in the row where context is not `NULL`.", "6-0": "`max_length`", "6-1": "This column contains integer value that specifies how long the translation must be at most." }, "cols": 2, "rows": 7 } [/block] [block:api-header] { "title": "Examples" } [/block] ### 1 [block:code] { "codes": [ { "code": "ID,Source,French,German\n1,Hello,,\n2,World,,", "language": "text" } ] } [/block] [block:code] { "codes": [ { "code": "{\"hasHeader\":\"1\",\"scheme\":[\"identifier\",\"source\",\"translation_fr\",\"translation_de\"]}", "language": "json" } ] } [/block] ### 2 [block:code] { "codes": [ { "code": "My Content Header Title\nHello\nWorld", "language": "text" } ] } [/block] [block:code] { "codes": [ { "code": "{\"hasHeader\":\"1\",\"scheme\":[\"source_translation\"]}", "language": "json" } ] } [/block] ### 3 [block:code] { "codes": [ { "code": "Source,Translation\nHello,\nWorld,", "language": "text" } ] } [/block] [block:code] { "codes": [ { "code": "{\"hasHeader\":\"1\",\"scheme\":[\"source\", \"translation\"]}", "language": "json" } ] } [/block] ### 4 [block:code] { "codes": [ { "code": "Hello,\nWorld,", "language": "text" } ] } [/block] [block:code] { "codes": [ { "code": "{\"hasHeader\":\"0\",\"scheme\":[\"source\", \"translation\"]}", "language": "text" } ] } [/block] ### 5 [block:code] { "codes": [ { "code": "ID\tSource\tFrench\tGerman\n1\t\"Hello\"\t\t\n2\t\"World\"\t\t", "language": "text" } ] } [/block] [block:code] { "codes": [ { "code": "{\"hasHeader\":\"1\", \"delimiter\": \"\\t\", \"enclosure\": \"\\\"\" \"scheme\":[\"identifier\",\"source\",\"translation_fr\",\"translation_de\"]}", "language": "json" } ] } [/block]
Some documents that you can upload to MotaWord can be configurable. Currently, we support configuration of Excel and CSV files via API. [block:api-header] { "type": "basic", "title": "CSV and Excel configuration" } [/block] CSV and Excel files are formed with columns and rows. If you have columns such as source and translated text, you will need to let MotaWord know about them. You can specify the scheme as a JSON string in `schemes` parameters while uploading or updating a document. Below is the format for CSV and Excel schemes. ### `schemes` object [block:parameters] { "data": { "h-0": "Key", "h-1": "Value", "h-2": "Description", "0-0": "`hasHeader`", "0-1": "`1`, `0`", "0-2": "Optional. If the file includes a header row, specify `1` here. Your header row will not be counted in your quote.", "1-0": "`delimiter`", "1-1": "`,`, `\\t` (tab), `;`, `|`", "1-2": "Optional. Valid for CSV files only. The column delimiter used in the file.", "2-0": "`enclosure`", "2-1": "`\"`, `'`", "2-2": "Optional. Valid for CSV files only. The enclosure character used to enclose strings as cell content.", "3-0": "`scheme`", "3-1": "A list of column type strings", "3-2": "For column types, see the table below." }, "cols": 3, "rows": 4 } [/block] ### Column types [block:parameters] { "data": { "h-0": "Column type", "h-1": "Description", "0-0": "`source`", "0-1": "This column contains the source text. Valid and required when a `translation` or `translation_{languageCode}` column is selected.", "1-0": "`translation`", "1-1": "Put the translation of `source` column in this column. This or `translation_{languageCode}` column type is required when `source` type is specified.", "2-0": "`translation_{languageCode}`", "2-1": "Put the `{languageCode}` translation of `source` column in this column. This or `translation` column type is required when `source` type is specified.", "3-0": "`source_translation`", "3-1": "This column contains the source text and put the translation of this source text back to the same column again. This will basically override the source column with the translations when you download the translations. When `source_translation` column type is specified, column types `source`, `translation` and `translation_{languageCode}` becomes invalid.", "4-0": "`identifier`", "4-1": "This column contains identifier values for a given row. The content of this column MUST be unique in each row. There can be no `NULL` values.", "5-0": "`context`", "5-1": "This column contains any contextual information about the source string or translation of a given row in the file. The information you provide here **will** be shown to the translators of with the source text of a given row. Not required in every row, but will only be shown for the source text in the row where context is not `NULL`.", "6-0": "`max_length`", "6-1": "This column contains integer value that specifies how long the translation must be at most." }, "cols": 2, "rows": 7 } [/block] [block:api-header] { "title": "Examples" } [/block] ### 1 [block:code] { "codes": [ { "code": "ID,Source,French,German\n1,Hello,,\n2,World,,", "language": "text" } ] } [/block] [block:code] { "codes": [ { "code": "{\"hasHeader\":\"1\",\"scheme\":[\"identifier\",\"source\",\"translation_fr\",\"translation_de\"]}", "language": "json" } ] } [/block] ### 2 [block:code] { "codes": [ { "code": "My Content Header Title\nHello\nWorld", "language": "text" } ] } [/block] [block:code] { "codes": [ { "code": "{\"hasHeader\":\"1\",\"scheme\":[\"source_translation\"]}", "language": "json" } ] } [/block] ### 3 [block:code] { "codes": [ { "code": "Source,Translation\nHello,\nWorld,", "language": "text" } ] } [/block] [block:code] { "codes": [ { "code": "{\"hasHeader\":\"1\",\"scheme\":[\"source\", \"translation\"]}", "language": "json" } ] } [/block] ### 4 [block:code] { "codes": [ { "code": "Hello,\nWorld,", "language": "text" } ] } [/block] [block:code] { "codes": [ { "code": "{\"hasHeader\":\"0\",\"scheme\":[\"source\", \"translation\"]}", "language": "text" } ] } [/block] ### 5 [block:code] { "codes": [ { "code": "ID\tSource\tFrench\tGerman\n1\t\"Hello\"\t\t\n2\t\"World\"\t\t", "language": "text" } ] } [/block] [block:code] { "codes": [ { "code": "{\"hasHeader\":\"1\", \"delimiter\": \"\\t\", \"enclosure\": \"\\\"\" \"scheme\":[\"identifier\",\"source\",\"translation_fr\",\"translation_de\"]}", "language": "json" } ] } [/block]
{"_id":"5e82807033d4ff00319eef58","metadata":{"image":[],"title":"","description":""},"api":{"url":"/strings","auth":"required","method":"post","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"strings\": [\n      {\n        \"content\": \"Hello world.\",\n        \"last_changed\": \"2017-07-21T17:32:28Z\",\n        \"language\": \"en-US\",\n        \"translations\": [\n          {\n            \"content\": \"Bonjour le monde.\",\n            \"last_changed\": \"2017-07-21T17:32:28Z\",\n            \"target_language\": \"fr\",\n            \"state\": \"Translated\",\n            \"resource\": \"MT\"\n          }\n        ]\n      }\n  ],\n  \"cost\": {\n    \"amount\": 0.0007,\n    \"currency\": \"usd\",\n  },\n}","name":""}]},"examples":{"codes":[{"language":"json","code":"{\n  \"source_language\": \"en-US\", // optional\n  \"target_languages\": [\"es-MX\", \"fr\"],\n  \"strings\": [\n    \"Hello world.\", \n    \"Welcome to your machine translation service.\"\n  ],\n}","name":""}]},"settings":""},"next":{"description":"","pages":[]},"title":"Translate strings with MT","type":"post","slug":"translate-strings-with-mt","excerpt":"Post a list of strings to be translated via machine translation that MotaWord maintains for you.","body":"","updates":[],"order":0,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2020-03-30T23:27:44.682Z","user":"55105f652dd9010d0019e17b","category":"5e827ed9665485006b99e948","version":"5512229bc1b13537009f5d96","project":"55105fa24980621900063340","__v":0,"parentDoc":null,"childrenPages":[]}

postTranslate strings with MT

Post a list of strings to be translated via machine translation that MotaWord maintains for you.


User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"_id":"5e827d52dfec7a004bc44734","metadata":{"image":[],"title":"","description":""},"api":{"url":"/strings","auth":"required","method":"get","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"strings\": [\n      {\n        \"content\": \"Hello world.\",\n        \"last_changed\": \"2017-07-21T17:32:28Z\",\n        \"language\": \"Bonjour le monde.\",\n        \"translations\": [\n          {\n            \"content\": \"\",\n            \"last_changed\": \"2017-07-21T17:32:28Z\",\n            \"target_language\": \"\",\n            \"state\": \"Translated\",\n            \"state\": \"Approved\",\n            \"resource\": \"project\",\n            \"resource_id\": 109228,\n          }\n        ]\n    ],\n    \"meta\": {\n        \"paging\": {\n            \"page\": 1,\n            \"per_page\": 10,\n            \"total_count\": 12,\n            \"links\": {\n                \"next\": null,\n                \"self\": \"https://api.motaword.com/v0/strings\",\n                \"previous\": null\n            }\n        }\n    }\n}","name":""}]},"examples":{"codes":[{"language":"json","code":"{\n  \"strings\": [\n      {\n        \"content\": \"Hello world.\",\n        \"last_changed\": \"2017-07-21T17:32:28Z\",\n        \"language\": \"en-US\",\n        \"translations\": [\n          {\n            \"content\": \"Bonjour le monde.\",\n            \"last_changed\": \"2017-07-21T17:32:28Z\",\n            \"target_language\": \"fr\",\n            \"state\": \"approved\",\n            \"resource\": \"project\",\n            \"resource_id\": 109228,\n          }\n        ]\n      }\n  ],\n  \"meta\": {\n    \"paging\": {\n      \"page\": 1,\n      \"per_page\": 10,\n      \"total_count\": 12,\n      \"links\": {\n        \"next\": null,\n        \"self\": \"https://api.motaword.com/v0/strings\",\n        \"previous\": null\n      }\n    }\n  }\n}","name":""}]},"settings":""},"next":{"description":"","pages":[]},"title":"List strings","type":"get","slug":"list-strings","excerpt":"Get a list of the strings in your account. This is your translation memory and includes your machine and human translations from MotaWord as well as any uploaded translation memories.","body":"","updates":[],"order":1,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2020-03-30T23:14:26.207Z","user":"55105f652dd9010d0019e17b","category":"5e827ed9665485006b99e948","version":"5512229bc1b13537009f5d96","project":"55105fa24980621900063340","__v":0,"parentDoc":null,"childrenPages":[]}

getList strings

Get a list of the strings in your account. This is your translation memory and includes your machine and human translations from MotaWord as well as any uploaded translation memories.


User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"_id":"552f096e8f136c0d00503122","createdAt":"2015-04-16T00:59:26.468Z","excerpt":"Get a list of style guides to accompany your translation project.","hidden":false,"sync_unique":"","__v":0,"body":"","project":"55105fa24980621900063340","title":"List style guides","type":"get","updates":[],"editedParams":true,"link_external":false,"editedParams2":true,"githubsync":"","order":0,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"styleguides\": [\n        {\n            \"id\": 1,\n            \"name\": \"string\",\n            \"uploaded_at\": 1379470357, //unix time seconds\n            \"links\": {\n                \"self\": {\n                    \"href\": \"https://api.motaword.com/v0/projects/1/styleguides/1\"\n                },\n                \"download\": {\n                    \"href\": \"https://api.motaword.com/v0/projects/1/styleguides/1/download\"\n                },\n                \"project\": {\n                    \"href\": \"https://api.motaword.com/v0/projects/1\"\n                }\n            }\n        }\n    ],\n    \"meta\": {\n        \"paging\": {\n            \"page\": 1,\n            \"per_page\": 10,\n            \"total_count\": 12,\n            \"links\": {\n                \"next\": null,\n                \"self\": \"https://api.motaword.com/v0/projects/1/styleguides\",\n                \"previous\": null\n            }\n        }\n    }\n}","name":""},{"status":404,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","name":""}]},"settings":"","url":"/projects/:project_id/styleguides","auth":"required","examples":{"codes":[]},"method":"get","params":[{"_id":"552052f84bf7e20d00aa352b","required":true,"desc":"Project ID.","default":"","type":"int","name":"project_id","in":"path"}]},"category":"55122ac93228bc2500819a70","slug":"list-style-guides","user":"55105f652dd9010d0019e17b","version":"5512229bc1b13537009f5d96","link_url":"","parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

getList style guides

Get a list of style guides to accompany your translation project.

Path Params

project_id:
required
integer
Project ID.

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



{"_id":"552f0a1db09eaf0d008dea72","api":{"auth":"required","examples":{"codes":[]},"method":"post","params":[{"desc":"Project ID.","name":"project_id","ref":"","required":true,"type":"int","in":"path","_id":"5520547543c74c21005b6887","default":""},{"name":"styleguides","ref":"","required":true,"type":"array_mixed","in":"body","_id":"5520547543c74c21005b6886","default":"","desc":"Array of file type parameters. A list of style guides to accompany the translation project."}],"results":{"codes":[{"status":200,"name":"","code":"{\n    \"styleguides\": [\n        {\n            \"id\": 2,\n            \"name\": \"string\",\n            \"uploaded_at\": 1379470357, //unix time seconds\n            \"links\": {\n                \"self\": {\n                    \"href\": \"https://api.motaword.com/v0/projects/1/styleguides/2\"\n                },\n                \"download\": {\n                    \"href\": \"https://api.motaword.com/v0/projects/1/styleguides/2/download\"\n                },\n                \"project\": {\n                    \"href\": \"https://api.motaword.com/v0/projects/1\"\n                }\n            }\n        }\n    ],\n    \"meta\": {\n        \"paging\": {\n            \"page\": 1,\n            \"per_page\": 1,\n            \"total_count\": 1,\n            \"links\": {\n                \"next\": null,\n                \"self\": \"https://api.motaword.com/v0/projects/1/styleguides\",\n                \"previous\": null\n            }\n        }\n    }\n}","language":"json"},{"name":"","code":"{\n    \"error\": {\n        \"code\": \"FileTooLarge\",\n        \"http_code\": 400,\n        \"message\": \"FileTooLarge\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"FileTooSmall\",\n        \"http_code\": 400,\n        \"message\": \"FileTooSmall\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","language":"json","status":400},{"status":404,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}"},{"status":405,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"UnsupportedStyleGuideFormat\",\n        \"http_code\": 405,\n        \"message\": \"UnsupportedStyleGuideFormat\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}"},{"status":409,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectAlreadyStarted\",\n        \"http_code\": 409,\n        \"message\": \"ProjectAlreadyStarted\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}"}]},"settings":"","url":"/projects/:project_id/styleguides"},"createdAt":"2015-04-16T01:02:21.077Z","githubsync":"","project":"55105fa24980621900063340","sync_unique":"","title":"Upload a style guide","editedParams":true,"isReference":false,"slug":"upload-a-style-guide","type":"post","version":"5512229bc1b13537009f5d96","__v":0,"body":"Upload a style guide to accompany your translation project. Style guides and glossaries are not processed or shown to anybody until you `[launch](http://motaword.readme.io/docs/start-a-project)` your project.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"See \\\"[Supported formats](http://motaword.readme.io/docs/supported-formats)\\\" section to get a list of supported formats for documents, style guides and glossaries.\",\n  \"title\": \"Supported formats\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"\",\n  \"body\": \"You can only add/update/delete style guides before you launch the project.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Uploading style guides as form data\"\n}\n[/block]\nYou can also upload your style guides by providing their content directly in the POST request. Instead of providing an array of file handles in `styleguides` parameter, just enter `name` and `data` parameters for each style guide file.\n\n**Example:** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"----WebKitFormBoundary7MA4YWxkTrZu0gW\\nContent-Disposition: form-data; name=\\\"styleguides[0][name]\\\"\\n\\nSampleStyleGuide.pdf\\n----WebKitFormBoundary7MA4YWxkTrZu0gW\\nContent-Disposition: form-data; name=\\\"styleguides[0][data]\\\"\\n\\n[BINARY DATA...]\\n----WebKitFormBoundary7MA4YWxkTrZu0gW\",\n      \"language\": \"curl\"\n    },\n    {\n      \"code\": \"var form = new FormData();\\n// ....\\nform.append(\\\"styleguides[0][name]\\\", \\\"SampleStyleGuide.pdf\\\");\\nform.append(\\\"styleguides[0][data]\\\", \\\"[BINARY DATA...]\\\");\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"success\",\n  \"body\": \"You can also upload document and glossary files in this scheme.\"\n}\n[/block]","hidden":false,"link_url":"","order":1,"updates":[],"user":"55105f652dd9010d0019e17b","category":"55122ac93228bc2500819a70","editedParams2":true,"excerpt":"","link_external":false,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

postUpload a style guide


Path Params

project_id:
required
integer
Project ID.

Body Params

styleguides:
required
array of mixed
Array of file type parameters. A list of style guides to accompany the translation project.
Upload a style guide to accompany your translation project. Style guides and glossaries are not processed or shown to anybody until you `[launch](http://motaword.readme.io/docs/start-a-project)` your project. [block:callout] { "type": "info", "body": "See \"[Supported formats](http://motaword.readme.io/docs/supported-formats)\" section to get a list of supported formats for documents, style guides and glossaries.", "title": "Supported formats" } [/block] [block:callout] { "type": "danger", "title": "", "body": "You can only add/update/delete style guides before you launch the project." } [/block] [block:api-header] { "type": "basic", "title": "Uploading style guides as form data" } [/block] You can also upload your style guides by providing their content directly in the POST request. Instead of providing an array of file handles in `styleguides` parameter, just enter `name` and `data` parameters for each style guide file. **Example:** [block:code] { "codes": [ { "code": "----WebKitFormBoundary7MA4YWxkTrZu0gW\nContent-Disposition: form-data; name=\"styleguides[0][name]\"\n\nSampleStyleGuide.pdf\n----WebKitFormBoundary7MA4YWxkTrZu0gW\nContent-Disposition: form-data; name=\"styleguides[0][data]\"\n\n[BINARY DATA...]\n----WebKitFormBoundary7MA4YWxkTrZu0gW", "language": "curl" }, { "code": "var form = new FormData();\n// ....\nform.append(\"styleguides[0][name]\", \"SampleStyleGuide.pdf\");\nform.append(\"styleguides[0][data]\", \"[BINARY DATA...]\");", "language": "javascript" } ] } [/block] [block:callout] { "type": "success", "body": "You can also upload document and glossary files in this scheme." } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Upload a style guide to accompany your translation project. Style guides and glossaries are not processed or shown to anybody until you `[launch](http://motaword.readme.io/docs/start-a-project)` your project. [block:callout] { "type": "info", "body": "See \"[Supported formats](http://motaword.readme.io/docs/supported-formats)\" section to get a list of supported formats for documents, style guides and glossaries.", "title": "Supported formats" } [/block] [block:callout] { "type": "danger", "title": "", "body": "You can only add/update/delete style guides before you launch the project." } [/block] [block:api-header] { "type": "basic", "title": "Uploading style guides as form data" } [/block] You can also upload your style guides by providing their content directly in the POST request. Instead of providing an array of file handles in `styleguides` parameter, just enter `name` and `data` parameters for each style guide file. **Example:** [block:code] { "codes": [ { "code": "----WebKitFormBoundary7MA4YWxkTrZu0gW\nContent-Disposition: form-data; name=\"styleguides[0][name]\"\n\nSampleStyleGuide.pdf\n----WebKitFormBoundary7MA4YWxkTrZu0gW\nContent-Disposition: form-data; name=\"styleguides[0][data]\"\n\n[BINARY DATA...]\n----WebKitFormBoundary7MA4YWxkTrZu0gW", "language": "curl" }, { "code": "var form = new FormData();\n// ....\nform.append(\"styleguides[0][name]\", \"SampleStyleGuide.pdf\");\nform.append(\"styleguides[0][data]\", \"[BINARY DATA...]\");", "language": "javascript" } ] } [/block] [block:callout] { "type": "success", "body": "You can also upload document and glossary files in this scheme." } [/block]
{"_id":"552f0a7d633a5b0d00e99cd5","githubsync":"","link_external":false,"sync_unique":"","type":"get","__v":0,"createdAt":"2015-04-16T01:03:57.828Z","editedParams":true,"excerpt":"Get a style guide detail.","updates":[],"version":"5512229bc1b13537009f5d96","body":"Provides style guide details including name of the file and the date and time of upload.","category":"55122ac93228bc2500819a70","editedParams2":true,"user":"55105f652dd9010d0019e17b","api":{"auth":"required","examples":{"codes":[{"language":"text","code":""}]},"method":"get","params":[{"type":"int","name":"id","in":"path","_id":"552f05d24329c20d00fa9bc9","required":true,"desc":"Style guide ID.","default":""},{"_id":"552f05d24329c20d00fa9bc8","required":true,"desc":"Project ID.","default":"","type":"int","name":"project_id","in":"path"}],"results":{"codes":[{"language":"json","code":"{\n  \"id\": 2,\n  \"name\": \"string\",\n  \"uploaded_at\": 1379470357, //unix time seconds\n  \"links\": {\n    \"self\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1/styleguides/2\"\n    },\n    \"download\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1/styleguides/2/download\"\n    },\n    \"project\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1\"\n    }\n  }\n}","name":"","status":200},{"status":404,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"StyleGuideNotFound\",\n        \"http_code\": 404,\n        \"message\": \"StyleGuideNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","name":""}]},"url":"/projects/:project_id/styleguides/:id"},"order":2,"project":"55105fa24980621900063340","slug":"get-a-style-guide","hidden":false,"link_url":"","title":"Get a style guide","parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

getGet a style guide

Get a style guide detail.

Path Params

id:
required
integer
Style guide ID.
project_id:
required
integer
Project ID.
Provides style guide details including name of the file and the date and time of upload.

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Provides style guide details including name of the file and the date and time of upload.
{"_id":"552f0b2ab09eaf0d008dea73","body":"You can update a style guide file's content that you have previously uploaded. This request will also update the name of the style guide as you provide.\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"body\": \"You can only add/update/delete style guides before you launch the project.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"Check **Upload a style guide** section to learn more about how to upload style guide files directly as a form data.\",\n  \"title\": \"Uploading style guides as form data\"\n}\n[/block]","createdAt":"2015-04-16T01:06:50.043Z","editedParams":true,"isReference":false,"type":"put","version":"5512229bc1b13537009f5d96","api":{"settings":"","url":"/projects/:project_id/styleguides/:id","auth":"required","examples":{"codes":[]},"method":"put","params":[{"name":"id","ref":"","required":true,"type":"int","in":"path","_id":"552f05d24329c20d00fa9bc9","default":"","desc":"Style guide ID."},{"default":"","desc":"Project ID.","name":"project_id","ref":"","required":true,"type":"int","in":"path","_id":"552f05d24329c20d00fa9bc8"},{"desc":"Single file data. The name is plural to provide a consistent naming convention.","name":"styleguides","ref":"","required":true,"type":"file","in":"body","_id":"552f08018f136c0d0050311d","default":""}],"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"id\": 2,\n  \"name\": \"string\",\n  \"uploaded_at\": 1379470357, //unix time seconds\n  \"links\": {\n    \"self\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1/styleguides/2\"\n    },\n    \"download\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1/styleguides/2/download\"\n    },\n    \"project\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1\"\n    }\n  }\n}","name":""},{"name":"","status":404,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"StyleGuideNotFound\",\n        \"http_code\": 404,\n        \"message\": \"StyleGuideNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}"},{"status":400,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"FileTooLarge\",\n        \"http_code\": 400,\n        \"message\": \"FileTooLarge\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"FileTooSmall\",\n        \"http_code\": 400,\n        \"message\": \"FileTooSmall\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}"},{"status":405,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"UnsupportedStyleGuideFormat\",\n        \"http_code\": 405,\n        \"message\": \"UnsupportedStyleGuideFormat\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}"},{"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectAlreadyStarted\",\n        \"http_code\": 409,\n        \"message\": \"ProjectAlreadyStarted\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","status":409}]}},"editedParams2":true,"excerpt":"Update the file content of a style guide.","githubsync":"","hidden":false,"category":"55122ac93228bc2500819a70","link_url":"","project":"55105fa24980621900063340","title":"Update a style guide","updates":[],"sync_unique":"","user":"55105f652dd9010d0019e17b","__v":0,"link_external":false,"order":3,"slug":"update-a-style-guide","parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

putUpdate a style guide

Update the file content of a style guide.

Path Params

id:
required
integer
Style guide ID.
project_id:
required
integer
Project ID.

Body Params

styleguides:
required
file
Single file data. The name is plural to provide a consistent naming convention.
You can update a style guide file's content that you have previously uploaded. This request will also update the name of the style guide as you provide. [block:callout] { "type": "danger", "body": "You can only add/update/delete style guides before you launch the project." } [/block] [block:callout] { "type": "info", "body": "Check **Upload a style guide** section to learn more about how to upload style guide files directly as a form data.", "title": "Uploading style guides as form data" } [/block]

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



You can update a style guide file's content that you have previously uploaded. This request will also update the name of the style guide as you provide. [block:callout] { "type": "danger", "body": "You can only add/update/delete style guides before you launch the project." } [/block] [block:callout] { "type": "info", "body": "Check **Upload a style guide** section to learn more about how to upload style guide files directly as a form data.", "title": "Uploading style guides as form data" } [/block]
{"_id":"552f0b5e8f136c0d00503124","type":"delete","__v":0,"editedParams":true,"githubsync":"","order":4,"slug":"delete-a-style-guide","user":"55105f652dd9010d0019e17b","api":{"results":{"codes":[{"code":"{\n    \"status\": \"success\"\n}","name":"","status":200,"language":"json"},{"name":"","status":404,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"StyleGuideNotFound\",\n        \"http_code\": 404,\n        \"message\": \"StyleGuideNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}"},{"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectAlreadyStarted\",\n        \"http_code\": 409,\n        \"message\": \"ProjectAlreadyStarted\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","status":409}]},"url":"/projects/:project_id/styleguides/:id","auth":"required","method":"delete","params":[{"name":"id","in":"path","_id":"552f05d24329c20d00fa9bc9","required":true,"desc":"Style guide ID.","default":"","type":"int"},{"desc":"Project ID.","default":"","type":"int","name":"project_id","in":"path","_id":"552f05d24329c20d00fa9bc8","required":true}]},"editedParams2":true,"link_external":false,"link_url":"","project":"55105fa24980621900063340","version":"5512229bc1b13537009f5d96","body":"[block:callout]\n{\n  \"type\": \"danger\",\n  \"body\": \"You can only add/update/delete style guides before you launch the project.\"\n}\n[/block]","category":"55122ac93228bc2500819a70","createdAt":"2015-04-16T01:07:42.997Z","excerpt":"Delete a style guide from your project.","hidden":false,"sync_unique":"","title":"Delete a style guide","updates":[],"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

deleteDelete a style guide

Delete a style guide from your project.

Path Params

id:
required
integer
Style guide ID.
project_id:
required
integer
Project ID.
[block:callout] { "type": "danger", "body": "You can only add/update/delete style guides before you launch the project." } [/block]

User Information

Try It Out

delete
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



[block:callout] { "type": "danger", "body": "You can only add/update/delete style guides before you launch the project." } [/block]
{"_id":"552f0be6f99ae00d00e0532b","updates":[],"api":{"auth":"required","method":"get","params":[{"_id":"552f05d24329c20d00fa9bc9","required":true,"desc":"Style guide ID.","default":"","type":"int","name":"id","in":"path"},{"_id":"552f05d24329c20d00fa9bc8","required":true,"desc":"Project ID.","default":"","type":"int","name":"project_id","in":"path"}],"results":{"codes":[{"status":200,"language":"text","code":"// file content.","name":""},{"status":404,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"StyleGuideNotFound\",\n        \"http_code\": 404,\n        \"message\": \"StyleGuideNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","name":""}]},"url":"/projects/:project_id/styleguides/:id/download"},"editedParams2":true,"excerpt":"Download a style guide file.","sync_unique":"","title":"Download a style guide","version":"5512229bc1b13537009f5d96","body":"Download a style guide file that you have previously uploaded.","editedParams":true,"hidden":false,"link_external":false,"__v":0,"link_url":"","order":5,"project":"55105fa24980621900063340","user":"55105f652dd9010d0019e17b","category":"55122ac93228bc2500819a70","createdAt":"2015-04-16T01:09:58.413Z","githubsync":"","slug":"download-a-style-guide","type":"get","parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

getDownload a style guide

Download a style guide file.

Path Params

id:
required
integer
Style guide ID.
project_id:
required
integer
Project ID.
Download a style guide file that you have previously uploaded.

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Download a style guide file that you have previously uploaded.
{"_id":"552f0c6d633a5b0d00e99cd7","link_url":"","project":"55105fa24980621900063340","sync_unique":"","updates":[],"api":{"method":"get","params":[{"desc":"Project ID.","default":"","type":"int","name":"project_id","in":"path","_id":"552052f84bf7e20d00aa352b","required":true}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"glossaries\": [\n        {\n            \"id\": 1,\n            \"name\": \"string\",\n            \"uploaded_at\": 1379470357, //unix time seconds\n            \"links\": {\n                \"self\": {\n                    \"href\": \"https://api.motaword.com/v0/projects/1/glossaries/1\"\n                },\n                \"download\": {\n                    \"href\": \"https://api.motaword.com/v0/projects/1/glossaries/1/download\"\n                },\n                \"project\": {\n                    \"href\": \"https://api.motaword.com/v0/projects/1\"\n                }\n            }\n        }\n    ],\n    \"meta\": {\n        \"paging\": {\n            \"page\": 1,\n            \"per_page\": 10,\n            \"total_count\": 12,\n            \"links\": {\n                \"next\": null,\n                \"self\": \"https://api.motaword.com/v0/projects/1/glossaries\",\n                \"previous\": null\n            }\n        }\n    }\n}","name":""},{"status":404,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","name":""}]},"url":"/projects/:project_id/glossaries","auth":"required"},"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"What is a glossary and why would I need it?\"\n}\n[/block]\nA glossary is a project based dictionary providing the translation of certain key terms to translators in order to ensure and maintain consistency within the project (or across different projects). It is simply an Excel file of 3 columns \"Source, Translation, Notes\" - see example below:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Source\",\n    \"h-1\": \"Translation\",\n    \"h-2\": \"Notes\",\n    \"0-0\": \"MotaWord\",\n    \"0-1\": \"MotaWord\",\n    \"0-2\": \"Company name do not translate\",\n    \"1-0\": \"Word\",\n    \"1-1\": \"Mot\",\n    \"1-2\": \"French translation of the word \\\"word\\\"\",\n    \"2-0\": \"Hello\",\n    \"2-1\": \"Bonjour\",\n    \"2-2\": \"\"\n  },\n  \"cols\": 3,\n  \"rows\": 3\n}\n[/block]","editedParams":true,"githubsync":"","user":"55105f652dd9010d0019e17b","category":"55122acec1b13537009f5dac","title":"List glossaries","type":"get","hidden":false,"createdAt":"2015-04-16T01:12:13.539Z","editedParams2":true,"excerpt":"Get a list of glossaries in your project.","version":"5512229bc1b13537009f5d96","__v":0,"link_external":false,"order":0,"slug":"list-glossaries","parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

getList glossaries

Get a list of glossaries in your project.

Path Params

project_id:
required
integer
Project ID.
[block:api-header] { "type": "basic", "title": "What is a glossary and why would I need it?" } [/block] A glossary is a project based dictionary providing the translation of certain key terms to translators in order to ensure and maintain consistency within the project (or across different projects). It is simply an Excel file of 3 columns "Source, Translation, Notes" - see example below: [block:parameters] { "data": { "h-0": "Source", "h-1": "Translation", "h-2": "Notes", "0-0": "MotaWord", "0-1": "MotaWord", "0-2": "Company name do not translate", "1-0": "Word", "1-1": "Mot", "1-2": "French translation of the word \"word\"", "2-0": "Hello", "2-1": "Bonjour", "2-2": "" }, "cols": 3, "rows": 3 } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



[block:api-header] { "type": "basic", "title": "What is a glossary and why would I need it?" } [/block] A glossary is a project based dictionary providing the translation of certain key terms to translators in order to ensure and maintain consistency within the project (or across different projects). It is simply an Excel file of 3 columns "Source, Translation, Notes" - see example below: [block:parameters] { "data": { "h-0": "Source", "h-1": "Translation", "h-2": "Notes", "0-0": "MotaWord", "0-1": "MotaWord", "0-2": "Company name do not translate", "1-0": "Word", "1-1": "Mot", "1-2": "French translation of the word \"word\"", "2-0": "Hello", "2-1": "Bonjour", "2-2": "" }, "cols": 3, "rows": 3 } [/block]
{"_id":"552f0cbe4329c20d00fa9bd1","slug":"upload-a-glossary","title":"Upload a glossary","type":"post","createdAt":"2015-04-16T01:13:34.725Z","editedParams2":true,"excerpt":"","githubsync":"","link_url":"","updates":[],"api":{"examples":{"codes":[]},"method":"post","params":[{"required":true,"type":"int","in":"path","_id":"5520547543c74c21005b6887","default":"","desc":"Project ID.","name":"project_id","ref":""},{"desc":"You can only add one glossary, even though the name suggests multiple glossaries. This may be updated in the future to support multiple glossaries.","name":"glossaries","ref":"","required":true,"type":"file","in":"body","_id":"5520547543c74c21005b6886","default":""}],"results":{"codes":[{"name":"","code":"{\n    \"glossaries\": [\n        {\n            \"id\": 2,\n            \"name\": \"string\",\n            \"uploaded_at\": 1379470357, //unix time seconds\n            \"links\": {\n                \"self\": {\n                    \"href\": \"https://api.motaword.com/v0/projects/1/glossaries/2\"\n                },\n                \"download\": {\n                    \"href\": \"https://api.motaword.com/v0/projects/1/glossaries/2/download\"\n                },\n                \"project\": {\n                    \"href\": \"https://api.motaword.com/v0/projects/1\"\n                }\n            }\n        }\n    ],\n    \"meta\": {\n        \"paging\": {\n            \"page\": 1,\n            \"per_page\": 1,\n            \"total_count\": 1,\n            \"links\": {\n                \"next\": null,\n                \"self\": \"https://api.motaword.com/v0/projects/1/glossaries\",\n                \"previous\": null\n            }\n        }\n    }\n}","language":"json","status":200},{"code":"{\n    \"error\": {\n        \"code\": \"FileTooLarge\",\n        \"http_code\": 400,\n        \"message\": \"FileTooLarge\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"FileTooSmall\",\n        \"http_code\": 400,\n        \"message\": \"FileTooSmall\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","language":"json","status":400,"name":""},{"status":404,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}"},{"code":"{\n    \"error\": {\n        \"code\": \"UnsupportedGlossaryFormat\",\n        \"http_code\": 405,\n        \"message\": \"UnsupportedGlossaryFormat\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","status":405,"language":"json"},{"status":409,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectAlreadyStarted\",\n        \"http_code\": 409,\n        \"message\": \"ProjectAlreadyStarted\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}"}]},"settings":"","url":"/projects/:project_id/glossaries","auth":"required"},"body":"Upload a glossary to accompany your translation project. Glossaries and style guides are not processed or shown to anybody until you [launch](http://motaword.readme.io/docs/start-a-project) your project.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Supported formats\",\n  \"body\": \"See \\\"[Supported formats](http://motaword.readme.io/docs/supported-formats)\\\" section to get a list of supported formats for documents, style  guides and glossaries.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"\",\n  \"body\": \"You can only add/update/delete glossaries before you launch the project.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Uploading glossary as form data\"\n}\n[/block]\nYou can also upload your glossaries by providing their content directly in the POST request. Instead of providing an array of file handles in `glossaries` parameter, just enter `name` and `data` parameters for each glossary file.\n\n**Example:** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"----WebKitFormBoundary7MA4YWxkTrZu0gW\\nContent-Disposition: form-data; name=\\\"glossaries[0][name]\\\"\\n\\nMyGlossary.xlsx\\n----WebKitFormBoundary7MA4YWxkTrZu0gW\\nContent-Disposition: form-data; name=\\\"glossaries[0][data]\\\"\\n\\n[BINARY DATA...]\\n----WebKitFormBoundary7MA4YWxkTrZu0gW\",\n      \"language\": \"curl\"\n    },\n    {\n      \"code\": \"var form = new FormData();\\n// ....\\nform.append(\\\"glossaries[0][name]\\\", \\\"MyGlossary.xlsx\\\");\\nform.append(\\\"glossaries[0][data]\\\", \\\"[BINARY DATA...]\\\");\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"success\",\n  \"body\": \"You can also upload document and style guide files in this scheme.\"\n}\n[/block]","link_external":false,"user":"55105f652dd9010d0019e17b","version":"5512229bc1b13537009f5d96","category":"55122acec1b13537009f5dac","editedParams":true,"isReference":false,"order":1,"project":"55105fa24980621900063340","__v":0,"hidden":false,"sync_unique":"","parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

postUpload a glossary


Path Params

project_id:
required
integer
Project ID.

Body Params

glossaries:
required
file
You can only add one glossary, even though the name suggests multiple glossaries. This may be updated in the future to support multiple glossaries.
Upload a glossary to accompany your translation project. Glossaries and style guides are not processed or shown to anybody until you [launch](http://motaword.readme.io/docs/start-a-project) your project. [block:callout] { "type": "info", "title": "Supported formats", "body": "See \"[Supported formats](http://motaword.readme.io/docs/supported-formats)\" section to get a list of supported formats for documents, style guides and glossaries." } [/block] [block:callout] { "type": "danger", "title": "", "body": "You can only add/update/delete glossaries before you launch the project." } [/block] [block:api-header] { "type": "basic", "title": "Uploading glossary as form data" } [/block] You can also upload your glossaries by providing their content directly in the POST request. Instead of providing an array of file handles in `glossaries` parameter, just enter `name` and `data` parameters for each glossary file. **Example:** [block:code] { "codes": [ { "code": "----WebKitFormBoundary7MA4YWxkTrZu0gW\nContent-Disposition: form-data; name=\"glossaries[0][name]\"\n\nMyGlossary.xlsx\n----WebKitFormBoundary7MA4YWxkTrZu0gW\nContent-Disposition: form-data; name=\"glossaries[0][data]\"\n\n[BINARY DATA...]\n----WebKitFormBoundary7MA4YWxkTrZu0gW", "language": "curl" }, { "code": "var form = new FormData();\n// ....\nform.append(\"glossaries[0][name]\", \"MyGlossary.xlsx\");\nform.append(\"glossaries[0][data]\", \"[BINARY DATA...]\");", "language": "javascript" } ] } [/block] [block:callout] { "type": "success", "body": "You can also upload document and style guide files in this scheme." } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Upload a glossary to accompany your translation project. Glossaries and style guides are not processed or shown to anybody until you [launch](http://motaword.readme.io/docs/start-a-project) your project. [block:callout] { "type": "info", "title": "Supported formats", "body": "See \"[Supported formats](http://motaword.readme.io/docs/supported-formats)\" section to get a list of supported formats for documents, style guides and glossaries." } [/block] [block:callout] { "type": "danger", "title": "", "body": "You can only add/update/delete glossaries before you launch the project." } [/block] [block:api-header] { "type": "basic", "title": "Uploading glossary as form data" } [/block] You can also upload your glossaries by providing their content directly in the POST request. Instead of providing an array of file handles in `glossaries` parameter, just enter `name` and `data` parameters for each glossary file. **Example:** [block:code] { "codes": [ { "code": "----WebKitFormBoundary7MA4YWxkTrZu0gW\nContent-Disposition: form-data; name=\"glossaries[0][name]\"\n\nMyGlossary.xlsx\n----WebKitFormBoundary7MA4YWxkTrZu0gW\nContent-Disposition: form-data; name=\"glossaries[0][data]\"\n\n[BINARY DATA...]\n----WebKitFormBoundary7MA4YWxkTrZu0gW", "language": "curl" }, { "code": "var form = new FormData();\n// ....\nform.append(\"glossaries[0][name]\", \"MyGlossary.xlsx\");\nform.append(\"glossaries[0][data]\", \"[BINARY DATA...]\");", "language": "javascript" } ] } [/block] [block:callout] { "type": "success", "body": "You can also upload document and style guide files in this scheme." } [/block]
{"_id":"552f0cdeb09eaf0d008dea78","editedParams":true,"editedParams2":true,"link_external":false,"link_url":"","slug":"get-a-glossary","updates":[],"__v":0,"project":"55105fa24980621900063340","type":"get","user":"55105f652dd9010d0019e17b","order":2,"api":{"auth":"required","examples":{"codes":[{"language":"text","code":""}]},"method":"get","params":[{"required":true,"desc":"Glossary ID.","default":"","type":"int","name":"id","in":"path","_id":"552f05d24329c20d00fa9bc9"},{"name":"project_id","in":"path","_id":"552f05d24329c20d00fa9bc8","required":true,"desc":"Project ID.","default":"","type":"int"}],"results":{"codes":[{"code":"{\n  \"id\": 1,\n  \"name\": \"string\",\n  \"uploaded_at\": 1379470357, //unix time seconds\n  \"links\": {\n    \"self\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1/glossaries/1\"\n    },\n    \"download\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1/glossaries/1/download\"\n    },\n    \"project\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1\"\n    }\n  }\n}","name":"","status":200,"language":"json"},{"status":404,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"StyleGuideNotFound\",\n        \"http_code\": 404,\n        \"message\": \"StyleGuideNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","name":""}]},"url":"/projects/:project_id/glossaries/:id"},"body":"Provides glossary details including name and the date and time of upload.","githubsync":"","sync_unique":"","version":"5512229bc1b13537009f5d96","createdAt":"2015-04-16T01:14:06.244Z","excerpt":"Get a glossary detail.","hidden":false,"title":"Get a glossary","category":"55122acec1b13537009f5dac","parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

getGet a glossary

Get a glossary detail.

Path Params

id:
required
integer
Glossary ID.
project_id:
required
integer
Project ID.
Provides glossary details including name and the date and time of upload.

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Provides glossary details including name and the date and time of upload.
{"_id":"552f0d3c4329c20d00fa9bd2","editedParams2":true,"githubsync":"","hidden":false,"body":"You can update a glossary file's content that you have previously uploaded. This request will also update the name of the glossary as you provide.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"See \\\"[Supported formats](http://motaword.readme.io/docs/supported-formats)\\\" section to get a list of supported formats for documents, style guides and glossaries.\",\n  \"title\": \"Supported formats\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"body\": \"You can only add/update/delete glossaries before you launch the project.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"Check **Upload a glossary** section to learn more about how to upload glossary files directly as a form data.\",\n  \"title\": \"Uploading glossaries as form data\"\n}\n[/block]","createdAt":"2015-04-16T01:15:40.350Z","excerpt":"","link_external":false,"type":"put","user":"55105f652dd9010d0019e17b","version":"5512229bc1b13537009f5d96","__v":0,"link_url":"","project":"55105fa24980621900063340","title":"Update a glossary","api":{"auth":"required","examples":{"codes":[]},"method":"put","params":[{"in":"path","_id":"552f05d24329c20d00fa9bc9","default":"","desc":"Glossary ID.","name":"id","ref":"","required":true,"type":"int"},{"type":"int","in":"path","_id":"552f05d24329c20d00fa9bc8","default":"","desc":"Project ID.","name":"project_id","ref":"","required":true},{"ref":"","required":true,"type":"file","in":"body","_id":"552f08018f136c0d0050311d","default":"","desc":"Single file data. The name is plural to provide a consistent naming convention.","name":"glossaries"}],"results":{"codes":[{"language":"json","code":"{\n  \"id\": 1,\n  \"name\": \"string\",\n  \"uploaded_at\": 1379470357, //unix time seconds\n  \"links\": {\n    \"self\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1/styleguides/1\"\n    },\n    \"download\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1/styleguides/1/download\"\n    },\n    \"project\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1\"\n    }\n  }\n}","name":"","status":200},{"code":"{\n    \"error\": {\n        \"code\": \"ProjectNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"GlossaryNotFound\",\n        \"http_code\": 404,\n        \"message\": \"GlossaryNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","name":"","status":404,"language":"json"},{"status":400,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"FileTooLarge\",\n        \"http_code\": 400,\n        \"message\": \"FileTooLarge\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"FileTooSmall\",\n        \"http_code\": 400,\n        \"message\": \"FileTooSmall\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}"},{"status":405,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"UnsupportedGlossaryFormat\",\n        \"http_code\": 405,\n        \"message\": \"UnsupportedGlossaryFormat\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}"},{"status":409,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectAlreadyStarted\",\n        \"http_code\": 409,\n        \"message\": \"ProjectAlreadyStarted\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}"}]},"settings":"","url":"/projects/:project_id/glossaries/:id"},"isReference":false,"order":3,"slug":"update-a-glossary","sync_unique":"","updates":[],"category":"55122acec1b13537009f5dac","editedParams":true,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

putUpdate a glossary


Path Params

id:
required
integer
Glossary ID.
project_id:
required
integer
Project ID.

Body Params

glossaries:
required
file
Single file data. The name is plural to provide a consistent naming convention.
You can update a glossary file's content that you have previously uploaded. This request will also update the name of the glossary as you provide. [block:callout] { "type": "info", "body": "See \"[Supported formats](http://motaword.readme.io/docs/supported-formats)\" section to get a list of supported formats for documents, style guides and glossaries.", "title": "Supported formats" } [/block] [block:callout] { "type": "danger", "body": "You can only add/update/delete glossaries before you launch the project." } [/block] [block:callout] { "type": "info", "body": "Check **Upload a glossary** section to learn more about how to upload glossary files directly as a form data.", "title": "Uploading glossaries as form data" } [/block]

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



You can update a glossary file's content that you have previously uploaded. This request will also update the name of the glossary as you provide. [block:callout] { "type": "info", "body": "See \"[Supported formats](http://motaword.readme.io/docs/supported-formats)\" section to get a list of supported formats for documents, style guides and glossaries.", "title": "Supported formats" } [/block] [block:callout] { "type": "danger", "body": "You can only add/update/delete glossaries before you launch the project." } [/block] [block:callout] { "type": "info", "body": "Check **Upload a glossary** section to learn more about how to upload glossary files directly as a form data.", "title": "Uploading glossaries as form data" } [/block]
{"_id":"552f0dc24329c20d00fa9bd3","createdAt":"2015-04-16T01:17:54.847Z","title":"Delete a glossary","body":"[block:callout]\n{\n  \"type\": \"danger\",\n  \"body\": \"You can only add/update/delete glossaries before you launch the project.\"\n}\n[/block]","editedParams2":true,"githubsync":"","slug":"delete-a-glossary","user":"55105f652dd9010d0019e17b","api":{"auth":"required","method":"delete","params":[{"_id":"552f05d24329c20d00fa9bc9","required":true,"desc":"Glossary ID.","default":"","type":"int","name":"id","in":"path"},{"_id":"552f05d24329c20d00fa9bc8","required":true,"desc":"Project ID.","default":"","type":"int","name":"project_id","in":"path"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"status\": \"success\"\n}","name":""},{"status":404,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"GlossaryNotFound\",\n        \"http_code\": 404,\n        \"message\": \"GlossaryNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","name":""},{"code":"{\n    \"error\": {\n        \"code\": \"ProjectAlreadyStarted\",\n        \"http_code\": 409,\n        \"message\": \"ProjectAlreadyStarted\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","status":409,"language":"json"}]},"url":"/projects/:project_id/glossaries/:id"},"category":"55122acec1b13537009f5dac","link_url":"","order":4,"sync_unique":"","type":"delete","updates":[],"version":"5512229bc1b13537009f5d96","__v":0,"editedParams":true,"excerpt":"Delete a glossary file from your project.","hidden":false,"link_external":false,"project":"55105fa24980621900063340","parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

deleteDelete a glossary

Delete a glossary file from your project.

Path Params

id:
required
integer
Glossary ID.
project_id:
required
integer
Project ID.
[block:callout] { "type": "danger", "body": "You can only add/update/delete glossaries before you launch the project." } [/block]

User Information

Try It Out

delete
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



[block:callout] { "type": "danger", "body": "You can only add/update/delete glossaries before you launch the project." } [/block]
{"_id":"552f0e074329c20d00fa9bd4","version":"5512229bc1b13537009f5d96","api":{"method":"get","params":[{"name":"id","in":"path","_id":"552f05d24329c20d00fa9bc9","required":true,"desc":"Glossary ID.","default":"","type":"int"},{"desc":"Project ID.","default":"","type":"int","name":"project_id","in":"path","_id":"552f05d24329c20d00fa9bc8","required":true}],"results":{"codes":[{"status":200,"language":"text","code":"// file content.","name":""},{"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"GlossaryNotFound\",\n        \"http_code\": 404,\n        \"message\": \"GlossaryNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","name":"","status":404}]},"url":"/projects/:project_id/glossaries/:id/download","auth":"required"},"category":"55122acec1b13537009f5dac","editedParams2":true,"user":"55105f652dd9010d0019e17b","body":"Download a glossary file that you have previously uploaded.","createdAt":"2015-04-16T01:19:03.858Z","link_external":false,"slug":"download-a-glossary","updates":[],"link_url":"","order":5,"__v":0,"editedParams":true,"excerpt":"Download a glossary file.","githubsync":"","hidden":false,"project":"55105fa24980621900063340","sync_unique":"","title":"Download a glossary","type":"get","parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

getDownload a glossary

Download a glossary file.

Path Params

id:
required
integer
Glossary ID.
project_id:
required
integer
Project ID.
Download a glossary file that you have previously uploaded.

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Download a glossary file that you have previously uploaded.
{"_id":"552f12a6b09eaf0d008dea81","version":"5512229bc1b13537009f5d96","link_url":"","order":0,"project":"55105fa24980621900063340","updates":[],"user":"55105f652dd9010d0019e17b","title":"List activities","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"What are activities?\"\n}\n[/block]\nAn activity is any action that our translators and proofreaders take. Currently we have two activity types: `translated`and `proofread`. \n\nWhen a translator translates a string in your project, that action is listed in your project's activity feed. The same goes when a proofreader approves or edits a translation.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"How can I use this?\"\n}\n[/block]\nWith activities, you are completely on top of your project; you can track their progress in real time and even [write comments](http://motaword.readme.io/docs/submit-a-comment) for each specific activity. When you submit a comment, the translator of that activity will be presented with your comment immediately and we'll make sure they acknowledge your comment and are going to make the related changes as necessary.\n\nThe activity list is in descending order by default, so you can keep a near real-time list of the activities by making a request to this endpoint. The first activity will be the latest activity by our vendors.","editedParams":true,"editedParams2":true,"excerpt":"","sync_unique":"","link_external":false,"slug":"list-activities","category":"55122adf0c1a08190077f970","createdAt":"2015-04-16T01:38:46.398Z","githubsync":"","hidden":false,"__v":0,"api":{"method":"get","params":[{"desc":"Project ID.","default":"","type":"int","name":"project_id","in":"path","_id":"552052f84bf7e20d00aa352b","required":true}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"activities\": [\n        {\n            \"id\": 1,\n            \"type\": \"string\",\n          \t\"translator\": 2000001,\n          \t\"source_text\": \"string\",\n          \t\"target_text\": \"string\",\n            \"activity_at\": 1379470357, //unix time seconds\n            \"links\": {\n                \"self\": {\n                    \"href\": \"https://api.motaword.com/v0/projects/1/activities/1\"\n                },\n\t              \"comments\": {\n                    \"href\": \"https://api.motaword.com/v0/projects/1/activities/1/comments\"\n                },\n                \"project\": {\n                    \"href\": \"https://api.motaword.com/v0/projects/1\"\n                }\n            }\n        }\n    ],\n    \"meta\": {\n        \"paging\": {\n            \"page\": 1,\n            \"per_page\": 10,\n            \"total_count\": 12,\n            \"links\": {\n                \"next\": null,\n                \"self\": \"https://api.motaword.com/v0/projects/1/activities\",\n                \"previous\": null\n            }\n        }\n    }\n}","name":""},{"status":404,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","name":""}]},"url":"/projects/:project_id/activities","auth":"required"},"type":"get","parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

getList activities


Path Params

project_id:
required
integer
Project ID.
[block:api-header] { "type": "basic", "title": "What are activities?" } [/block] An activity is any action that our translators and proofreaders take. Currently we have two activity types: `translated`and `proofread`. When a translator translates a string in your project, that action is listed in your project's activity feed. The same goes when a proofreader approves or edits a translation. [block:api-header] { "type": "basic", "title": "How can I use this?" } [/block] With activities, you are completely on top of your project; you can track their progress in real time and even [write comments](http://motaword.readme.io/docs/submit-a-comment) for each specific activity. When you submit a comment, the translator of that activity will be presented with your comment immediately and we'll make sure they acknowledge your comment and are going to make the related changes as necessary. The activity list is in descending order by default, so you can keep a near real-time list of the activities by making a request to this endpoint. The first activity will be the latest activity by our vendors.

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



[block:api-header] { "type": "basic", "title": "What are activities?" } [/block] An activity is any action that our translators and proofreaders take. Currently we have two activity types: `translated`and `proofread`. When a translator translates a string in your project, that action is listed in your project's activity feed. The same goes when a proofreader approves or edits a translation. [block:api-header] { "type": "basic", "title": "How can I use this?" } [/block] With activities, you are completely on top of your project; you can track their progress in real time and even [write comments](http://motaword.readme.io/docs/submit-a-comment) for each specific activity. When you submit a comment, the translator of that activity will be presented with your comment immediately and we'll make sure they acknowledge your comment and are going to make the related changes as necessary. The activity list is in descending order by default, so you can keep a near real-time list of the activities by making a request to this endpoint. The first activity will be the latest activity by our vendors.
{"_id":"552f12f7633a5b0d00e99cdf","updates":[],"version":"5512229bc1b13537009f5d96","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Activity types\"\n}\n[/block]\nWe currently publish only ***translated*** and ***proofread*** activities.","editedParams":true,"link_external":false,"link_url":"","sync_unique":"","project":"55105fa24980621900063340","title":"Get an activity","api":{"auth":"required","examples":{"codes":[{"language":"text","code":""}]},"method":"get","params":[{"_id":"552f05d24329c20d00fa9bc9","required":true,"desc":"Activity ID.","default":"","type":"int","name":"id","in":"path"},{"in":"path","_id":"552f05d24329c20d00fa9bc8","required":true,"desc":"Project ID.","default":"","type":"int","name":"project_id"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"id\": 1,\n  \"type\": \"string\",\n  \"translator\": 2000001,\n  \"source_text\": \"string\",\n  \"target_text\": \"string\",\n  \"activity_at\": 1379470357, //unix time seconds\n  \"links\": {\n    \"self\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1/activities/1\"\n    },\n    \"comments\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1/activities/1/comments\"\n    },\n    \"project\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1\"\n    }\n  }\n}","name":""},{"status":404,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"ProjectActivityNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectActivityNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","name":""}]},"url":"/projects/:project_id/activities/:id"},"category":"55122adf0c1a08190077f970","createdAt":"2015-04-16T01:40:07.915Z","githubsync":"","hidden":false,"__v":0,"editedParams2":true,"excerpt":"Get the details of an activity","slug":"get-an-activity","order":1,"type":"get","user":"55105f652dd9010d0019e17b","parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

getGet an activity

Get the details of an activity

Path Params

id:
required
integer
Activity ID.
project_id:
required
integer
Project ID.
[block:api-header] { "type": "basic", "title": "Activity types" } [/block] We currently publish only ***translated*** and ***proofread*** activities.

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



[block:api-header] { "type": "basic", "title": "Activity types" } [/block] We currently publish only ***translated*** and ***proofread*** activities.
{"_id":"552f133ef99ae00d00e05333","api":{"params":[{"in":"path","_id":"552f05d24329c20d00fa9bc9","required":true,"desc":"Activity ID.","default":"","type":"int","name":"id"},{"default":"","type":"int","name":"project_id","in":"path","_id":"552f05d24329c20d00fa9bc8","required":true,"desc":"Project ID."},{"default":"","desc":"Comment text.","name":"comment","required":true,"type":"string","in":"body","_id":"552f133ef99ae00d00e05334"}],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{\n  \"id\": 1,\n  \"comment\": \"string\",\n  \"commented_at\": 1379470357, //unix time seconds\n  \"links\": {\n    \"activity\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1/activities/1\"\n    },\n    \"project\": {\n      \"href\": \"https://api.motaword.com/v0/projects/1\"\n    }\n  }\n}"},{"status":404,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"ProjectActivityNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectActivityNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","name":""}]},"url":"/projects/:project_id/activities/:id","auth":"required","examples":{"codes":[{"code":"","language":"text"}]},"method":"post"},"body":"You can submit comments for translators for their activities. When you submit a comment, we display it to the translator in question as a pop-up while they are still working on our platform, or send it in an email to them if they logged-off.\n\nThis is the best way to communicate with MotaWord in a live project to provide feedback on your translations. Translators always consider your comments and make necessary changes.\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Comment language\",\n  \"body\": \"For the best communication, comment text must be in the source language of the project, or in English as a fallback language. This is especially important in projects with multiple target languages where you wouldn't be sure which target language the translator of activity is working on.\"\n}\n[/block]","category":"55122adf0c1a08190077f970","githubsync":"","link_url":"","title":"Submit a comment","user":"55105f652dd9010d0019e17b","sync_unique":"","version":"5512229bc1b13537009f5d96","__v":0,"hidden":false,"link_external":false,"order":2,"slug":"submit-a-comment","createdAt":"2015-04-16T01:41:18.935Z","editedParams":true,"editedParams2":true,"excerpt":"Submit a comment about a specific activity","project":"55105fa24980621900063340","type":"post","updates":[],"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

postSubmit a comment

Submit a comment about a specific activity

Path Params

id:
required
integer
Activity ID.
project_id:
required
integer
Project ID.

Body Params

comment:
required
string
Comment text.
You can submit comments for translators for their activities. When you submit a comment, we display it to the translator in question as a pop-up while they are still working on our platform, or send it in an email to them if they logged-off. This is the best way to communicate with MotaWord in a live project to provide feedback on your translations. Translators always consider your comments and make necessary changes. [block:callout] { "type": "warning", "title": "Comment language", "body": "For the best communication, comment text must be in the source language of the project, or in English as a fallback language. This is especially important in projects with multiple target languages where you wouldn't be sure which target language the translator of activity is working on." } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



You can submit comments for translators for their activities. When you submit a comment, we display it to the translator in question as a pop-up while they are still working on our platform, or send it in an email to them if they logged-off. This is the best way to communicate with MotaWord in a live project to provide feedback on your translations. Translators always consider your comments and make necessary changes. [block:callout] { "type": "warning", "title": "Comment language", "body": "For the best communication, comment text must be in the source language of the project, or in English as a fallback language. This is especially important in projects with multiple target languages where you wouldn't be sure which target language the translator of activity is working on." } [/block]
{"_id":"552f151a633a5b0d00e99ce7","slug":"list-activity-comments","updates":[],"body":"Get a list of comments belonging to an activity.","createdAt":"2015-04-16T01:49:14.749Z","editedParams":true,"editedParams2":true,"link_url":"","__v":0,"githubsync":"","project":"55105fa24980621900063340","sync_unique":"","user":"55105f652dd9010d0019e17b","version":"5512229bc1b13537009f5d96","api":{"url":"/projects/:project_id/activities/:id/comments","auth":"required","method":"get","params":[{"_id":"552f151a633a5b0d00e99ce8","required":true,"desc":"Activity ID.","default":"","type":"int","name":"id","in":"path"},{"in":"path","_id":"552052f84bf7e20d00aa352b","required":true,"desc":"Project ID.","default":"","type":"int","name":"project_id"}],"results":{"codes":[{"language":"json","code":"{\n    \"comments\": [\n        {\n          \"id\": 1,\n          \"comment\": \"string\",\n          \"commented_at\": 1379470357, //unix time seconds\n          \"links\": {\n            \"activity\": {\n              \"href\": \"https://api.motaword.com/v0/projects/1/activities/1\"\n            },\n            \"project\": {\n              \"href\": \"https://api.motaword.com/v0/projects/1\"\n            }\n          }\n        },\n        {\n          \"id\": 2,\n          \"comment\": \"string\",\n          \"commented_at\": 1379470388, //unix time seconds\n          \"links\": {\n            \"activity\": {\n              \"href\": \"https://api.motaword.com/v0/projects/1/activities/1\"\n            },\n            \"project\": {\n              \"href\": \"https://api.motaword.com/v0/projects/1\"\n            }\n          }\n        },\n    ],\n    \"meta\": {\n        \"paging\": {\n            \"page\": 1,\n            \"per_page\": 10,\n            \"total_count\": 2,\n            \"links\": {\n                \"next\": null,\n                \"self\": \"https://api.motaword.com/v0/projects/1/activities/1/comments\",\n                \"previous\": null\n            }\n        }\n    }\n}","name":"","status":200},{"status":404,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"ProjectActivityNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectActivityNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","name":""}]}},"link_external":false,"title":"List activity comments","type":"get","category":"55122adf0c1a08190077f970","excerpt":"","hidden":false,"order":3,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

getList activity comments


Path Params

id:
required
integer
Activity ID.
project_id:
required
integer
Project ID.
Get a list of comments belonging to an activity.

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Get a list of comments belonging to an activity.
{"_id":"552f158d4329c20d00fa9bdc","type":"get","user":"55105f652dd9010d0019e17b","__v":0,"createdAt":"2015-04-16T01:51:09.444Z","editedParams":true,"editedParams2":true,"link_external":false,"title":"List project comments","category":"55122adf0c1a08190077f970","link_url":"","project":"55105fa24980621900063340","api":{"results":{"codes":[{"code":"{\n    \"comments\": [\n        {\n          \"id\": 1,\n          \"comment\": \"string\",\n          \"commented_at\": 1379470357, //unix time seconds\n          \"links\": {\n            \"activity\": {\n              \"href\": \"https://api.motaword.com/v0/projects/1/activities/1\"\n            },\n            \"project\": {\n              \"href\": \"https://api.motaword.com/v0/projects/1\"\n            }\n          }\n        },\n        {\n          \"id\": 2,\n          \"comment\": \"string\",\n          \"commented_at\": 1379470388, //unix time seconds\n          \"links\": {\n            \"activity\": {\n              \"href\": \"https://api.motaword.com/v0/projects/1/activities/1\"\n            },\n            \"project\": {\n              \"href\": \"https://api.motaword.com/v0/projects/1\"\n            }\n          }\n        },\n    ],\n    \"meta\": {\n        \"paging\": {\n            \"page\": 1,\n            \"per_page\": 10,\n            \"total_count\": 2,\n            \"links\": {\n                \"next\": null,\n                \"self\": \"https://api.motaword.com/v0/projects/1/comments\",\n                \"previous\": null\n            }\n        }\n    }\n}","name":"","status":200,"language":"json"},{"status":404,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","name":""}]},"url":"/projects/:id/comments","auth":"required","method":"get","params":[{"_id":"552052f84bf7e20d00aa352b","required":true,"desc":"Project ID.","default":"","type":"int","name":"id","in":"path"}]},"order":4,"sync_unique":"","version":"5512229bc1b13537009f5d96","body":"Get a list of comments for the whole project, regardless of the activities. This is the broader version of \"[List activity comments](http://motaword.readme.io/docs/list-activity-comments)\".","excerpt":"","githubsync":"","hidden":false,"slug":"list-project-comments","updates":[],"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

getList project comments


Path Params

id:
required
integer
Project ID.
Get a list of comments for the whole project, regardless of the activities. This is the broader version of "[List activity comments](http://motaword.readme.io/docs/list-activity-comments)".

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Get a list of comments for the whole project, regardless of the activities. This is the broader version of "[List activity comments](http://motaword.readme.io/docs/list-activity-comments)".
{"_id":"552f1823633a5b0d00e99ced","title":"Package translations","updates":[],"createdAt":"2015-04-16T02:02:11.923Z","order":0,"hidden":false,"version":"5512229bc1b13537009f5d96","category":"552052b64bf7e20d00aa3529","editedParams":true,"excerpt":"","githubsync":"","link_external":false,"link_url":"","slug":"package-a-project","sync_unique":"","__v":0,"body":"Packaging is basically getting all translations together in the original format of your documents. As in some cases or with large files, this may take longer than normal (more than 10 seconds), this method is asynchronous by default. It will return a package key to let you track packaging status. When packaging is \"complete\", you can make a download call to download your translations.\n\n**If you provided a language code,** only that language will be ready to download when the packaging status is \"complete\".\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Supported languages\",\n  \"body\": \"For supported languages, see the \\\"[Supported languages](http://motaword.readme.io/docs/supported-languages)\\\" section.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Package key\",\n  \"body\": \"Package is how you track your project's packaging process. With this key, you can make a call to [/project/:id/package/check](http://motaword.readme.io/docs/check-packaging-status) and see the status of packaging.\"\n}\n[/block]","editedParams2":true,"type":"post","api":{"url":"/projects/:id/package/:language_code","auth":"required","method":"post","params":[{"_id":"552f1823633a5b0d00e99cf0","required":true,"desc":"Project ID.","default":"","type":"int","name":"id","in":"path"},{"_id":"552f1823633a5b0d00e99cef","required":false,"desc":"Optional language code. By specifying one, you can package the translation of only a specific language.","default":"","type":"string","name":"language_code","in":"path"},{"_id":"552f1823633a5b0d00e99cee","default":"true","desc":"If you want to package and download the translation synchronously, mark this parameter as '0'. It will package the translation and then return the packaged file in the response, identical to /download call after an asynchronous /package call.","name":"async","required":false,"type":"boolean","in":"body"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"key\": \"string\",\n  \"status\": \"string\",\n}","name":""},{"code":"// file content.","language":"text","status":200},{"code":"{\n    \"error\": {\n        \"code\": \"ProjectNotLaunchedYet\",\n        \"http_code\": 402,\n        \"message\": \"ProjectNotLaunchedYet\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","language":"json","status":402},{"code":"{\n    \"error\": {\n        \"code\": \"ProjectNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"TranslationPackageNotFound\",\n        \"http_code\": 404,\n        \"message\": \"TranslationPackageNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","language":"json","status":404}]}},"project":"55105fa24980621900063340","user":"55105f652dd9010d0019e17b","parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

postPackage translations


Path Params

id:
required
integer
Project ID.
language_code:
string
Optional language code. By specifying one, you can package the translation of only a specific language.

Body Params

async:
booleantrue
If you want to package and download the translation synchronously, mark this parameter as '0'. It will package the translation and then return the packaged file in the response, identical to /download call after an asynchronous /package call.
Packaging is basically getting all translations together in the original format of your documents. As in some cases or with large files, this may take longer than normal (more than 10 seconds), this method is asynchronous by default. It will return a package key to let you track packaging status. When packaging is "complete", you can make a download call to download your translations. **If you provided a language code,** only that language will be ready to download when the packaging status is "complete". [block:callout] { "type": "info", "title": "Supported languages", "body": "For supported languages, see the \"[Supported languages](http://motaword.readme.io/docs/supported-languages)\" section." } [/block] [block:callout] { "type": "warning", "title": "Package key", "body": "Package is how you track your project's packaging process. With this key, you can make a call to [/project/:id/package/check](http://motaword.readme.io/docs/check-packaging-status) and see the status of packaging." } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Packaging is basically getting all translations together in the original format of your documents. As in some cases or with large files, this may take longer than normal (more than 10 seconds), this method is asynchronous by default. It will return a package key to let you track packaging status. When packaging is "complete", you can make a download call to download your translations. **If you provided a language code,** only that language will be ready to download when the packaging status is "complete". [block:callout] { "type": "info", "title": "Supported languages", "body": "For supported languages, see the \"[Supported languages](http://motaword.readme.io/docs/supported-languages)\" section." } [/block] [block:callout] { "type": "warning", "title": "Package key", "body": "Package is how you track your project's packaging process. With this key, you can make a call to [/project/:id/package/check](http://motaword.readme.io/docs/check-packaging-status) and see the status of packaging." } [/block]
{"_id":"552f1b0a4329c20d00fa9bdf","githubsync":"","link_external":false,"type":"get","category":"552052b64bf7e20d00aa3529","editedParams2":true,"hidden":false,"order":1,"updates":[],"user":"55105f652dd9010d0019e17b","api":{"auth":"required","method":"get","params":[{"required":true,"desc":"Project ID.","default":"","type":"int","name":"id","in":"path","_id":"552f1b0a4329c20d00fa9be1"},{"desc":"Packaging key provided by the /projects/:id/package call.","default":"","type":"string","name":"key","in":"query","_id":"552f1b0a4329c20d00fa9be0","required":true}],"results":{"codes":[{"language":"json","code":"{\n  \"status\": \"string\"\n}","name":"","status":200},{"code":"{\n    \"error\": {\n        \"code\": \"ProjectNotLaunchedYet\",\n        \"http_code\": 402,\n        \"message\": \"ProjectNotLaunchedYet\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","name":"","status":402,"language":"json"},{"status":404,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"ProjectNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"PackagingStatusMissing\",\n        \"http_code\": 404,\n        \"message\": \"PackagingStatusMissing\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}"}]},"url":"/projects/:id/package/check"},"editedParams":true,"excerpt":"","__v":0,"version":"5512229bc1b13537009f5d96","project":"55105fa24980621900063340","slug":"check-packaging-status","sync_unique":"","title":"Check packaging status","body":"If you start an asynchronous [packaging call](http://motaword.readme.io/docs/package-a-project), this is the endpoint where you can check the progress of packaging. You will use the *packaging key* provided in the response of your `package` request here.\n\nPackaging status can be one of the following: **packaging** and **completed**.\n[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"Synchronous packaging\",\n  \"body\": \"If you issue a synchronous packaging call (by providing `async=0`), you don't need to check packaging progress or issue a separate download call to download translations. Synchronous packaging already returns the translation package, instead of a packaging key.\"\n}\n[/block]","createdAt":"2015-04-16T02:14:34.509Z","link_url":"","parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

getCheck packaging status


Path Params

id:
required
integer
Project ID.

Query Params

key:
required
string
Packaging key provided by the /projects/:id/package call.
If you start an asynchronous [packaging call](http://motaword.readme.io/docs/package-a-project), this is the endpoint where you can check the progress of packaging. You will use the *packaging key* provided in the response of your `package` request here. Packaging status can be one of the following: **packaging** and **completed**. [block:callout] { "type": "success", "title": "Synchronous packaging", "body": "If you issue a synchronous packaging call (by providing `async=0`), you don't need to check packaging progress or issue a separate download call to download translations. Synchronous packaging already returns the translation package, instead of a packaging key." } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



If you start an asynchronous [packaging call](http://motaword.readme.io/docs/package-a-project), this is the endpoint where you can check the progress of packaging. You will use the *packaging key* provided in the response of your `package` request here. Packaging status can be one of the following: **packaging** and **completed**. [block:callout] { "type": "success", "title": "Synchronous packaging", "body": "If you issue a synchronous packaging call (by providing `async=0`), you don't need to check packaging progress or issue a separate download call to download translations. Synchronous packaging already returns the translation package, instead of a packaging key." } [/block]
{"_id":"552f1b33633a5b0d00e99cf9","__v":1,"api":{"method":"get","params":[{"default":"","type":"int","name":"id","in":"path","_id":"552f1823633a5b0d00e99cf0","required":true,"desc":"Project ID."},{"in":"path","_id":"552f1823633a5b0d00e99cef","required":false,"desc":"Optional language code. By specifying one, you can download the translation of only a specific language.","default":"","type":"string","name":"language_code"}],"results":{"codes":[{"status":200,"language":"text","code":"// file content.\n\n*** Translation package streamed. The streamed file is always a ZIP file, except when the API client is configured for Drupal and Wordpress. ***","name":""},{"code":"{\n    \"error\": {\n        \"code\": \"ProjectNotLaunchedYet\",\n        \"http_code\": 402,\n        \"message\": \"ProjectNotLaunchedYet\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","language":"json","status":402},{"code":"{\n    \"error\": {\n        \"code\": \"ProjectNotFound\",\n        \"http_code\": 404,\n        \"message\": \"ProjectNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"TranslationPackageNotFound\",\n        \"http_code\": 404,\n        \"message\": \"TranslationPackageNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","language":"json","status":404}]},"settings":"","url":"/projects/:id/download/:language_code","auth":"required","examples":{"codes":[]}},"link_external":false,"updates":[],"version":"5512229bc1b13537009f5d96","body":"The translation of the documents you uploaded previously will be packaged in a single ZIP file, which will be sent to you in the response of this endpoint.\n\n**If you provide a language code,** only the package of that language will be sent in the response.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Supported languages\",\n  \"body\": \"To get a list of language codes, see \\\"[Supported Languages](http://motaword.readme.io/docs/supported-languages)\\\".\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"Package before downloading\",\n  \"body\": \"You need to package your translations before downloading them. As translation packaging can be longer than normal in some cases or with large files, translation packaging and downloading methods are **asynchronous by default.** \\n\\nTo be able to download your project's translated documents, you first need to make a /projects/:id/package call. You can also narrow your package by specifying a language. Then you should also specify the language code while downloading that package.\\n\\n***However***, if you specify `async=0` in your packaging call, we would package the translation synchronously and return the translation package file in the response of that very first `/package` call.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"WordPress and Drupal clients\",\n  \"body\": \"If you specify your API application type as \\\"WordPress\\\" or \\\"Drupal\\\", `download` call will always return the translation of the only file in your project. The response will **not** be a ZIP file, but it will be the content of your translated file. For example, we normally communicate with our WordPress and Drupal plugins with a JSON file, so the `/download` call will always return the translated version of this JSON file.\"\n}\n[/block]","link_url":"","sync_unique":"","editedParams":true,"excerpt":"","hidden":false,"slug":"download-translations","title":"Download translations","type":"get","category":"552052b64bf7e20d00aa3529","createdAt":"2015-04-16T02:15:15.623Z","editedParams2":true,"githubsync":"","order":2,"project":"55105fa24980621900063340","user":"55105f652dd9010d0019e17b","parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

getDownload translations


Path Params

id:
required
integer
Project ID.
language_code:
string
Optional language code. By specifying one, you can download the translation of only a specific language.
The translation of the documents you uploaded previously will be packaged in a single ZIP file, which will be sent to you in the response of this endpoint. **If you provide a language code,** only the package of that language will be sent in the response. [block:callout] { "type": "info", "title": "Supported languages", "body": "To get a list of language codes, see \"[Supported Languages](http://motaword.readme.io/docs/supported-languages)\"." } [/block] [block:callout] { "type": "danger", "title": "Package before downloading", "body": "You need to package your translations before downloading them. As translation packaging can be longer than normal in some cases or with large files, translation packaging and downloading methods are **asynchronous by default.** \n\nTo be able to download your project's translated documents, you first need to make a /projects/:id/package call. You can also narrow your package by specifying a language. Then you should also specify the language code while downloading that package.\n\n***However***, if you specify `async=0` in your packaging call, we would package the translation synchronously and return the translation package file in the response of that very first `/package` call." } [/block] [block:callout] { "type": "warning", "title": "WordPress and Drupal clients", "body": "If you specify your API application type as \"WordPress\" or \"Drupal\", `download` call will always return the translation of the only file in your project. The response will **not** be a ZIP file, but it will be the content of your translated file. For example, we normally communicate with our WordPress and Drupal plugins with a JSON file, so the `/download` call will always return the translated version of this JSON file." } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



The translation of the documents you uploaded previously will be packaged in a single ZIP file, which will be sent to you in the response of this endpoint. **If you provide a language code,** only the package of that language will be sent in the response. [block:callout] { "type": "info", "title": "Supported languages", "body": "To get a list of language codes, see \"[Supported Languages](http://motaword.readme.io/docs/supported-languages)\"." } [/block] [block:callout] { "type": "danger", "title": "Package before downloading", "body": "You need to package your translations before downloading them. As translation packaging can be longer than normal in some cases or with large files, translation packaging and downloading methods are **asynchronous by default.** \n\nTo be able to download your project's translated documents, you first need to make a /projects/:id/package call. You can also narrow your package by specifying a language. Then you should also specify the language code while downloading that package.\n\n***However***, if you specify `async=0` in your packaging call, we would package the translation synchronously and return the translation package file in the response of that very first `/package` call." } [/block] [block:callout] { "type": "warning", "title": "WordPress and Drupal clients", "body": "If you specify your API application type as \"WordPress\" or \"Drupal\", `download` call will always return the translation of the only file in your project. The response will **not** be a ZIP file, but it will be the content of your translated file. For example, we normally communicate with our WordPress and Drupal plugins with a JSON file, so the `/download` call will always return the translated version of this JSON file." } [/block]
{"_id":"56a767a9bbfd890d00b293ef","title":"Global files","updates":[],"user":"55105f652dd9010d0019e17b","category":"56a764eebbfd890d00b293eb","githubsync":"","hidden":false,"link_external":false,"sync_unique":"","link_url":"","order":0,"project":"55105fa24980621900063340","type":"basic","version":"5512229bc1b13537009f5d96","__v":0,"createdAt":"2016-01-26T12:33:45.169Z","excerpt":"","api":{"results":{"codes":[{"name":"","status":200,"language":"json","code":"{}"},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Global files are stationary style guide and glossary files that are automatically and globally attached to your projects. They are available only for our corporate account clients.\n\nOnce you submit a style guide or glossary, these files will accompany your projects as if you explicitly uploaded them to each project, eliminating the repetition.\n\nMotaWord API allows you to update and download a global file. Update calls will create these global files if none is existing.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"See \\\"[Supported formats](http://motaword.readme.io/docs/supported-formats)\\\" section to get a list of supported formats for documents, style guides and glossaries.\",\n  \"title\": \"Supported formats\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Multiple style guides\",\n  \"body\": \"You can have a global style guide and glossary, and insert another one on per-project basis. Both style guides and glossaries will be available and attached to your project.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"body\": \"New global files will not be available for currently active/launched projects.\",\n  \"title\": \"Support for currently active projects\"\n}\n[/block]","slug":"global-files","parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

Global files


Global files are stationary style guide and glossary files that are automatically and globally attached to your projects. They are available only for our corporate account clients. Once you submit a style guide or glossary, these files will accompany your projects as if you explicitly uploaded them to each project, eliminating the repetition. MotaWord API allows you to update and download a global file. Update calls will create these global files if none is existing. [block:callout] { "type": "info", "body": "See \"[Supported formats](http://motaword.readme.io/docs/supported-formats)\" section to get a list of supported formats for documents, style guides and glossaries.", "title": "Supported formats" } [/block] [block:callout] { "type": "warning", "title": "Multiple style guides", "body": "You can have a global style guide and glossary, and insert another one on per-project basis. Both style guides and glossaries will be available and attached to your project." } [/block] [block:callout] { "type": "danger", "body": "New global files will not be available for currently active/launched projects.", "title": "Support for currently active projects" } [/block]
Global files are stationary style guide and glossary files that are automatically and globally attached to your projects. They are available only for our corporate account clients. Once you submit a style guide or glossary, these files will accompany your projects as if you explicitly uploaded them to each project, eliminating the repetition. MotaWord API allows you to update and download a global file. Update calls will create these global files if none is existing. [block:callout] { "type": "info", "body": "See \"[Supported formats](http://motaword.readme.io/docs/supported-formats)\" section to get a list of supported formats for documents, style guides and glossaries.", "title": "Supported formats" } [/block] [block:callout] { "type": "warning", "title": "Multiple style guides", "body": "You can have a global style guide and glossary, and insert another one on per-project basis. Both style guides and glossaries will be available and attached to your project." } [/block] [block:callout] { "type": "danger", "body": "New global files will not be available for currently active/launched projects.", "title": "Support for currently active projects" } [/block]
{"_id":"56a7642703f28c0d00a54576","__v":0,"createdAt":"2016-01-26T12:18:47.101Z","editedParams":true,"user":"55105f652dd9010d0019e17b","version":"5512229bc1b13537009f5d96","category":"56a764eebbfd890d00b293eb","link_url":"","order":1,"project":"55105fa24980621900063340","title":"Download global style guide","editedParams2":true,"excerpt":"","githubsync":"","link_external":false,"slug":"download-global-style-guide","sync_unique":"","updates":[],"api":{"method":"get","params":[{"name":"styleguide","required":true,"type":"file","in":"query","_id":"56a7642703f28c0d00a54577","default":"","desc":"Style guide file. Currently supported formats: .pdf, .docx, .txt"}],"results":{"codes":[{"code":"// file content.","name":"","status":200,"language":"text"},{"status":404,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"StyleGuideNotFound\",\n        \"http_code\": 404,\n        \"message\": \"StyleGuideNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","name":""}]},"settings":"","url":"/styleguide","auth":"required","examples":{"codes":[]}},"body":"Download your corporate account's global style guide.\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"body\": \"This endpoint is available only for corporate account customers.\"\n}\n[/block]","hidden":false,"type":"get","parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

getDownload global style guide


Query Params

styleguide:
required
file
Style guide file. Currently supported formats: .pdf, .docx, .txt
Download your corporate account's global style guide. [block:callout] { "type": "danger", "body": "This endpoint is available only for corporate account customers." } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Download your corporate account's global style guide. [block:callout] { "type": "danger", "body": "This endpoint is available only for corporate account customers." } [/block]
{"_id":"56a764d651cacd19004644c6","link_url":"","type":"post","version":"5512229bc1b13537009f5d96","category":"56a764eebbfd890d00b293eb","editedParams":true,"githubsync":"","excerpt":"","hidden":false,"title":"Update global style guide","user":"55105f652dd9010d0019e17b","api":{"results":{"codes":[{"name":"","code":"{\"status\": \"success\"}","language":"json","status":200},{"code":"{\n    \"error\": {\n        \"code\": \"FileTooLarge\",\n        \"http_code\": 400,\n        \"message\": \"FileTooLarge\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"FileTooSmall\",\n        \"http_code\": 400,\n        \"message\": \"FileTooSmall\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"MissingCorporateAccount\",\n        \"http_code\": 400,\n        \"message\": \"MissingCorporateAccount\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","language":"json","status":400,"name":""},{"code":"{\n    \"error\": {\n        \"code\": \"UnsupportedStyleGuideFormat\",\n        \"http_code\": 405,\n        \"message\": \"UnsupportedStyleGuideFormat\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","status":405,"language":"json"}]},"settings":"","url":"/styleguide","auth":"required","examples":{"codes":[]},"method":"post","params":[{"_id":"5520547543c74c21005b6886","required":true,"desc":"Style guide file. Currently supported formats: .pdf, .docx, .txt","default":"","type":"file","name":"styleguide","in":"body"}]},"createdAt":"2016-01-26T12:21:42.967Z","sync_unique":"","updates":[],"__v":0,"body":"Update your corporate account's global style guide.\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"\",\n  \"body\": \"This endpoint is available only for corporate account customers.\"\n}\n[/block]","slug":"update-global-style-guide","project":"55105fa24980621900063340","editedParams2":true,"link_external":false,"order":2,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

postUpdate global style guide


Body Params

styleguide:
required
file
Style guide file. Currently supported formats: .pdf, .docx, .txt
Update your corporate account's global style guide. [block:callout] { "type": "danger", "title": "", "body": "This endpoint is available only for corporate account customers." } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Update your corporate account's global style guide. [block:callout] { "type": "danger", "title": "", "body": "This endpoint is available only for corporate account customers." } [/block]
{"_id":"56a7652597e8b00d0096d1b4","updates":[],"user":"55105f652dd9010d0019e17b","body":"Download your corporate account's global glossary.\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"body\": \"This endpoint is available only for corporate account customers.\"\n}\n[/block]","editedParams2":true,"githubsync":"","category":"56a764eebbfd890d00b293eb","slug":"download-global-glossary","type":"get","sync_unique":"","title":"Download global glossary","version":"5512229bc1b13537009f5d96","api":{"params":[{"in":"query","_id":"56a7642703f28c0d00a54577","required":true,"desc":"Glossary file. Currently supported formats: .xlsx, .tbx","default":"","type":"file","name":"glossary"}],"results":{"codes":[{"status":200,"language":"text","code":"// file content.","name":""},{"status":404,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"GlossaryNotFound\",\n        \"http_code\": 404,\n        \"message\": \"GlossaryNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","name":""}]},"settings":"","url":"/glossary","auth":"required","examples":{"codes":[]},"method":"get"},"editedParams":true,"link_url":"","excerpt":"","hidden":false,"link_external":false,"order":3,"project":"55105fa24980621900063340","__v":0,"createdAt":"2016-01-26T12:23:01.536Z","parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

getDownload global glossary


Query Params

glossary:
required
file
Glossary file. Currently supported formats: .xlsx, .tbx
Download your corporate account's global glossary. [block:callout] { "type": "danger", "body": "This endpoint is available only for corporate account customers." } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Download your corporate account's global glossary. [block:callout] { "type": "danger", "body": "This endpoint is available only for corporate account customers." } [/block]
{"_id":"56a7657197e8b00d0096d1b5","excerpt":"","__v":0,"body":"Update your corporate account's global glossary.\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"\",\n  \"body\": \"This endpoint is available only for corporate account customers.\"\n}\n[/block]","link_external":false,"title":"Update global glossary","user":"55105f652dd9010d0019e17b","category":"56a764eebbfd890d00b293eb","editedParams":true,"editedParams2":true,"hidden":false,"order":4,"project":"55105fa24980621900063340","slug":"update-global-glossary","updates":[],"api":{"auth":"required","examples":{"codes":[]},"method":"post","params":[{"type":"file","name":"glossary","in":"body","_id":"5520547543c74c21005b6886","required":true,"desc":"Glossary file. Currently supported formats: .xlsx, .tbx","default":""}],"results":{"codes":[{"name":"","code":"{\"status\": \"success\"}","language":"json","status":200},{"name":"","code":"{\n    \"error\": {\n        \"code\": \"FileTooLarge\",\n        \"http_code\": 400,\n        \"message\": \"FileTooLarge\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"FileTooSmall\",\n        \"http_code\": 400,\n        \"message\": \"FileTooSmall\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}\n{\n    \"error\": {\n        \"code\": \"MissingCorporateAccount\",\n        \"http_code\": 400,\n        \"message\": \"MissingCorporateAccount\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","language":"json","status":400},{"status":405,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"UnsupportedGlossaryFormat\",\n        \"http_code\": 405,\n        \"message\": \"UnsupportedGlossaryFormat\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}"}]},"settings":"","url":"/glossary"},"createdAt":"2016-01-26T12:24:17.598Z","githubsync":"","link_url":"","sync_unique":"","type":"post","version":"5512229bc1b13537009f5d96","parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

postUpdate global glossary


Body Params

glossary:
required
file
Glossary file. Currently supported formats: .xlsx, .tbx
Update your corporate account's global glossary. [block:callout] { "type": "danger", "title": "", "body": "This endpoint is available only for corporate account customers." } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Update your corporate account's global glossary. [block:callout] { "type": "danger", "title": "", "body": "This endpoint is available only for corporate account customers." } [/block]
{"_id":"552f1e334329c20d00fa9be3","title":"Show account details","createdAt":"2015-04-16T02:28:03.119Z","excerpt":"","githubsync":"","link_external":false,"order":0,"project":"55105fa24980621900063340","sync_unique":"","version":"5512229bc1b13537009f5d96","hidden":false,"type":"get","updates":[],"category":"55122ad23228bc2500819a71","link_url":"","slug":"show-account-details","user":"55105f652dd9010d0019e17b","__v":2,"api":{"url":"/me","auth":"required","method":"get","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{\n\t\"id\": 1,\n  \"name\": \"string\",\n  \"created_at\": 1379470357, //unix time seconds\n  \"billing\": {\n    \"name\": \"string\",\n    \"street\": \"string\",\n    \"city\": \"string\",\n    \"zip\": \"string\",\n    \"state\": \"string\",\n    \"country\": \"string\"\n  },\n  \"stats\": {\n    \"total_projects\": 2,\n    \"started_projects\": 1\n  },\n  \"links\": {\n    \"self\": {\n      \"href\": \"https://api.motaword.com/v0/me\"\n    },\n    \"projects\": {\n      \"href\": \"https://api.motaword.com/v0/projects\"\n    }\n  }\n}","name":""},{"status":404,"language":"json","code":"{\n    \"error\": {\n        \"code\": \"UserNotFound\",\n        \"http_code\": 404,\n        \"message\": \"UserNotFound\",\n        \"help\": \"https://www.motaword.com/developer/support\"\n    }\n}","name":""}]}},"body":"Returns a summary of your account, including your billing information and some statistics about your operations.","parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

getShow account details


Returns a summary of your account, including your billing information and some statistics about your operations.

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Returns a summary of your account, including your billing information and some statistics about your operations.
{"_id":"5d23b7b454f7600011e436be","version":"5512229bc1b13537009f5d96","updatedAt":"2019-07-08T21:37:56.132Z","createdAt":"2019-07-08T21:37:56.132Z","category":"5d23b7b454f7600011e436bd","project":"55105fa24980621900063340","updates":[],"next":{"pages":[],"description":""},"link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"auth":"required","params":[],"url":"","method":"get"},"isReference":true,"order":0,"body":"This is where you show your users how to set it up. You can use code samples, like this:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"$http.post('/someUrl', data).success(successCallback);\\n\\nalert('test');\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\nTry dragging a block from the right to see how easy it is to add more content!","excerpt":"This page will help you get started with MW API.","slug":"getting-started-with-your-api","type":"basic","title":"Getting Started With Your API","__v":0,"metadata":{"title":"","description":"","image":[]},"parentDoc":null,"childrenPages":[]}

Getting Started With Your API

This page will help you get started with MW API.

This is where you show your users how to set it up. You can use code samples, like this: [block:code] { "codes": [ { "code": "$http.post('/someUrl', data).success(successCallback);\n\nalert('test');", "language": "javascript" } ] } [/block] Try dragging a block from the right to see how easy it is to add more content!
This is where you show your users how to set it up. You can use code samples, like this: [block:code] { "codes": [ { "code": "$http.post('/someUrl', data).success(successCallback);\n\nalert('test');", "language": "javascript" } ] } [/block] Try dragging a block from the right to see how easy it is to add more content!