There is no API for that currently, but you can use PowerShell cmdlets from the Exchange Online/SCC module: https://zcusa.951200.xyz/en-us/powershell/exchange/connect-to-scc-powershell?view=exchange-ps
For example, use the New-DlpCompliancePolicy
cmdlet to create a new DLP policy: https://zcusa.951200.xyz/en-us/powershell/module/exchange/new-dlpcompliancepolicy?view=exchange-ps