Generate a new API key

POST/api/v1/api-keys

Parameters

This endpoint does not accept parameters.

Responses

201Key created (full secret shown once)

Request

curl -X POST "https://api.knowledgetree.dev/api/v1/api-keys" \
  -H "Authorization: Bearer $KT_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "name": "ci-cd-pipeline", "expires_in_days": 90, "role": "editor" }'

Response

201Key created (full secret shown once)
Example response not yet documented.