cURL
curl --request POST \ --url http://localhost:63372/api/captain/auth/api-keys \ --header 'Content-Type: application/json' \ --cookie captain_session= \ --data ' { "name": "CI Pipeline" } '
{ "id": "uuid", "name": "CI Pipeline", "key": "cptn_abcdef...", "prefix": "cptn_abcdef" }
Create a new API key with cptn_ prefix. The full key is only returned once - store it securely.
HMAC-signed session cookie returned by /api/captain/auth/login. Valid for 7 days. Invalidated when password changes.
"CI Pipeline"
API key created. The key field is only returned once.
"uuid"
Full API key. Only returned once - store securely.
"cptn_abcdef..."
"cptn_abcdef"