# Update content

_Cms / Contents_

`PUT /cms/contents/{bucketId}`

## Parameters

- `id` (number, required) — The unique identifier of the content to update
- `title` (string, required) — The title of the content
- `slug` (string, required) — The URL-friendly identifier for the content
- `summary` (string, optional) — A brief summary of the content
- `body` (string, optional) — The main content body
- `categoryId` (number, optional) — The category identifier this content belongs to
- `isPublished` (boolean, optional) — Whether the content is published or not
- `publishedDate` (string, optional) — The publication date in ISO 8601 format
- `imageUrl` (string, optional) — The URL of the content's featured image

## Responses

### `200` — Content updated successfully

Type: `GenericResultResponse<boolean>`



## Code Examples

### curl

```curl
curl --request PUT \
 --url https://apis-spb.konso.io/cms/contents/{bucketId} \
 --header 'Content-Type: application/json' \
 --header 'x-api-key: {your-api-key}' \
 --data '{
 "id": 123456,
 "title": "Updated Article",
 "slug": "updated-article",
 "summary": "Updated summary",
 "body": "Updated article content",
 "categoryId": 1,
 "isPublished": true,
 "publishedDate": "2023-12-01T10:00:00Z",
 "imageUrl": "https://example.com/updated-image.jpg"
 }'
```

### javascript

```js
const options = {
 method: 'PUT',
 headers: {
 'Content-Type': 'application/json',
 'x-api-key': '{your-api-key}'
 },
 body: JSON.stringify({
 id: 123456,
 title: 'Updated Article',
 slug: 'updated-article',
 summary: 'Updated summary',
 body: 'Updated article content',
 categoryId: 1,
 isPublished: true,
 publishedDate: '2023-12-01T10:00:00Z',
 imageUrl: 'https://example.com/updated-image.jpg'
 })
};

fetch('https://apis-spb.konso.io/cms/contents/{bucketId}', options)
 .then(response => response.json())
 .then(response => console.log(response))
 .catch(err => console.error(err));
```

### Request Body Example

```json
{
  "id": 12345,
  "title": "example-string",
  "slug": "example-string",
  "summary": "example-string",
  "body": "example-string",
  "categoryId": 12345,
  "isPublished": true,
  "publishedDate": "example-string",
  "imageUrl": "example-string"
}
```

### Response Example (200)

```json
{
 "result": true
}
```
