What is your actual problem? APIs that require an API key generally have that API key passed in the HTTP header as a custom header value (specified by the API docs). Therefore you'd just use the standard -H
parameter like you're already using for the content type. There is nothing special about the key. You don't use the authorization header.
$apiKey = "My api key"
curl ... -H "Company-Api-Key $apiKey"
If the API you're calling really does try to pass off an API key as the bearer token then they are really messed up. But the code works the same.
$apiKey = "My api key"
curl ... -H "Authorization: Bearer $apiKey"
But bear (in pun intended) mind that the authorization header is predefined and requires the format given. If the api key has spaces or other "invalid" characters then that will mess it up. Most of the time the actual value is encoded to prevent this. Read the docs for the API you're calling to determine how to properly send them the authentication information.