You can create a configuration profile with a Wi-Fi payload for use with the Return to Service workflow in the Jamf Pro API. Jamf recommends that the configuration profile only contain this singular payload scoped to devices you intend to erase and re-enroll with Jamf Pro.
Known Issue
These instructions are for environments that use a network with a personal security type encryption, such as WPA2 Personal. If your environment requires an enterprise security type with an 802.1x RADIUS server, consider the following known issue and associated workaround:
[PI138489] When configuring Return to Service for mobile devices, only configuration profiles with single payloads are displayed, which prevents organizations whose networks require additional payloads for authentication from using Return to Service. Workaround: Create a configuration profile with a single Wi-Fi payload, then configure Return to Service with that configuration profile. Then, edit the configuration profile and add additional payloads.
The profile is distributed to the devices in the scope.
You can now create a Return to Service configuration in the Jamf Pro API.