Skip to main content

Create service-account API key

POST
/ai/admin/service-accounts/{id}/keys

Contract

Parameter
Value
Sectionai-admin
AuthenticationCookieAuth
Consumesapplication/json
Producesapplication/json

Parameters

2 parameters

Name
Location
Required
Type
Description
idpathyesintegerService-account ID
requestbodyyesobjectAPI key to create: name, scopes[] (an empty list uses the defaults), expiresAt
  • {}

Responses

5 responses

Status
Description
Type
200
Successful responseobject
400
Invalid service-account ID or request body, or unknown scopeobject
401
Unauthorizedobject
404
Service account not foundobject
500
Internal server errorobject
  • {
      "cursor": {
        "count": 0,
        "currentPage": 0,
        "totalPages": 0,
        "totalRows": 0
      },
      "data": {}
    }
  • {
      "data": {},
      "error": "<string>"
    }
  • {
      "data": {},
      "error": "<string>"
    }
  • {
      "data": {},
      "error": "<string>"
    }
  • {
      "data": {},
      "error": "<string>"
    }