Editing API Keys

Request Address: /api/bot/api-keys/{id}

Request Method: PUT

Request Header 👇

NameTypeDescription

Authorization

String

The API key created

Request Body Parameter 👇

NameTypeIsRequiredDescription

Name

String

Yes

The name of API key for which you want to update

Request Path Parameter 👇

NameTypeIsRequiredDescription

id

int

Yes

The id of API key for which you want to update

Response Parameter 👇

NameTypeDescription

id

int

id

version

int

version

name

string

The name of API key

userId

string

The user id of OORT AI user

secretKey

string

The API key info

CreatedTime

string

The create time of API key

updatedTime

string

The update time of API key

deletedTime

string

The delete time of API key

lastUsed

int

The call times of this method

Response Example 👇

{
    "code": 0,
    "msg": "success",
    "data": {
        "createdTime": "2023-08-08T08:04:51.561Z",
        "updatedTime": "2023-08-08T08:25:26.515Z",
        "deletedTime": null,
        "version": 2,
        "id": 10,
        "userId": "426772239258484736",
        "name": "tiger-apikey-0808",
        "secretKey": "1c6c36dee4d3292eeb35b6c9662b2a89fa67b05af8ff7a6052b541b47bf3e210",
        "lastUsed": null
    }
}

{
    "code": 3000,
    "data": null,
    "msg": "The secret key does not exist."
}

Last updated