# Update an existing record

`PUT /api/help-center-article/{id}`

Authentication (security requirement alternatives):

```json
[
  {
    "bearer": []
  }
]
```

- bearer: http (bearer), header JWT. Enter JWT token

Request body: application/json (required)

Type: object

Schema: [UpdateHelpCenterArticleDTO](https://sourcey-gauzy.pages.dev/api-reference/models/updatehelpcenterarticledto/index.md)

- `tenant` (optional)
  Type: object

- `tenantId` (optional)
  Type: string

- `organization` (optional)
  Type: object

- `organizationId` (optional)
  Type: string

- `sentTo` (optional)
  Type: string

- `deletedAt` (optional)
  Type: string, date-time
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `createdAt` (optional)
  Type: string, date-time
  
  The creation timestamp of the entity.
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `updatedAt` (optional)
  Type: string, date-time
  
  The last update timestamp of the entity.
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `id` (optional)
  Type: string

- `isActive` (optional)
  Type: boolean
  
  default: true

- `isArchived` (optional)
  Type: boolean
  
  default: false

- `archivedAt` (optional)
  Type: string, date-time
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `name` (optional)
  Type: string

- `description` (optional)
  Type: string

- `data` (optional)
  Type: string

- `draft` (optional)
  Type: boolean

- `privacy` (optional)
  Type: boolean

- `index` (optional)
  Type: number

- `descriptionHtml` (optional)
  Type: string

- `descriptionJson` (optional)
  Type: object

- `descriptionBinary` (optional)
  Type: string

- `isLocked` (optional)
  Type: boolean

- `color` (optional)
  Type: string

- `externalId` (optional)
  Type: string

- `categoryId` (optional)
  Type: string

- `parentId` (optional)
  Type: string

- `ownedById` (optional)
  Type: string

- `projects` (optional)
  Type: array
  
  Items:
    Type: array

- `tags` (optional)
  Type: array
  
  Items:
    Type: array

Responses:

- 200: The record has been successfully edited.

- 400: Invalid input, The response body may contain clues as to what went wrong

- 401: Unauthorized

- 403: Forbidden

- 404: Record not found

## Examples

### cURL

```bash
curl -X PUT 'http://localhost:3000/api/help-center-article/%7Bid%7D' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "tenant": {},
  "tenantId": "string",
  "organization": {},
  "organizationId": "string",
  "sentTo": "string",
  "deletedAt": "2018-11-21T06:20:32.232Z",
  "createdAt": "2018-11-21T06:20:32.232Z",
  "updatedAt": "2018-11-21T06:20:32.232Z",
  "id": "string",
  "isActive": true,
  "isArchived": false,
  "archivedAt": "2018-11-21T06:20:32.232Z",
  "name": "string",
  "description": "string",
  "data": "string",
  "draft": true,
  "privacy": true,
  "index": 0,
  "descriptionHtml": "string",
  "descriptionJson": {},
  "descriptionBinary": "string",
  "isLocked": true,
  "color": "string",
  "externalId": "string",
  "categoryId": "string",
  "parentId": "string",
  "ownedById": "string",
  "projects": [
    []
  ],
  "tags": [
    []
  ]
}'
```

### JavaScript

```javascript
const body = `{
  "tenant": {},
  "tenantId": "string",
  "organization": {},
  "organizationId": "string",
  "sentTo": "string",
  "deletedAt": "2018-11-21T06:20:32.232Z",
  "createdAt": "2018-11-21T06:20:32.232Z",
  "updatedAt": "2018-11-21T06:20:32.232Z",
  "id": "string",
  "isActive": true,
  "isArchived": false,
  "archivedAt": "2018-11-21T06:20:32.232Z",
  "name": "string",
  "description": "string",
  "data": "string",
  "draft": true,
  "privacy": true,
  "index": 0,
  "descriptionHtml": "string",
  "descriptionJson": {},
  "descriptionBinary": "string",
  "isLocked": true,
  "color": "string",
  "externalId": "string",
  "categoryId": "string",
  "parentId": "string",
  "ownedById": "string",
  "projects": [
    []
  ],
  "tags": [
    []
  ]
}`;

const response = await fetch('http://localhost:3000/api/help-center-article/%7Bid%7D', {
  method: 'PUT',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "tenant": {},
  "tenantId": "string",
  "organization": {},
  "organizationId": "string",
  "sentTo": "string",
  "deletedAt": "2018-11-21T06:20:32.232Z",
  "createdAt": "2018-11-21T06:20:32.232Z",
  "updatedAt": "2018-11-21T06:20:32.232Z",
  "id": "string",
  "isActive": true,
  "isArchived": false,
  "archivedAt": "2018-11-21T06:20:32.232Z",
  "name": "string",
  "description": "string",
  "data": "string",
  "draft": true,
  "privacy": true,
  "index": 0,
  "descriptionHtml": "string",
  "descriptionJson": {},
  "descriptionBinary": "string",
  "isLocked": true,
  "color": "string",
  "externalId": "string",
  "categoryId": "string",
  "parentId": "string",
  "ownedById": "string",
  "projects": [
    []
  ],
  "tags": [
    []
  ]
}'''

response = requests.put(
    'http://localhost:3000/api/help-center-article/%7Bid%7D',
    data=body.encode('utf-8'),
    headers={
        'Authorization': 'Bearer YOUR_TOKEN',
        'Content-Type': 'application/json',
    },
)
print(response.text)
```
