API Bug? Error enabling rule: could not create API key - Unsupported scheme \"ApiKey\" for granting API Key

Authentication type is ApiKey.
Version: 7.14.1

When rule is already Enabled, there is no trouble calling the API endpoint for _enable. Returns Status Code 204.

But if rule is actually Disabled (and therefore need to Enable), an error occurs when attempting _enable action. Can call hit the _disable endpoint using same Header with same ApiKey value, the only material change is using the /_enable endpoint versus the /_disable one. (/_mute_all and /unmute_all both work as expected).

POST https://{kibana host}:5601/api/alerting/rule/{rule id}/_enable with 0-byte payload

Response...
{"statusCode":400,"error":"Bad Request","message":"Error enabling rule: could not create API key - Unsupported scheme \"ApiKey\" for granting API Key"}

Looking at docs here

This API supports Token-based authentication only.

Thanks for pointing that out @dosant. Will review the API docs more carefully. Updating custom PowerShell module now to add support for Token-based authentication.