Adding users to a single app using the App Store Connect API v1

Hi,

I'm trying to add users using App Store Connect API 1.0. I can add a user OK, but if I try to add a user with access to just a single app it instead invites them with permissions for all apps. I've set allAppsVisible to false and specified the App ID for the app in the visibleApps relationships section. Am I missing something or setting the app to have access to incorrectly?


Sending this POST through Postman:


https://api.appstoreconnect.apple.com/v1/userInvitations

{
     "data": {
          "type": "userInvitations",
          "attributes": {
               "allAppsVisible": false,
               "firstName": "John",
               "lastName": "Appleseed",
               "email": "johnappleseed@apple.com",
               "roles": ["CUSTOMER_SUPPORT"]
          },
          "relationships": {
               "visibleApps": {
                    "data": [{
                         "id": "1234567890",
                         "type": "apps"
                    }]
               }
          }
     }
}


Thanks,
Tom