Hello Community,
I am trying to create a new Space in my Confluence using REST API. I am using the following commands:
POST: https://<>.atlassian.net/wiki/rest/api/content/
JSON Body:
{
“key”:“MKT”,
“name”:“Marketing”,
“homepage”:{
“body”:{
“storage”:{
“value”:“
This is the updated text for the new page
”,“representation”:“storage”
}
}
},
“metadata”:{}
}
I am using basic Authentification. Unfortunately, Postman returns the following:
{ “statusCode”: 400, “data”: { “authorized”: true, “valid”: false, “errors”: [ { “message”: { “key”: “type is required to create content”, “args”: [] } } ], “successful”: false }, “message”: “com.atlassian.confluence.api.service.exceptions.BadRequestException: Could not create content with type null”}
Unfortunately I cannot see which kind of “type” is required and where I can set it.
Thank you very much for your help and have a nice day.