> This page is for API Reference.

> 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/developers/docs/_mcp/server.

# Update a design library

PUT https://api.contentful.com/spaces/{spaceId}/design_libraries/{designLibraryId}
Content-Type: application/json

Updates a design library.

Update the library from its source space. Include its current `sys.version` in `X-Contentful-Version` to lock against concurrent edits.

Update requirements:

* Supply all four editable fields: `name`, `description`, `sharedWithSpaces` and `recommendedVersion`, including unchanged values.
* The source environment and taxonomy concept cannot be changed.
* Set `description` or `recommendedVersion` to `null` to clear it.
* A recommended version must belong to this library and have status `succeeded`.

Reference: https://contentful.com/developers/docs/references/experience-management-api/design-libraries/update-design-library

## Authentication

- `Authorization` header (bearer token, required) — Contentful Management API token

## Request

### Path parameters

- `designLibraryId` (string, required)
- `spaceId` (string, required)

### Headers

- `X-Contentful-Version` (string, required) — The design library's current `sys.version`, as a decimal integer from 1 to 2147483647.

### Body (application/json)

This endpoint expects an object.

- `name` (string, required)
- `description` (string, required, nullable) — A description of up to 1,000 characters. Set it to `null` to clear the current description.
- `sharedWithSpaces` (SpacesSpaceIdDesignLibrariesDesignLibraryIdPutRequestBodyContentApplicationJsonSchemaSharedWithSpaces, required) — Replaces the sharing settings for spaces in the same organisation: - An array of space IDs: Share with those spaces. - `"*"`: Share with all spaces in the organisation. - An empty array: Remove sharing. Explicit space IDs must contain 12 lowercase letters or digits and must exclude the source space.
- `recommendedVersion` (SpacesSpaceIdDesignLibrariesDesignLibraryIdPutRequestBodyContentApplicationJsonSchemaRecommendedVersion, required, nullable) — A link to a `succeeded` version of this design library. Set it to `null` to clear the recommendation.

## Response

### 200

200

- `sys` (SpacesSpaceIdDesignLibrariesDesignLibraryIdPutResponsesContentApplicationJsonSchemaSys, required)
- `name` (string, required)
- `description` (string, required, nullable)
- `sharedWithSpaces` (SpacesSpaceIdDesignLibrariesDesignLibraryIdPutResponsesContentApplicationJsonSchemaSharedWithSpaces, required)
- `recommendedVersion` (SpacesSpaceIdDesignLibrariesDesignLibraryIdPutResponsesContentApplicationJsonSchemaRecommendedVersion, required, nullable)

## Errors

### 400 Bad Request Error

The required `X-Contentful-Version` header is missing or is not an integer from 1 to 2147483647.

- `sys` (SpacesSpaceIdDesignLibrariesDesignLibraryIdPutResponsesContentApplicationJsonSchemaSys, required)
- `message` (string, optional)
- `requestId` (string, optional)
- `details` (any, optional)

### 401 Unauthorized Error

401

- `sys` (SpacesSpaceIdDesignLibrariesDesignLibraryIdPutResponsesContentApplicationJsonSchemaSys, required)
- `message` (string, optional)
- `requestId` (string, optional)
- `details` (any, optional)

### 403 Forbidden Error

403

- `sys` (SpacesSpaceIdDesignLibrariesDesignLibraryIdPutResponsesContentApplicationJsonSchemaSys, required)
- `message` (string, optional)
- `requestId` (string, optional)
- `details` (any, optional)

### 404 Not Found Error

404

- `sys` (SpacesSpaceIdDesignLibrariesDesignLibraryIdPutResponsesContentApplicationJsonSchemaSys, required)
- `message` (string, optional)
- `requestId` (string, optional)
- `details` (any, optional)

### 409 Conflict Error

The supplied `X-Contentful-Version` does not match the design library's current `sys.version`.

- `sys` (SpacesSpaceIdDesignLibrariesDesignLibraryIdPutResponsesContentApplicationJsonSchemaSys, required)
- `message` (string, optional)
- `requestId` (string, optional)
- `details` (any, optional)

### 422 Unprocessable Entity Error

422

