Skip to main content
POST
/
api-keys
Create API Key
curl --request POST \
  --url https://use.hoop.dev/api/api-keys \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "bob-the-bot",
  "groups": [
    "engineering"
  ]
}
'
{
  "created_at": "<string>",
  "created_by": "<string>",
  "deactivated_at": "<string>",
  "deactivated_by": "<string>",
  "groups": [
    "engineering"
  ],
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "key": "hpk_Ab3fX9kL...",
  "last_used_at": "<string>",
  "masked_key": "hpk_1nzb***************************************",
  "name": "ai-agent",
  "org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "active"
}

Documentation Index

Fetch the complete documentation index at: https://mintlify.hoop.dev/docs/llms.txt

Use this file to discover all available pages before exploring further.

Body

application/json

The request body resource

name
string
required

Human-readable name for the API key

Example:

"bob-the-bot"

groups
string[]

Groups to assign to this API key

Example:
["engineering"]

Response

Created

created_at
string

Creation timestamp

created_by
string

Subject of the admin who created this key

deactivated_at
string

Revocation timestamp

deactivated_by
string

Subject of the admin who revoked this key

groups
string[]

Groups assigned to this API key

Example:
["engineering"]
id
string<uuid>
read-only

Unique identifier

key
string

The generated API key. This is the only time the full key is shown.

Example:

"hpk_Ab3fX9kL..."

last_used_at
string

Timestamp of last usage

masked_key
string

Masked version of the API key for identification

Example:

"hpk_1nzb***************************************"

name
string

Human-readable name

Example:

"ai-agent"

org_id
string<uuid>
read-only

Organization ID

status
enum<string>

Current status of the API key

Available options:
active,
revoked