Create an API key
POST
The key itself is returned once, in this response, and cannot be read again.
apiKeyheader
AuthorizationBearer <token>An API key from the Developers page. rhq_test_ keys reach the sandbox, rhq_live_ keys the live side.
application/json- body
name*stringLength
1 <= length <= 60Created
application/json- response
Created
id*stringname*stringprefix*stringThe first characters of the key, to recognise it by
lastUsedAt*|Format
date-timecreatedAt*stringFormat
date-timekey*stringThe key itself. Store it now; it is not shown again
curl -X POST "https://example.com/v1/api-keys" \ -H "Content-Type: application/json" \ -d '{ "name": "production" }'{ "id": "key_01K6XJ4Q8ZT3M9R5V2B7WDHNCA", "name": "production", "prefix": "rhq_test_k3J9xQ", "lastUsedAt": null, "createdAt": "2026-10-07T11:04:31.000Z", "key": "rhq_test_k3J9xQ2mVb7TnY4wLc8HdR5sZ"}