API and UI not synced on Alerts

If I manually create an alert on a Grafana Dashboard then use the api to download the json for the dashboard, the alert is nowhere to be found. If I use the API to add an alert to the dashboard, the alert will not show up on the UI. When it comes to alerts the UI does not recognize what I do on the API and the API does not know what I do on the UI.