# Update external file

```http
PUT /projects/{project_reference}/external-files/{provider}/{file_id}
```

Update external file.

## Parameters

| Name                | In     | Required | Description                                                |
| ------------------- | ------ | -------- | ---------------------------------------------------------- |
| `project_reference` | path   | Yes      | Project slug, UUID, or domain that identifies the project. |
| `provider`          | path   | Yes      |                                                            |
| `file_id`           | path   | Yes      |                                                            |
| `if-match`          | header |          |                                                            |

## Request body

| Field              | Type   | Required | Description                                                                                                                          |
| ------------------ | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `content`          | string | Yes      | Replacement content; folders cannot be updated. At most 10000000 characters as sent. Send If-Match to refuse a stale write with 409. |
| `content_encoding` | string |          | Encoding of content: `utf8` (default) or `base64`.                                                                                   |

## Responses

| Status | Description           |
| ------ | --------------------- |
| 200    | The updated file.     |
| 400    | Bad request           |
| 401    | Unauthorized          |
| 402    | Payment required      |
| 403    | Forbidden             |
| 404    | Not found             |
| 409    | Conflict              |
| 413    | Payload too large     |
| 428    | Precondition required |
| 429    | Rate limit exceeded   |
| 500    | Server error          |
| 503    | Service unavailable   |
