I am trying to test if the API works in Postman before using the code in my React project. The code is as follows (sensative data has been replaced):
curl --location 'https://api.contentful.com/spaces/<spacename>/environments/<environmentname>/entries' \
--header 'Authorization: Bearer <cma_token>' \
--header 'Content-Type: application/vnd.contentful.management.v1+json' \
--header 'X-Contentful-Content-Type: 2PqfXUJwE8qSYKuM0U6w8M' \
--data '{
"fields": {
"masjid": {
"en-US": "Masjid"
},
"city": {
"en-US": "city"
},
"address": {
"en-US": "address"
},
"requirements": {
"en-US": "requirements"
},
"contactName": {
"en-US": "contactName"
},
"contactMobileNumber": {
"en-US": "contactMobileNumber"
},
"extraDetails": {
"en-US": "extraDetails"
}
},
"metadata": {
"tags": [
{
"sys": {
"type": "Link",
"linkType": "Space",
"id": "<spaceid>"
}
}
]
}
}'
When I hit send I get the following error message:
{
"sys": {
"type": "Error",
"id": "BadRequest"
},
"message": "The content type you sent could not be found or was not activated.",
"requestId": "06bab052-8c18-44eb-a4cd-0511bcc00822"
}
I would appreciate any help.
Thanks.
I have tried changing the format of the request but have found no success.