- `sys` (SpacesSpaceIdDesignLibrariesDesignLibraryIdPutResponsesContentApplicationJsonSchemaSys, required)
- `message` (string, optional)
- `requestId` (string, optional)
- `details` (any, optional)

### 500 Internal Server Error

500

- `sys` (SpacesSpaceIdDesignLibrariesDesignLibraryIdPutResponsesContentApplicationJsonSchemaSys, required)
- `message` (string, optional)
- `requestId` (string, optional)
- `details` (any, optional)

## Types

### SpacesSpaceIdDesignLibrariesDesignLibraryIdPutRequestBodyContentApplicationJsonSchemaSharedWithSpaces

Replaces the sharing settings for spaces in the same organisation: - An array of space IDs: Share with those spaces. - `"*"`: Share with all spaces in the organisation. - An empty array: Remove sharing. Explicit space IDs must contain 12 lowercase letters or digits and must exclude the source space.

- "*"
- list of string

### SpacesSpaceIdDesignLibrariesDesignLibraryIdPutRequestBodyContentApplicationJsonSchemaRecommendedVersion

A link to a `succeeded` version of this design library. Set it to `null` to clear the recommendation.

- `sys` (SpacesSpaceIdDesignLibrariesDesignLibraryIdPutRequestBodyContentApplicationJsonSchemaRecommendedVersionSys, required)

### SpacesSpaceIdDesignLibrariesDesignLibraryIdPutResponsesContentApplicationJsonSchemaSys

- `id` (string, required)
- `type` ("Error", required)

### SpacesSpaceIdDesignLibrariesDesignLibraryIdPutResponsesContentApplicationJsonSchemaSharedWithSpaces

- "*"
- list of string

### SpacesSpaceIdDesignLibrariesDesignLibraryIdPutResponsesContentApplicationJsonSchemaRecommendedVersion

- `sys` (SpacesSpaceIdDesignLibrariesDesignLibraryIdPutResponsesContentApplicationJsonSchemaRecommendedVersionSys, required)

### SpacesSpaceIdDesignLibrariesDesignLibraryIdPutRequestBodyContentApplicationJsonSchemaRecommendedVersionSys

- `type` ("Link", required)
- `linkType` ("DesignLibraryVersion", required)
- `id` (string, required)

### SpacesSpaceIdDesignLibrariesDesignLibraryIdPutResponsesContentApplicationJsonSchemaRecommendedVersionSys

- `type` ("Link", required)
- `linkType` ("DesignLibraryVersion", required)
- `id` (string, required)

## Examples

**Request**

```json
{
  "name": "string",
  "description": "string",
  "sharedWithSpaces": "string",
  "recommendedVersion": {
    "sys": {
      "type": "string",
      "linkType": "string",
      "id": "string"
    }
  }
}
```

**Response**

```json
{
  "sys": {
    "id": "string",
    "type": "string",
    "basedOn": {
      "concept": {
        "sys": {
          "id": "string",
          "linkType": "string",
          "type": "string"
        }
      },
      "environment": {
        "sys": {
          "id": "string",
          "linkType": "string",
          "type": "string"
        }
      }
    },
    "createdAt": "string",
    "createdBy": {
      "sys": {
        "id": "string",
        "linkType": "string",
        "type": "string"
      }
    },
    "space": {
      "sys": {
        "id": "string",
        "linkType": "string",
        "type": "string"
      }
    },
    "updatedAt": "string",
    "updatedBy": {
      "sys": {
        "id": "string",
        "linkType": "string",
        "type": "string"
      }
    },
    "version": 1
  },
  "name": "string",
  "description": "string",
  "sharedWithSpaces": "string",
  "recommendedVersion": {
    "sys": {
      "type": "string",
      "linkType": "string",
      "id": "string"
    }
  }
}
```

**SDK Code**

```http HTTP
PUT /spaces/{sourceSpaceId}/design_libraries/{designLibraryId} HTTP/1.1
Host: api.contentful.com
Authorization: Bearer <management_token>
X-Contentful-Version: 3
Content-Type: application/json

{
  "name": "Design system",
  "description": null,
  "sharedWithSpaces": ["targetspace1"],
  "recommendedVersion": null
}
```