> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://contentful.com/developers/docs/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://contentful.com/_mcp/server. # Create or update an extension PUT https://api.contentful.com/spaces/{space_id}/environments/{environment_id}/extensions/{extension_id} Content-Type: application/vnd.contentful.management.v1+json Use this endpoint to create a new extension with a specified ID, or to update a specific extension via its ID. When updating an existing extension, you need to specify the last version of the extension you are updating with `X-Contentful-Version`. Reference: https://contentful.com/developers/docs/references/content-management-api/ui-extensions/create-or-update-an-extension ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Path parameters - `space_id` (string, required) — ID of the space in form of a string - `environment_id` (string, required) — ID of the environment in form of a string - `extension_id` (string, required) — ID of the extension in form of a string ### Headers - `X-Contentful-Version` (string, optional) — Version of the extension to update ### Body (application/vnd.contentful.management.v1+json) This endpoint expects a map from string to any. - `map from string to any` ## Response ### 200 OK - Request successful - `map from string to any` ## Examples **Request** ```json { "extension": { "fieldTypes": [ { "type": "Symbol" }, { "type": "Text" } ], "name": "My awesome extension", "sidebar": false, "src": "https://example.com/my" } } ``` **Response** ```json { "extension": { "fieldTypes": [ { "type": "Symbol" }, { "type": "Text" } ], "name": "My awesome extension", "sidebar": false, "src": "https://example.com/my" }, "sys": { "createdAt": "2025-07-04T20:43:40.000Z", "createdBy": { "sys": { "id": "7BslKh9TdKGOK41VmLDjFZ", "linkType": "User", "type": "Link" } }, "environment": { "sys": { "id": "staging", "linkType": "Environment", "type": "Link" } }, "id": "0xvkPW9FdQ1kkWlWZ8ga4x", "space": { "sys": { "id": "yadj1kx9rmg0", "linkType": "Space", "type": "Link" } }, "type": "Extension", "updatedAt": "2025-07-04T20:43:40.000Z", "updatedBy": { "sys": { "id": "4FLrUHftHW3v2BLi9fzfjU", "linkType": "User", "type": "Link" } }, "version": 1 } } ```