Creation of Space when a ticket is closed via POST

Encountering this error when trying to do automation for creating confluence space once a ticket is closed.

Encountering this error:

               "key":"You must specify a title for new content.",
   "message":"com.atlassian.confluence.api.service.exceptions.BadRequestException: Could not create content with type page"

Reference: How to create Confluence page automatically with JIRA issue content once JIRA issue created | Jira | Atlassian Documentation