@Bab bab , This is from Intune support. For your request, maybe you can try the following scripts:
import-Module Microsoft.Graph.Intune #import intune module
Update-MSGraphEnvironment -SchemaVersion beta #set schema version as beta
Connect-MSGraph #connect to MS grasp
$body = @{'message' = 'Please Contact me';
'phoneNumber' = '1111111111';
'footer'= 'Test'}
$bodyobj = New-Object -TypeName PSObject -Property $body
Invoke-MSGraphRequest -Url /deviceManagement/managedDevices/5cb***b603ea/enableLostMode -Content $bodyobj -HttpMethod POST
Note: Please change the related infromation as your reference.
Here is a link related with lost mode in Graph API for the referrence:
https://learn.microsoft.com/en-us/graph/api/intune-devices-manageddevice-enablelostmode?view=graph-rest-beta
Hope it can help.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.