---
title: "Delete a company"
method: DELETE
path: "/apps/{appId}/envs/{envId}/companies/{companyId}"
---

# Delete a company

`DELETE /apps/{appId}/envs/{envId}/companies/{companyId}`

## Request

- Base URL: `https://app.reflag.com/api`
- URL: `https://app.reflag.com/api/apps/{appId}/envs/{envId}/companies/{companyId}`
- Auth: HTTP bearer

Synchronously delete a company and its related data from an environment. Requires the `write:entities` API key scope or admin member access. By default, users that belong only to this company are also deleted; set `deleteUsers` to false to preserve them. Users that belong to other companies are always preserved.

## Path parameters

- `appId` string, required: App identifier
- `envId` string, required: Environment identifier
- `companyId` string, required: Company ID within your application

## Request body

- object
  - `deleteUsers` boolean

## Response `200`

Company deleted successfully

- object

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Requested resource, or its parent, not found

## Changes

- **2026-09-11** `168d14804058`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/reflag/apis/reflag-management-api/changes/apps/:appId/envs/:envId/companies/:companyId/delete.md)

---

[API](https://skmtc.dev/reflag/apis/reflag-management-api.md) - [All operations](https://skmtc.dev/reflag/apis/reflag-management-api/llms.txt) - [OpenAPI document](https://skmtc.dev/reflag/apis/reflag-management-api/revisions/280aaed4e96e?raw)
