# Delete a company by external company ID Permanently deletes a company by its external company ID (the companyId from your system). This will also remove the company from all linked users' associations. ### Path Parameters - companyId - The external company ID from your system ### Deletion Behavior When a company is deleted: - The company record is permanently removed - The company is removed from all linked users' companyIds and companies arrays ### Response Returns a deletion confirmation object: - id - The Featurebase internal ID of the deleted company - object - Always "company" - deleted - Always true ### Example Response json { "id": "507f1f77bcf86cd799439011", "object": "company", "deleted": true } ### Use Case Use this endpoint when you need to delete a company using your own system's company identifier, such as when a company is removed from your application. ### Version Availability This endpoint is only available in API version 2026-01-01.nova and newer. Endpoint: DELETE /v2/companies/by-company-id/{companyId} Version: 2026-01-01.nova Security: bearerAuth ## Header parameters: - `Featurebase-Version` (string) API version for this request. Defaults to your organization's configured API version if not specified. Example: "2026-01-01.nova" ## Path parameters: - `companyId` (string, required) The external company ID from your system Example: "comp_12345" ## Response 200 fields (application/json): - `id` (string, required) Unique identifier of the deleted company Example: "507f1f77bcf86cd799439011" - `object` (string, required) Object type identifier Enum: "company" - `deleted` (boolean, required) Indicates the resource was deleted Enum: true ## Response 404 fields (application/json): - `error` (object, required) - `error.type` (string, required) The type of error returned Enum: "invalid_request_error" - `error.code` (string, required) Machine-readable error code Enum: "company_not_found" - `error.message` (string, required) Human-readable error message Example: "An error occurred" - `error.param` (string) The parameter that caused the error (if applicable) Example: "id" - `error.status` (number, required) HTTP status code Enum: 404