---
title: "Remove Company Assets"
method: DELETE
path: "/companies/{companyId}/assets"
tags: ["Company Management"]
---

# Remove Company Assets

`DELETE /companies/{companyId}/assets`

## Request

- Base URL: `https://api.hudsonrock.com/json/v3`
- URL: `https://api.hudsonrock.com/json/v3/companies/{companyId}/assets`
- Auth: API key in header `api-key`
- TypeScript: <https://skmtc.dev/hudsonrock/apis/cavalier-api/docs/companies/:companyId/assets/delete.ts> (a function with typed inputs; its response is checked against the schema)

Remove primary `domains`, `apks`, and/or `external_domains` from a company. At least one of the three asset arrays must be provided and non-empty. Clients must send a JSON body on this DELETE request.

If the authenticated user belongs to an organization with `synced_data: true`, only the user with `organization.role: "owner"` can call this endpoint. Other members receive `403 Forbidden`.

## Path parameters

- `companyId` string, required

## Request body

- object
  - `domains` string[]: Primary domains to remove
  - `apks` string[]: APK package names to remove
  - `external_domains` string[]: External (third-party) domains to remove

## Response `200`

Updated list of companies for the authenticated user

- object
  - `companies` Company[]
    - `_id` string: ObjectId of the company
    - `name` string: Display name of the company
    - `alerts` boolean: Whether notifications (including webhook deliveries) are enabled for this company. Set to true when the company is created.
    - `data` object: Company assets used to scope searches
      - `domains` string[]: Primary domains owned by the company
      - `apks` string[]: Android application package names associated with the company
      - `external_domains` string[]: External (third-party) domains associated with the company
      - `webhook` Webhook, nullable: Webhook configuration for notifying an external endpoint of events related to a company. Null if not configured.
        - `url` string, uri: HTTPS URL to receive webhook notifications.
        - `token` string: Token sent with each webhook request to authenticate it, exactly as entered (e.g. a Splunk HEC token or bearer token). Include any scheme yourself, e.g. `Bearer <token>` or `Splunk <token>`.
        - `auth_header` string: Name of the HTTP header used to send the token. Defaults to "Authorization" if not specified.
        - `data_alert` boolean: Selects the event mode. `false` (default): one summary event per notification run (`sourcetype: hudsonrock:alert`). `true`: one full-record event per compromised machine per match category (`sourcetype: hudsonrock:data`). The modes are exclusive: data alerts replace the summary alert.

## Other responses

- `400`: Validation error - the request or request body was invalid
- `401`: Unauthorized - the server could not authenticate the request
- `403`: Forbidden - the server authenticated the request but refuses to process it because of insufficient permissions
- `404`: Not found - the server could not find the requested resource
- `500`: Internal server error - the server encountered an unexpected condition that prevented it from fulfilling the request

## Changes

- **2026-11-03** `a7ebb4dfd47f`: 2 info
  - added the optional property `companies/items/alerts` to the response with the `200` status
  - added the optional property `companies/items/data/webhook/data_alert` to the response with the `200` status

[Operation history](https://skmtc.dev/hudsonrock/apis/cavalier-api/changes/companies/:companyId/assets/delete.md)

---

[API](https://skmtc.dev/hudsonrock/apis/cavalier-api.md) - [All operations](https://skmtc.dev/hudsonrock/apis/cavalier-api/llms.txt) - [OpenAPI document](https://skmtc.dev/hudsonrock/apis/cavalier-api/revisions/a7ebb4dfd47f?raw)
