keys

Create another API key. The key is in this response only.

A new key on the same account, for example one per agent or machine, so one can be revoked without touching the others. Give it only what it needs: scopes (read, write, research, admin; all four when left out), credit_limit (the most its runs may spend over its life, 1 to 100000) and expires_in_days (1 to 365). The full key is in this response and nowhere else, ever. Needs admin. 409 key_limit_reached at 10 active keys; creation is limited per account per hour (429). MCP: create_key.

post/v1/keys

Request

  • Base URL: https://api.hookdetector.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.hookdetector.com/v1/keys
  • Auth: none declared

Headers

authorizationstring nullable

Bearer hd_... from POST /v1/accounts or POST /v1/keys

Request body

namestring nullable

up to 60 characters, to tell your keys apart; defaults to 'API key'

scopesstring[]

what the key may do: read, write, research, admin. Left out: all four. Give an agent only what it needs, for example ["read", "write", "research"]

credit_limitinteger

the most credits runs started with this key may spend over its life, 1 to 100000; left out: no cap

expires_in_daysinteger

the key stops working after this many days, 1 to 365; left out: never

Example request

{
  "name": "ci runner",
  "scopes": [
    "read",
    "write",
    "research"
  ],
  "credit_limit": 1000,
  "expires_in_days": 90
}

Response

Successful Response

key_idstring required
namestring required
prefixstring required
api_keystring required

shown this once; store it now

created_atstring required

Example response

{
  "api_key": "hd_yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy",
  "created_at": "2026-09-23T10:00:00.000000+00:00",
  "key_id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
  "name": "ci runner",
  "prefix": "hd_ZyXwVuTs"
}

Changes

No recorded changes to this operation across all 1 revision of this API.