Create Content Template API not working

Hi there everyone,

We have been working with the confluence cloud API, mostly without any issues. We have, however, hit a bump with /wiki/rest/api/template when trying to create a template for a piece of content.

We have followed the documentation to the letter but keep getting an error message: "com.atlassian.confluence.api.service.exceptions.BadRequestException: Cannot find valid content for template from contentTemplate" when attempting to create a post.

The object we post looks as follows:



Does anyone else have experience with this particular rest call or perhaps have some advise?

Any feedback would be greatly appreciated.

Kind regards,
Dirk de Klerk

Hi Dirk,

Atlassian did some changes in the body representation but didn’t update their documentation.

Try to use a body like this:

"body": {
        "storage": {
          "value": "ABC",
          "representation": "storage",
          "embeddedContent": []