AppAIGatewayDocs
API referenceAdmin management keys

Create a management key

POST
/v1/admin/keys

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.

Authorization

ConsoleSession
agw_identity_auth.session_token<token>

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",    "plaintext": "string"  }}