Skip to main content
PUT
/
v1
/
keys
/
{keyID}
Update an API key
curl --request PUT \
  --url https://ai.liara.ir/v1/keys/{keyID} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "workspaces": [
    "<string>"
  ],
  "enabled": true
}
'
{
  "message": "key updated."
}

Authorizations

Authorization
string
header
required

Enter the token with the Bearer: prefix, e.g. "Bearer abcde12345"

Path Parameters

keyID
string
required

The API key ID

Pattern: ^[a-f0-9]{24}$

Body

application/json
name
string

New name for the API key

Required string length: 3 - 15
Pattern: ^[A-Za-z0-9._~| -]+$
workspaces
string[]

New array of workspace names

enabled
boolean

Enable or disable the API key

Response

Key updated

message
string
Example:

"key updated."