As you can check below screenshot I tried to make PUT api call in the Contentful to update the entry.
When I try to hit GET call, everything works fine but don't understand here what is reason of this below error while making PUT call.
Did I missed anything here or anything wrong here?
NOTE: I changed all the variable while making call, spaceId, env, entryId and authorisation(passing access_token)
From what I see in your URL, it looks like you are trying to hit the
Contentful Preview API
, which is read-only.source
Therefore, updating an entry via a
PUT
request cannot be done with the url you are using.However, I believe your
PUT
request should work if you update the base url to behttps://api.contentful.com/
instead. This is the endpoint for theContent Management API
.Important note:
Content Management API
.Using
https://api.contentful.com/
hits the writableContent Management API
, which has documentation for thePUT
request you are making.Importing the corresponding
curl
command into your Postman client will confirm this.So in the end, the url would be this:
https://api.contentful.com/spaces/{space_id}/environments/{environment_id}/entries/{entry_id}
Again, the bearer token will have to come from the writable Content Management API.