---
title: "Update a company's profile"
method: PATCH
path: "/companies/{companyId}"
tags: ["Companies"]
---

# Update a company's profile

`PATCH /companies/{companyId}`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/companies/{companyId}`
- Auth: HTTP bearer

Partial edit of the company profile: only the keys sent are written, and an empty string is treated as "not sent". Text fields are plain text; HTML markup is rejected with 422. `fiscalYearEnd` is the one field an explicit `null` clears (back to "not confirmed", #2736); a February year end has one stored spelling, so `02-29` is stored and returned as `02-28`, meaning the last day of February; setting it to a date withdraws the open deferred onboarding fiscal-year question. Every change is recorded in the audit log with its previous and new value. Accountant-only state (`clientStatus`, `metricsEnabled`, view-only access confirmation) is ignored here and has its own accountant routes. API-key credentials are refused with 403.

## Request body

- UpdateCompanyInput: Partial company profile edit. Every key is optional; an empty string is treated as "not sent". Text fields must not contain HTML markup.
  - `name` string: Company name. Trimmed; cannot be empty and cannot contain control characters.
  - `entityType` string
  - `industry` string
  - `ein` string
  - `yearFounded` integer
  - `monthFounded` integer
  - `state` string
  - `website` string: An http(s) URL or a bare domain.
  - `description` string
  - `annualRevenue` string
  - `monthlyExpenses` string
  - `accountingMethod` string
  - `fiscalYearEnd` string, nullable: Fiscal year end as MM-DD; must be a real date (422 otherwise). An explicit null clears a stored value back to "not confirmed" (#2736); it is never defaulted to 12-31.
  - `currentAccountingSoftware` string
  - `revenueStreams` string[]
  - `paymentProcessors` string[]
  - `bankAccountCount` string
  - `creditCardCount` string
  - `hasCorporateCards` boolean
  - `hasMercury` boolean
  - `hasBrex` boolean
  - `hasRamp` boolean
  - `hasRho` boolean
  - `payrollProvider` string
  - `painPoint` string
  - `chartOfAccountsNotes` string
  - `migrationSource` string
  - `migrationComplete` boolean
  - `chartOfAccountsReviewed` boolean

## Response `200`

The updated company

- CompanyResponse
  - `success` boolean
  - `data` Company
    - `fiscalYearEnd` string, nullable: Fiscal year end as MM-DD (companies.fiscal_year_end). Null means not confirmed; it is never defaulted to 12-31. Writes must be a real MM-DD date (422 otherwise). A value other than 12-31 flags month-end close and statements for review, because non-calendar fiscal years are not supported yet (#2019).
    - `clientStatus` 'test' | 'active' | 'inactive': Lifecycle marker (migration 089). Used by the accountant app to hide internal test tenants in production and filter customer lists by lifecycle stage. 'active' is the default on creation; 'test' is for internal QA / demo companies; 'inactive' is for customers no longer serviced.

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: Company not found
- `422`: Request failed validation

---

[API](https://skmtc.dev/medianfi/apis/median-api.md) · [All operations](https://skmtc.dev/medianfi/apis/median-api/llms.txt) · [OpenAPI document](https://skmtc.dev/medianfi/apis/median-api/revisions/20090ea32b0d?raw)
