PATCH
/
api
/
v1
/
workspace
/
{id}
/
api-key
/
{akid}
curl --request PATCH \
  --url https://prod.oneloop.ai/api/v1/workspace/{id}/api-key/{akid} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "enabled": true,
  "scopes": [
    {
      "id": "<string>",
      "representation": "<string>",
      "create": true,
      "read": true,
      "update": true,
      "del": true
    }
  ]
}'
{
  "apiKey": {
    "id": "<string>",
    "name": "<string>",
    "maskedKey": "<string>",
    "prefix": "<string>",
    "expiresAt": 1,
    "scopes": [
      {
        "id": "<string>",
        "representation": "<string>",
        "create": true,
        "read": true,
        "update": true,
        "del": true
      }
    ],
    "enabled": true,
    "customerId": "<string>",
    "deleted": true,
    "createdAt": "<string>",
    "updatedAt": "<string>",
    "lastUsedAt": "<string>",
    "billingId": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The workspace id.

akid
string
required

The API key id.

Body

application/json
name
string
enabled
boolean
scopes
object[]

Response

200
application/json
The edited key
apiKey
object
required