This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.


This topic contains 4 replies, has 2 voices.

Last updated by Christopher 7 months, 3 weeks ago.

Assigned support staff: Lauren.

Author Posts
September 19, 2019 at 12:32 pm #4604699



We are trying to use REST API to add translations to articles (and we cant). For now, we just can add posts in the default language set in wpml.

We want to know:
- how WPML is integrated with REST API?
- how to add new post using REST API, to a different language version (not default)
- how to add many translations at once, using REST API?

September 19, 2019 at 2:54 pm #4606631


Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Thank you for contacting WPML support. I'll be happy to help you with this.

Make sure you are using the latest version of WPML and that you are using the same URL format to access the API. For example:

If you are using URL format as directories: -

If you are using URL with parameter format: -

To see the current URL format for your site, click on the WPML > Languages > Language URL format.

Please let me know if you need any further assistance and I will be happy to help.

September 21, 2019 at 1:05 pm #4615979


Thank you for the answer, but I think we don't understand each other.

My task is to add a new post in a different language versions, not to download the list of posts in a given language.

Maybe you have an example of adding an post in given languages via REST API?

September 24, 2019 at 4:10 pm #4632991


Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Thanks for clarifying. Unfortunately, there is not an easy solution available yet, this will require custom code. Currently, there is not a way to publish a new post to a secondary language using WPML and REST API. Some clients have found a workaround by publishing to the default language and then automatically duplicating the post using WPML API hooks. You can reference this ticket as an example:

October 3, 2019 at 9:42 pm #4691557


Hey, we have made some progress,

Now we are able to add further posts in the language versions by providing the language code in the endpoint address:
hidden link
hidden link

Posts are added in the correct language, but unfortunately, they are separate posts. The problem now is to posts and translations, just like they are linked in wp admin panel.

At the moment, it adds the first as the main one in the default language, and passes the ID thus obtained for the language versions in META. Pass by parameter: icl_lang_duplicate_of (idea found at: which has the ID value from the main post.

Unfortunately, this does not associate the posts with each other. They continue to add in their own languages, but are not related to each other.

What to do to tie them together? What parameters to use?