Skip to main content
DELETE
/
api
/
adm
/
companyUsers
/
{id}
Delete Company User
curl --request DELETE \
  --url https://localhost:44371/api/adm/companyUsers/{id} \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "code": 200,
  "errorMessage": null
}

Description

Marks user as deleted (soft delete) while preserving transaction associations. User loses access immediately but historical records remain intact for compliance and auditing.

Input

  • Path Parameter: id (guid, required) — Unique identifier of the company user to delete.

Output

Returns a CompanyUserDeleteCommandResponse indicating deletion success.

Example Request

DELETE /api/admin/company-users/7c9e6679-7425-40de-944b-e07fc1f90ae7
Authorization: Bearer {token}

Example Response

{
  "success": true,
  "code": 200,
  "errorMessage": null
}

Errors

  • 400 Bad Request — Cannot delete last admin (company must maintain at least one active admin) or user has active project assignments.
  • 404 Not Found — No user exists with the specified ID.

Notes

  • Deletion is soft; user record retained for audit purposes.
  • User access is revoked immediately upon deletion.
  • Cannot delete the last company admin.
  • Remove project associations before deleting users with active projects.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

id
string<guid>
required

The unique identifier of the company user to delete.

Response

Always returned. Check the success property in the response body to determine if the operation succeeded.

Standard response structure containing operation status and error information. Standard command response indicating the result of a data modification. Represents the response returned after deleting a company user.

success
boolean

True if the operation completed successfully; false if an error occurred.

Example:

true

code
enum<string>

Result code indicating the outcome of the operation.

Available options:
Unknown,
Success,
BadRequest,
Unauthorized,
NotFound,
Error
Example:

200

errorMessage
string | null

Human-readable error message when an error occurs.

Example:

null