Create a management key
Console session only, and requires the owner or admin role. A management key cannot create another one, so revoking a key you handed out ends that access for good. The plaintext agw_mgmt_ token is returned once, and never expires; the account's own deadline is the only one. A key created with the read grant cannot change your apps, providers or settings: a change its owner's role would otherwise allow is refused with 403 grant_insufficient, and the key may still revoke itself.
Authorization
ConsoleSession The console's session cookie. Admin requests from the console also send x-console-request: 1.
In: cookie
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/admin/keys" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{ "key": { "id": "string", "organizationId": "string", "userId": "string", "name": "string", "tokenHint": "string", "enabled": true, "expiresAt": "string", "createdAt": "string", "revokedAt": "string", "source": "string", "credentialType": "apiKey", "label": "string", "grant": "read", "clientId": "string", "plaintext": "string" }}