/projects/{project_id}/api-keys. Its effective permission for that project
must be admin. The top-level /api-keys aliases remain useful for project
keys and for a PAT when project selection is unambiguous.
API key resource
POST /api-keys and
POST /projects/{project_id}/api-keys.
List API keys
Response:
Create API key
scope accepts read, write, or admin; omitting it defaults to admin
for backward compatibility. expires_in_days accepts 30, 90, 365, or
null for no expiry.
Response status is 201.
token immediately. It is not returned again.
For CI automation with a PAT, create a project key directly:
Revoke API key
key_id may include the key_ prefix. The response is the revoked API-key
resource with revoked_at set.