I'm trying to find a way to create an article in a Wordpress portal using a Java application I developed. I have some clients that need to publish on this portal, but it should be something automated by this Java application. Is there any way (plugin or api) that I can send a JSON to the Wordpress portal (POST) and publish the article? I thought about creating, inside my Java application, a JSON and sending it to the Wordpress portal, something like:

{"author": "John Doe", "title": "New article", "Content": "Lorem Ipsum ...", ...}

How can I do this?

  • Sounds like you're in need of the REST API
    – Tom J Nowell
    Commented Oct 16, 2018 at 14:06

2 Answers 2


Yes, there is a REST API at /wp-json with core content endpoints for posts pages etc

For example, my current latest blog post:


Is available via a GET request as a JSON object at:


And I can send a similar object via an authenticated POST request to create a new post to https://tomjn.com/wp-json/wp/v2/posts/, or a HTTP UPDATE or DELETE request.

Note that WP includes an auth method out of the box that requires a nonce and a cookie of a user capable of creating posts in order to do this. For external applications, you will need a plugin to implement OAuth1/2 or another authentication scheme of your choosing


I think you're asking about WordPress REST API. From The Handbook:

The WordPress REST API provides an interface for applications to interact with your WordPress site by sending and receiving data as JSON (JavaScript Object Notation) objects. It is the foundation of the WordPress Block Editor, and can likewise enable your theme, plugin or custom application to present new, powerful interfaces for managing and publishing your site content.

The linked documentation above should have all the resources you need to build something like what you're looking for.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.