---
title: "Move a file or update its metadata"
method: POST
path: "/v1/projects/{project_id}/files/{environment_id}/update"
tags: ["files"]
---

# Move a file or update its metadata

`POST /v1/projects/{project_id}/files/{environment_id}/update`

## Request

- Base URL: `https://api.connic.co`
- URL: `https://api.connic.co/v1/projects/{project_id}/files/{environment_id}/update`
- Auth: HTTP bearer

Move or rename a file or folder, or merge metadata into a file.

Required permission: `files.manage`.

## Path parameters

- `project_id` string, uuid, required
- `environment_id` string, uuid, required

## Request body

- FileUpdateRequest
  - `path` string, required: File path such as invoices/2026/acme.pdf.
  - `new_path` string, nullable: Move or rename to this path.
  - `metadata` object, nullable: Fields to merge. A null value removes a field.

## Response `200`

Successful Response

- FileUpdateResponse
  - `moved` integer, required
  - `file` object, nullable
  - `folder` string, nullable

## Other responses

- `401`: Missing or invalid API key.
- `403`: The API key lacks the required permission or access to the environment.
- `404`: The resource does not exist in this project.
- `422`: Validation Error
- `429`: Rate limit exceeded.

## Changes

- **2026-10-20** `482932da5fbe`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/connic/apis/connic-api/changes/v1/projects/:project_id/files/:environment_id/update/post.md)

---

[API](https://skmtc.dev/connic/apis/connic-api.md) · [All operations](https://skmtc.dev/connic/apis/connic-api/llms.txt) · [OpenAPI document](https://skmtc.dev/connic/apis/connic-api/revisions/482932da5fbe?raw)
