Hi, is this helpful?
Under the fieldset ‘Security’ when you activate ‘custom’ you can set a Microflow.
In this Microflow you can add a input parameter with the type ‘String’ and name it ‘ApiKeyAuth’.
After that, at the end of the row after the Microflow in the security tab, you can manage ‘Parameters’.
In this, you can add your parameter as a Header parameter
Did you publish a REST service or consume a REST service?
When publishing you can use the authentication method ‘Custom’ and use a Microflow to handle the specific header key.