Raw Data Export using UnityWebRequest causes 400 Bad Request

I am trying to set up a Unity Web Request to be able to export my custom analytics but run into a Bad Request error when trying to get it. I have looked through my code and everything seems to be set up correctly.

private const string PROJECT_ID = "*********************"; // Find this in your Operate dash board/Overview/UPID
    private const string API_KEY = "********************"; // Find this in your Operate dash board/Settings/Analytics Settings/Project Secret Key
    private const string BASE_URL = "https://analytics.cloud.unity3d.com";

    private void Start()
    {
        CreateExport("2020-03-09", "2020-04-08", "custom");
    }

    private void CreateExport(string startDate, string endDate, string dataSet)
    {
        Debug.Log("Start create export request.");
        string postUrl = BASE_URL + "/api/v2/projects/" + PROJECT_ID + "/rawdataexports";


        Dictionary<string, object> dataDictionary = new Dictionary<string, object>();
        dataDictionary.Add("startDate", startDate);
        dataDictionary.Add("endDate", endDate);
        dataDictionary.Add("format", "json");
        dataDictionary.Add("dataset", dataSet);
        string jsonData = Newtonsoft.Json.JsonConvert.SerializeObject(dataDictionary);
        Debug.Log(jsonData);

        UnityWebRequest webRequest = UnityWebRequest.Post(postUrl, jsonData);
        webRequest.SetRequestHeader("Authorization", "Basic " + Convert.ToBase64String(System.Text.Encoding.ASCII.GetBytes(PROJECT_ID + ":" + API_KEY)));
        webRequest.SetRequestHeader("Content-Type", "application/json");

        StartCoroutine(WaitForRequest(webRequest));
    }

    private IEnumerator WaitForRequest(UnityWebRequest webRequest)
    {
        yield return webRequest.SendWebRequest();

        // check for errors
        if (webRequest.error == null)
        {
            Debug.Log("UnityWebRequest Okay!: " + webRequest.downloadHandler.text);

            ReceivedData receivedData = JsonConvert.DeserializeObject<ReceivedData>(webRequest.downloadHandler.text);
            ProcessRequest(receivedData);
        }
        else
        {
            Debug.LogError("UnityWebRequest Error: " + webRequest.error);
        }
    }

I have checked to make sure that my data I am sending is being serialized correctly and it comes out raw as:
“{"startDate":"2020-03-09","endDate":"2020-04-08","format":"json","dataset":"custom"}” which looks correct as well.

Any help would be greatly appreciated. Any clarification needed by me just ask.

I would use Charles Proxy to troubleshoot this. First, get it working via curl, then compare it to your implementation. Is this for an admin app? I would not expect this in your game, every user would be unnecessarily waiting for the same data. What are you trying to accomplish? We may have other suggestions. If this is indeed for game play, you instead would want to process the export on your server, and make a real time web API available. Otherwise our servers might see this as a DOS attack if multiple users are making the same request frequently https://docs.unity3d.com/Manual/UnityAnalyticsRawDataExport.html and https://support.unity3d.com/hc/en-us/articles/115002917683-Using-Charles-Proxy-with-Unity