How to Manually Release an App Store Approved Version of Your App

Automating the release process. (For policy reason need to use curl cmd, not permitted to use fastlane/etc for this step)
Reading the App Store Connect API, I am uncertain what to pass as the "http body" during the POST action. What is AppStoreVersionReleaseRequestCreateRequest I would guess it goes in the "--data-raw" of curl cmd?

There doesn't seem to be example snippet.
Draft cmd:
curl --location --request POST "<appStoreVersionReleaseRequests-api>" --header "Authorization: Bearer ${JWT}" --header 'Content-Type: application/json' --data-raw '{ "key?": "value?" }'

REF https://developer.apple.com/documentation/appstoreconnectapi/manually_release_an_app_store_approved_version_of_your_app?changes=latest_major

Replies

There documentation is poor to put it mildly. After much trial and error here's what I determined is needed for the POST body:

{
    "data":
    {
        "type": "appStoreVersionReleaseRequests",
        "relationships":
        {
            "appStoreVersion":
            {
                "data":
                {
                    "id": "${the_id_of_the_version_to_release}",
                    "type": "appStoreVersions"
                }
            }
        }
    }
}

Your curl command would look like this:

curl -v -g -X 'POST' -H 'Authorization: Bearer ${JWT}' -H 'Content-Type: application/json' 'https://api.appstoreconnect.apple.com/v1/appStoreVersionReleaseRequests' --data '{"data":{"type":"appStoreVersionReleaseRequests","relationships":{"appStoreVersion":{"data":{"id": "${the_id_of_the_version_to_release}","type": "appStoreVersions"}}}}}'

Thanks for detailed reply Todd! I will give it a try on our next release at end of month and report back.