# Change a help collection (https://notert.io/docs/api/reference/change-a-help-collection)

`PATCH /api/v1/help-collections/{id}`

Changes a collection, as the Edit collection dialog does: its name, the line under it, its icon or the end of its address on the board. What you leave out stays, and readers see the change on the board at once. A new address keeps the old one working, sending readers on to it; one another collection holds is SLUG_TAKEN. Where it is changed but can't be read back for the answer, the answer holds its id alone, and the list reads the rest.

Access: A token with help:write.

## Path parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | The collection's id. At most 64 characters. |

## Body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | No | Its name now. At least 1 character. At most 60 characters. |
| `description` | string | No | The line under its name now. Empty for none. At most 200 characters. |
| `icon` | string | No | The icon its card shows now. One of: `folder`, `rocket`, `settings`, `database`, `message-circle`, `book-open`, `credit-card`, `users`, `code`, `zap`, `shield`, `globe`, `plug`, `bell`, `chart-column`, `life-buoy`, `sparkles`, `layout-dashboard`, `wrench`, `key-round`, `mail`, `smartphone`, `palette`, `lightbulb`. |
| `slug` | string | No | The end of its address on the board, such as billing. At least 1 character. At most 60 characters. |

## Response 200

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | The collection's id. |
| `name` | string | The collection's name. |
| `description` | string | The line under its name. |
| `slug` | string | The part of its address on the help center that names it. |

## Errors

| Status | Code | Message |
| --- | --- | --- |
| 400 | `BAD_REQUEST` | Input validation failed. |
| 401 | `UNAUTHORIZED` | Send a valid API token as a Bearer token. |
| 403 | `HOLDER_NOT_ALLOWED` | The teammate who holds this API token's secret can't do this in the workspace now. A teammate who can should roll it in the workspace's settings. |
| 403 | `INSUFFICIENT_SCOPE` | This API token can't draft and change help articles. Create one that may in the workspace's settings. |
| 403 | `NETWORK_NOT_ALLOWED` | This API token works only from the networks it was made for. Call from one of them, or create a token for this one in the workspace's settings. |
| 403 | `NO_SEAT` | This workspace's plan has no seat for you. |
| 403 | `WORKSPACE_SUSPENDED` | This workspace is suspended. |
| 404 | `NOT_FOUND` | Not Found. |
| 409 | `CHANGED_MEANWHILE` | Something changed meanwhile. Try again. |
| 409 | `SLUG_TAKEN` | Another collection's address already ends that way. Pick another. |
| 429 | `TOO_MANY_REQUESTS` | Too Many Requests. Its data holds `retryAfter`. |

## Example request

```sh
curl -X PATCH https://app.notert.io/api/v1/help-collections/c3a8e5f1-2b7d-4c9a-8e6f-1a3b5c7d9e02 \
  -H "Authorization: Bearer $NOTERT_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Billing",
  "description": "Invoices, receipts and plans",
  "icon": "folder",
  "slug": "billing"
}'
```

## Example response 200

```json
{
  "id": "c3a8e5f1-2b7d-4c9a-8e6f-1a3b5c7d9e02",
  "name": "Getting started",
  "description": "Set up your workspace",
  "slug": "getting-started"
}
```
