I'm using grafana cloud v8.5.2. I want to create a dashboard with alerts using HTTP API

I’m trying to create a dashboard with alert using grafana http dashboard api. I got all my alerts using swagger endpoint(api/ruler/grafana/api/v1/rules). But when i’m posting the dashboard json file with alerts it is not working. Please can anyone post correct structure of dashboard json file with alerts in it.

Can you confirm: are you using the new Unified Alerting platform or the legacy platform?