Ir al contenido principal
Companies

Delete a company by external company ID

Permanently deletes a company by its external company ID (the companyId from your system).

DELETE
/v2/companies/by-company-id/{companyId}

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

{
  "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.

Authorizationstringheaderobligatorio

API key as Bearer token. Use: Authorization: Bearer sk_...

companyIdstringobligatorio

The external company ID from your system

Required string length: 1 - 255
Ejemplo: comp_12345
Featurebase-Versionenum<string>header

API version for this request. Defaults to your organization's configured API version if not specified.

Opciones disponibles: 2026-08-19.orbit, 2026-01-01.nova, 2025-12-12.clover
Ejemplo: 2026-08-19.orbit

Respuesta

application/json

Success

deletedenum<boolean>obligatorio

Indicates the resource was deleted

Opciones disponibles: true
Ejemplo: true
idstringobligatorio

Unique identifier of the deleted company

Ejemplo: 507f1f77bcf86cd799439011
objectenum<string>obligatorio

Object type identifier

Opciones disponibles: company
Ejemplo: company