Publish Specific Version

Purpose

To publish the most recent version of the 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_republishBooleanMandatoryEnter auto_republish ="false". This will publish only the recent version of the document. Document republishing should be done manually to update the future updates.

Notes

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

Deluge Snippet

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

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