@Anonymous As discussed offline, Custom logs API in Azure Monitor Logs is currently in preview. You need enable it for your subscription by submitting request here.
If the above solution has helped, kindly "Accept as Answer" or "Upvote" so that it would be beneficial for customers who are facing similar issue.