メインコンテンツへスキップ
POST
/
api
/
v0
/
service-accounts
/
{serviceAccountId}
/
api-keys
Create a service account API key
curl --request POST \
  --url https://api.factory.ai/api/v0/service-accounts/{serviceAccountId}/api-keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "expiresAt": 1
}
'
{
  "apiKey": {
    "id": "<string>",
    "value": "<string>",
    "fingerprint": "<string>",
    "name": "<string>",
    "expiresAt": 123
  }
}

承認

Authorization
string
header
必須

Factory API key or JWT token for authentication

パスパラメータ

serviceAccountId
string
必須

Service account ID

Minimum string length: 1

ボディ

application/json
name
string
必須
Required string length: 1 - 128
expiresAt
integer
必須範囲: x > 0

レスポンス

Response for status 201

apiKey
object
必須