Hello lovely Kirby community,
I’m trying to create some pages via the REST API endpoint api/pages/:id/children
. I have a multi-language site with 2 languages (‘de’ and ‘en’). According to the documentation, I’m using the X-Language
header to specify which language I want to use.
But when I create a new page, the header is being ignored. No matter which value I use, the page is created in the default language.
Here is my request (cURL syntax – exported from Postman):
curl --location --request POST ‘https://mypage.net/api/pages/imported-blog/children’
–header ‘x-language: de’
–header ‘Authorization: Basic abc123’
–header ‘Content-Type: application/x-www-form-urlencoded’
–data-urlencode ‘template=blog’
–data-urlencode ‘slug=hallo-234’
–data-urlencode ‘content[text]=This is a test’
I get a 200 response from this request, but the page is only created in the default language, not in the desired language.
Any ideas why this happens?