How to use API to publish content provides an API to publish content directly to the site. Learn how to use their API

Step 1: Go to and open the settings tab

Step 2: Find  ‘add integration’ and get your token

Step 3: Replace your token in place of xxxx in the given url

Step 4: Copy user Id and and replace it in the following code

var request = require('request');

var token = 'XXXX'; //get one at scroll to the very end of the page and 'add' integration token
var userId = 'YYYY'; //open this link in your browser and get your userid there

var post_data = {
	'title' : 'Post title',
	'contentFormat' : 'html',
	'content': '<p>Test HTML post</p>',
	'canonicalUrl': 'https://Original-Url', //this one is important to avoid SEO issues
	'publishStatus': 'draft'


console.log('Sending the post request...');

// Set up the request
	url: '' + userId + '/posts',
	method: 'POST',
	json: true,
	headers: {
		'Authorization': 'Bearer ' + token,
        	"content-type": "application/json"
	body: post_data
	function (error, response, body) {