APIKEY specification and validation fix

Pretty much did what was discussed in the issue.