Translate Document

Purpose 

This API allows you to translate the document.

HTTP Request URL

https://{zohoapis_domain}/writer/api/v1/documents/<document_id>/translate

Path Parameters

ParameterData TypeDescription
Mandatory Parameter
document_idStringSpecify the unique id of the document that needs to be translated.

Body Parameters

ParameterData TypeDescription
Mandatory Parameters
source_languageStringSpecify the language code of the given original document.
target_languageStringSpecify the language code in which the original document needs to be translated.
Optional Parameter
folder_idStringSpecify the ID of the folder where you'd like to store the translated document. By default, it will be saved in the "My Folder" of WorkDrive.

Note:

  • To use this API, an OAuth token should be generated with the following scopes; ZohoWriter.documentEditor.ALL
  • You can check the possible errors list here.

Sample Request

Copiedcurl -X POST "https://writer.zoho.com/writer/api/v1/documents/velgx886437d3f9fa442caa6e87acd9dfad0d/translate" \
--header "Authorization: Zoho-oauthtoken xxx.yyy.zzz" \
-- form "source_language=en" \ 
-- form "target_language=hi" 

Sample Response

Copied{
    "status_url": "https://writer.zoho.com/writer/api/v1/documents/velgx886437d3f9fa442caa6e87acd9dfad0d/translate/jobs/f931a01183b33
    "status": "inprogress"
}

You can check the job completion status using the 'status' key. Once the status changes to 'completed', a 'document_link' will be provided. Using which, you can access the translated document.

Copied{
"status": "completed"
"document_link":"https://writer.zoho.com/writer/open/e8447fe5069440a15042f5a92d4f20"
}