You can use the Jamf Pro API 10.32.x or later to execute the Set Recovery Lock MDM command to enable Recovery Lock. The process involves the following steps using the Jamf Pro API:
Obtaining the computer ID and management ID of target computers
Sending the
Set Recovery LockMDM command to target computers
You can also include the newPassword key to set or clear the Recovery Lock password that is used to unlock the computer. The Recovery Lock password is stored in Jamf Pro. For more information about Recovery Lock, see "recoveryOS password" in Startup security in macOS in Apple Platform Deployment.