Skip to product menu
Skip to main content

Publish Document

Purpose 

To publish document externally or within the organization from your Writer account.

HTTP Request URL

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

HTTP Method

POST

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.
Optional Parameters
auto_republishBooleanEnter auto_republish ="true". This republishes the document automatically whenever a change is made.

 

Sample Request

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

Sample Response

Copied{
  "result": "success",
  "auto_republish": true,
  "scope": "external",
  "message": "Document has been successfully published externally.",
  "published_url": "https://writer.zohopublic.com/writer/published/h36bc140de7af48564a4e9ff5ef48ade1a37d",
}