Skip to main content
PATCH
/
v2
/
api-keys
/
{api_key_id}
Update an API key
curl --request PATCH \
  --url https://api.orq.ai/v2/api-keys/{api_key_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "api_key_id": "<string>",
  "name": "<string>",
  "status": 123,
  "permission_mode": 123,
  "access": {},
  "project_scope": {
    "all": {},
    "single": {
      "project_id": "<string>"
    }
  },
  "constraints": {
    "expires_at": "2023-11-07T05:31:56Z",
    "budget": {
      "period": 123,
      "amount": 123,
      "token_limit": "<string>"
    },
    "rate_limit": {
      "requests_per_minute": 123
    }
  }
}
'
{
  "api_key": {
    "api_key_id": "<string>",
    "name": "<string>",
    "owner": {
      "user": {
        "user_id": "<string>"
      },
      "service_account": {}
    },
    "project_scope": {
      "all": {},
      "single": {
        "project_id": "<string>"
      }
    },
    "permission_mode": 123,
    "access": {},
    "token_prefix": "<string>",
    "status": 123,
    "constraints": {
      "expires_at": "2023-11-07T05:31:56Z",
      "budget": {
        "period": 123,
        "amount": 123,
        "token_limit": "<string>"
      },
      "rate_limit": {
        "requests_per_minute": 123
      }
    },
    "created_by_id": "<string>",
    "updated_by_id": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "last_used_at": "2023-11-07T05:31:56Z",
    "legacy_token_family": 123,
    "legacy_key_id": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.orq.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

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

Path Parameters

api_key_id
string
required

API key id to update.

Body

application/json
api_key_id
string

API key id to update.

name
string

New name. Omit to keep current.

status
integer<enum>

New lifecycle status. Omit to keep current.

permission_mode
integer<enum>

New permission preset. Omit to keep current.

access
object

Replacement access map. Required when changing to RESTRICTED; ignored otherwise. Provide an empty map to clear.

project_scope
object

New project scope. Omit to keep current.

constraints
object

Replacement constraints. Omit to keep current. Provide an empty ApiKeyConstraints message to clear all constraints.

Response

200 - application/json

OK

api_key
object

Updated api-key.