Publish specific version of the document

Purpose 

To publish the most recent version of the document externally or within the organization from your Writer account.

HTTP Request URL

https://{zohoapis_domain}/writer/api/v1/documents/{{document_id}}/publish

Path Parameters

ParameterData TypeDescription
Mandatory Parameters
document_idStringSpecify the unique id of the document to be published.

Body Parameters

ParameterData TypeDescription
Mandatory Parameters
scopeStringSpecify scope = "external" to publish the document to public.

Specify scope = "organization" to publish the document within the organization.
auto_republishBooleanEnter auto_republish ="false". This will publish only the recent version of the document. Document repubishing should be done manually to update the future updates.

 

Sample Request

Copiedcurl --location --request POST "https://www.zohoapis.com/writer/api/v1/documents/h36bc140de7af48564a4e9ff5ef48ade1a37d/publish?scope=organization&auto_republish=false" \
  --header "Authorization: Zoho-oauthtoken xxx.yyy.zzz"

Sample Response

Copied{
  "result": "success",
  "auto_republish": false,
  "scope": "organization",
  "message": "Document has been successfully published within the organization.",
  "published_url": "https://writer.zoho.com/writer/published/h36bc140de7af48564a4e9ff5ef48ade1a37d",
}