The integration of multiple energy sectors, such as electricity, heating, and mobility, into an overall smart energy system is a key part of the journey towards a fossil-free energy system. Exploiting the operational flexibility of these sectors will lead to the efficient operation of the integrated smart energy system. The use of heat pumps for the heating supply based on renewable energy resources is reasonable in many cases. Combining heat pumps with thermal storages, these systems can offer flexibility to an energy system based on fluctuating power generation. Flexibility can be defined as the capability to adapt an initial schedule in order to support the energy system in terms of the provision of power reserve. In this paper, an approach to determine the time-dependent flexibility potential of a heat pump system is presented. The optimization-based approach considers all the constraints resulting from the system topology, including the required heating demand of the connected building. As a result, constraints for the integration of the available flexibility in a modified Optimal Power Flow (OPF) calculation are given. These lead to the ensured feasibility of the flexibility provision without considering the system boundaries of the heat pump site within the OPF.