# Update a backup path

`PUT /api/v1/backup-paths/{backupPath}`

Send only the fields to change.

## Path Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| backupPath | integer | yes | The ID of the backup path. Example: `5`. |

## Body Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| server_id | integer | no | The server the folder is on. Example: `12`. |
| path | string | no | The absolute folder on the server to back up. Example: `/var/www/vhosts/example.com/httpdocs`. |
| label | string | no | A name for the folder, shown in the panel. Nullable. Example: `Website files`. |
| excludes | string[] | no | Patterns of files and folders under `path` to leave out, for example `cache/*` or `*.log`. Nullable. Example: `["cache/*","*.log"]`. |

## Response

### 200

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| data | object | yes |  |
| data.id | integer | yes |  |
| data.server_id | integer | yes |  |
| data.path | string | yes |  |
| data.label | string | yes | Nullable. |
| data.excludes | string[] | yes | Patterns left out of the backup. Nullable. |
| data.created_at | string · date-time | yes | Nullable. |
| data.updated_at | string · date-time | yes | Nullable. |

### 401

The request carries no valid token: the `Authorization: Bearer` header is missing, or its token is unknown, revoked or past its expiry date. Send a current personal access token.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| message | string | yes | Always `Unauthenticated.`. |

### 403

The token may not do this. The `message` says why: `This token lacks the required ability.` (a `read` token), `Your role does not permit this action.` (its owner is not an Admin or Operator in the client), `This account is disabled.`, `This token is not bound to a client you belong to.`, or `Client suspended`.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| message | string | yes | What went wrong. |

### 404

Not found

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| message | string | yes | What went wrong. |

### 422

The body or the query is invalid. `message` names the first problem and `errors` lists every problem by field.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| message | string | yes | The first problem, and how many more there are. |
| errors | object | yes | Every problem, by field. |

### 429

More than 120 requests a minute for this user. Wait the seconds in `Retry-After`, then retry.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| message | string | yes | What went wrong. |

## Request example

```bash
curl -X PUT 'https://app.clokeep.com/api/v1/backup-paths/5' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "server_id": 12,
    "path": "/var/www/vhosts/example.com/httpdocs",
    "label": "Website files",
    "excludes": [
      "cache/*",
      "*.log"
    ]
  }'
```

## Response example (200)

```json
{
  "data": {
    "id": 5,
    "server_id": 12,
    "path": "/var/www/vhosts/example.com/httpdocs",
    "label": "Website files",
    "excludes": [
      "cache/*",
      "*.log"
    ],
    "created_at": "2026-11-01T09:14:22+00:00",
    "updated_at": "2026-11-18T16:40:05+00:00"
  }
}
```

## Response example (401)

```json
{
  "message": "Unauthenticated."
}
```

## Response example (403)

```json
{
  "message": "This token lacks the required ability."
}
```

## Response example (404)

```json
{
  "message": "No query results for model [App\\Models\\BackupPath] 5"
}
```

## Response example (422)

```json
{
  "message": "The server id field is required.",
  "errors": {
    "server_id": [
      "The server id field is required."
    ]
  }
}
```

## Response example (429)

```json
{
  "message": "Too Many Attempts."
}
```
