Create an API key

POST
/v1/api-keys

The key itself is returned once, in this response, and cannot be read again.

Authorization

apiKey
headerAuthorizationBearer <token>

An API key from the Developers page. rhq_test_ keys reach the sandbox, rhq_live_ keys the live side.

Request Body

application/json
  1. body
name*string
Length1 <= length <= 60

Response Body

Created

application/json
  1. response

Created

id*string
name*string
prefix*string

The first characters of the key, to recognise it by

lastUsedAt*|
Formatdate-time
createdAt*string
Formatdate-time
key*string

The 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"}