# Delete a Client Soft-deletes a descendant client and removes it from the client hierarchy. Only leaf clients can be deleted. If the client still has children, this endpoint returns (); delete its descendants first, from the bottom of the hierarchy upwards. The authenticated client cannot delete itself. The authenticated client, an unknown or already deleted client, and a client outside your hierarchy all return (). Requires this feature to be enabled for your account (contact us); otherwise this endpoint responds with . Endpoint: DELETE /v2/clients/{id} Security: Bearer-Auth ## Path parameters: - `id` (string, required) ## Response 401 fields (application/json): - `errors` (array) - `errors.code` (string, required) An application-specific error code, expressed as a string value. Enum: "field_validation_error", "invalid_params", "server_error", "not_authorized", "not_found", "invalid_methodology", "invalid_type", "client_not_found", "invalid_parent_client", "client_has_children", "parent_id_immutable" - `errors.detail` (string) A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized. - `errors.source` (object) An object containing references to the primary source of the error - `errors.source.id` (string) - `errors.source.attribute` (string, required) - `errors.source.model` (string) ## Response 404 fields (application/json): - `errors` (array) - `errors.code` (string, required) An application-specific error code, expressed as a string value. Enum: "field_validation_error", "invalid_params", "server_error", "not_authorized", "not_found", "invalid_methodology", "invalid_type", "client_not_found", "invalid_parent_client", "client_has_children", "parent_id_immutable" - `errors.detail` (string) A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized. - `errors.source` (object) An object containing references to the primary source of the error - `errors.source.id` (string) - `errors.source.attribute` (string, required) - `errors.source.model` (string) ## Response 422 fields (application/json): - `errors` (array) - `errors.code` (string, required) An application-specific error code, expressed as a string value. Enum: "field_validation_error", "invalid_params", "server_error", "not_authorized", "not_found", "invalid_methodology", "invalid_type", "client_not_found", "invalid_parent_client", "client_has_children", "parent_id_immutable" - `errors.detail` (string) A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized. - `errors.source` (object) An object containing references to the primary source of the error - `errors.source.id` (string) - `errors.source.attribute` (string, required) - `errors.source.model` (string)