admin

Make an access code to hand out. The code is in this response only.

Make a beta access code to send however you like. max_uses (1 to 100000, default 1) is how many accounts it may create; expires_in_days (1 to 365) is optional; note is your own. email binds it to one person: then only Google sign-in with that verified email redeems it, never REST or MCP; leave it out for a code that works on every door. The full code is in this response and nowhere else, ever. Needs the admin scope and an admin account. MCP: create_access_code.

post/v1/admin/codes

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/admin/codes
  • Auth: none declared

Headers

authorizationstring nullable

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

Request body

emailstring nullable

bind the code to this person: then only Google sign-in with this verified email redeems it, never REST or MCP. Leave out (the default) for a code anyone holding it may use on any door

notestring nullable

your own note, up to 500 characters

max_usesinteger nullable

how many accounts it may create, 1 to 100000; 1 when left out

expires_in_daysinteger nullable

1 to 365; never expires when left out

Response

Successful Response

code_idstring required
code_prefixstring required

the first 7 characters, to tell codes apart

emailstring nullable required
notestring nullable required
source'owner' | 'request' | 'proof' | 'other' required
max_usesinteger required
usesinteger required
expires_atstring nullable required
revoked_atstring nullable required
created_atstring required
usableboolean required

not revoked, not expired, not used up

codestring required

the code, shown here once and never again

messagestring required

Example response

{
  "code": "HD-7K3M-Q9TX",
  "code_id": "3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f",
  "code_prefix": "HD-7K3M",
  "created_at": "2026-09-23T10:00:00.000000+00:00",
  "max_uses": 5,
  "message": "This is the only time the full code is shown.",
  "note": "for the podcast crew",
  "source": "owner",
  "usable": true,
  "uses": 0
}

Changes

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