Publish Document

Purpose

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

Quick Reference

PropertyValue
MethodPOST
Request URLhttps://{zohoapis_domain}/writer/api/v1/documents/{document_id}/publish
ScopesZohoWriter.documentEditor.ALL
Rate LimitSee Writer API throttle limits

Parameters

Path Parameters

ParameterData TypeMandatory/OptionalDescription
document_idStringMandatorySpecify the unique id of the document to be published.

Body Parameters

ParameterData TypeMandatory/OptionalDescription
scopeStringMandatorySpecify scope = "external" to publish the document to the public.
Specify scope = "organization" to publish the document within the organization.
auto_republishBooleanOptionalEnter auto_republish ="true". This republishes the document automatically whenever a change is made.

Notes

Curl - 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",
}

Deluge Snippet

Copiedparam = Map();
param.put("scope","external");

response = invokeurl
[
	url :"https://www.zohoapis.com/writer/api/v1/documents/{document_id}/publish"
	type :POST
	parameters:param
	connection:"<connection_name>"
];
info response;