---
title: "Rename an own company document or change its type"
method: PATCH
path: "/api/company-documents/{id}"
tags: ["Company Documents"]
---

# Rename an own company document or change its type

`PATCH /api/company-documents/{id}`

Updates the name and/or document type of the caller's document and returns it as it now stands — the document itself, not wrapped in { data, metadata }. Both fields are optional; an omitted or `null` one keeps its current value (`null` cannot clear it). A document the caller cannot see answers 404. A company the document was shared with, or filed on, can see it but not edit it: 403. An empty body is accepted and changes nothing but the updater stamp.

## Path parameters

- `id` string, required

## Request body

- object
  - `name` string, nullable
  - `documentTypeId` string, nullable

## Response `200`

Default Response

- object
  - `id` string, required
  - `companyId` string, nullable, required
  - `ownerCompanyId` string, nullable, required
  - `name` string, required
  - `documentTypeId` string, nullable, required
  - `fileId` string, nullable, required
  - `fileUrl` string, nullable, required
  - `originalFileUrl` string, nullable, required
  - `fileType` string, nullable, required
  - `fileContentType` string, nullable, required
  - `isPublic` union, required
    - boolean
    - number
  - `type` string, nullable, required
  - `createdAt` string, date-time, nullable, required
  - `updatedAt` string, date-time, nullable, required
  - `permissions` object[], required
    - `documentId` string, required
    - `documentOwnerCompanyId` string, nullable, required
    - `sharedWithCompanyId` string, required
    - `sharedWithCompanyName` string, nullable, required
    - `requestedAt` string, date-time, nullable, required
    - `approvedAt` string, date-time, nullable, required
  - `privacyStatus` object, required
    - `status` 'public' | 'shared' | 'shared_to' | 'shared_by' | 'private' | 'private_requests', required
    - `requests` integer
    - `approvedRequests` integer

## Other responses

- `400` — Default Response
- `401` — Default Response
- `403` — Default Response
- `404` — Default Response

## Changes

> 56 revisions in range; 1 not diffed.

- **2026-09-30** `92d9b9ebe5ad` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/retraced/apis/api-reference/changes/api/company-documents/:id/patch.md)

---

[API](https://skmtc.dev/retraced/apis/api-reference.md) · [All operations](https://skmtc.dev/retraced/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc.dev/retraced/apis/api-reference/revisions/43a47823848e?raw)
