Cannot Generate File Upload Url in C# and Postman

Question:
While I can have the Wix API Playground generate an upload URL, I cannot succeed either in C# or Postman, even if the request body is the same in each platform.

I suspect the documentation about the relevant API endpoint is not accurate or complete. Because in the cURL example, the parameter sizeInBytes exists whereas it does not exist in the documentation. There may be missing headers that are not documented clearly in my request.

Product:
Wix Rest API

What are you trying to achieve:
I’m trying to upload the main images for my events. To my understanding from the Upload API documentation, first, I need to generate an upload URL for each event image.

What have you already tried:
The request body I use in the API Playground:

{
    "mimeType": "image/jpeg",
    "fileName": "some-file-name.jpg",
    "parentFolderId": "da32b4ff46c641e9a5466857ffaab347",
    "private": false,
    "labels": [
        "image",
        "mainimage",
        "eventimage"
    ],
    "externalInfo": {}
}

My code in C#:

using var client = new HttpClient();

// Set the authorization header and the base URI for the client
client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", _accessToken);
var requestUri = "https://www.wixapis.com/site-media/v1/files/generate-upload-url";

// Construct the JSON data for the body of the request
var fileUploadData = new
{
    MimeType = "image/jpeg",
    FileName = fileName,
    SizeInBytes = "2608831",
    ParentFolderId = parentFolderId,
    Private = false,
    Labels = labels
};

var jsonContent = JsonSerializer.Serialize(fileUploadData, new JsonSerializerOptions
{
    PropertyNamingPolicy = JsonNamingPolicy.CamelCase
});

// Send the POST request with JSON content
var content = new StringContent(jsonContent, Encoding.UTF8, "application/json");
var response = await client.PostAsync(requestUri, content);

// Read the response
if (response.IsSuccessStatusCode)
{
    Console.WriteLine("Request successful.");
    var responseContent = await response.Content.ReadAsStringAsync();
    Console.WriteLine(responseContent);

    var uploadUrlResponse = JsonSerializer.Deserialize<WixFileUploadResponse>(responseContent)!;
    return uploadUrlResponse.UploadUrl;
}
else
{
    Console.WriteLine($"Failed to send request: {response.StatusCode}");
    var errorContent = await response.Content.ReadAsStringAsync();
    Console.WriteLine(errorContent);

    return null!;
}

Additional information:
The API returns an HTML response including the error code 500 and tells nothing about what is wrong. Here is the relevant part of the response:

angular.module('wixErrorPagesApp').constant('staticsUrl', ' //static.parastorage.com/services/wix-public/1.299.0//');
angular.module('wixErrorPagesApp').constant('baseDomain', 'wix.com');
angular.module('wixErrorPagesApp').constant('language', 'en');
angular.module('wixErrorPagesApp').constant('errorCode',
{code: '500'
});
angular.module('wixErrorPagesApp').constant('data',
{});
angular.module('wixErrorPagesApp').constant('exceptionName', 'null');
angular.module('wixErrorPagesApp').constant('serverErrorCode', '-100');
angular.module('wixErrorPagesApp').constant('requestId', '1714708269.38048189920532217387');

Best place to report this is to the App Dev team: Wix Developers Login