Post to WordPress

Purpose

To post a document from Writer to WordPress.

HTTP Request URL

https://{zohoapis_domain}/writer/api/v1/documents/{{document_id}}/apps/blog/wordpress/accounts/{{account_id}}/blogs/{{site_id}}

Path Parameters

ParameterData TypeDescription
Mandatory Parameters
document_idStringSpecify the unique id of the document to be published in your WordPress site.
account_idStringSpecify the unique id of your WordPress account.
site_idStringSpecify the unique id of the site in which the document needs to be posted.

Body Parameters

ParameterData TypeDescription
Mandatory Parameters
post_typeString

Choose how the document needs to posted. The document can be saved as a draft or published directly.

Enter post_type = draft, if you want to save the document as a draft.

Enter post_type = publish, if you want the document to be published directly. 

Optional Parameters
titleString - max 255 charactersSpecify a title for the post.
schedule_timeLongSpecify the time (timestamp in millisecs) when the writer document needs to be posted in your WordPress account.
tagsStringSpecify the comma-separated list of tag names
styleString

Specify the style in which the document needs to be posted.

Enter style = inline, if you want to post the document with all inline styles.

Enter style = none, if you want the post the document without styles. 

By default, the document will be posted with inline styles.

Sample Request

Copiedcurl "https://www.zohoapis.com/writer/api/v1/documents/{document_id}/apps/blog/wordpress/accounts/{account_id}/blogs/{site_id}"
-X POST
-H "Authorization: Zoho-oauthtoken xyz"

Sample Response

Copied{
  "site_id": "11112222223333",
  "account_id": "33334445555556666",
  "post_type": "publish",
  "url": "https://zylker.wordpress.com/2019/02/13/employee-management/"
}