Hi @SBAM
There is no out of box feature that will help you in your scenario but you can write your custom logic in the function app (any database to store the mapping of WebSphere key corresponding to the subscription) or any other API services.
You can now call your middleware service from APIM using send-request policy and your service will return the right key that you can pass to your backend service.
References:
https://learn.microsoft.com/en-us/azure/api-management/api-management-advanced-policies#SendRequest
https://learn.microsoft.com/en-us/azure/api-management/api-management-sample-send-request