How to duplicate Contentful content model via https://github.com/contentful/contentful-migration? It can definitely be done via Web UI as shown below
Seems like there is no such an option in management API https://www.contentful.com/developers/docs/references/content-management-api/
Indeed it appears there is no single request that will duplicate a content model.
You would need instead to make two requests, first fetching the content model you want to duplicate, then creating the new model derived from it:
Fetch the source model:
GET /spaces/{space_id}/environments/{env_id}/content_types/{content_type_id}
Prepare the request body to create the duplicate model: from the response to step 1, remove sys
and update name
to differentiate from the source model
Create the new model, using the request body from step 2:
PUT /spaces/{space_id}/environments/{env_id}/content_types/{new_content_type_id}