Create service-account API key
POST
/ai/admin/service-accounts/{id}/keysContract
Parameter | Value |
|---|---|
| Section | ai-admin |
| Authentication | CookieAuth |
| Consumes | application/json |
| Produces | application/json |
Parameters
2 parameters
Name | Location | Required | Type | Description |
|---|---|---|---|---|
| id | path | yes | integer | Service-account ID |
| request | body | yes | object | API key to create: name, scopes[] (an empty list uses the defaults), expiresAt |
{}
Responses
5 responses
Status | Description | Type |
|---|---|---|
200 | Successful response | object |
400 | Invalid service-account ID or request body, or unknown scope | object |
401 | Unauthorized | object |
404 | Service account not found | object |
500 | Internal server error | object |
{ "cursor": { "count": 0, "currentPage": 0, "totalPages": 0, "totalRows": 0 }, "data": {} }{ "data": {}, "error": "<string>" }{ "data": {}, "error": "<string>" }{ "data": {}, "error": "<string>" }{ "data": {}, "error": "<string>" }