Skip to main content
PATCH
/
access-keys
/
{id}
Update an AI Gateway access key
curl --request PATCH \
  --url https://api.ngrok.ai/access-keys/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "metadata": "<string>",
  "accessKeyConfigurationId": "<string>"
}
'
{
  "id": "<string>",
  "uri": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "createdBy": {
    "id": "<string>",
    "uri": "<string>"
  },
  "lastUpdatedBy": {
    "id": "<string>",
    "uri": "<string>"
  },
  "keyRedacted": "<string>",
  "name": "<string>",
  "description": "<string>",
  "metadata": "<string>",
  "token": "<string>",
  "lastUsed": "2023-11-07T05:31:56Z",
  "accessKeyConfiguration": {
    "id": "<string>",
    "uri": "<string>",
    "name": "<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

Unique identifier for an AI Gateway access key.

Body

application/json
name
string | null

User-friendly label for this access key.

Maximum string length: 255
description
string | null

Human-readable description of this access key.

Maximum string length: 255
metadata
string | null

Arbitrary user-defined metadata for this access key.

Maximum string length: 4096
accessKeyConfigurationId
string | null

ID of an access key configuration. Set to null to revert to allow-all scope.

Response

The updated AI Gateway access key.

id
string
required

Unique identifier for this access key.

uri
string
required

URI of this AI Gateway Access Key API resource.

createdAt
string<date-time>
required

Timestamp when the access key was created.

updatedAt
string<date-time>
required

Timestamp when the access key was last updated.

createdBy
object
required
lastUpdatedBy
object
required
keyRedacted
string
required

Redacted display form of the access key token.

name
string

User-friendly label for this access key.

description
string

Human-readable description of this access key.

metadata
string

Arbitrary user-defined metadata for this access key.

token
string

Plaintext access key token. Only returned when the key is first created.

lastUsed
string<date-time> | null

Timestamp when the access key was last used.

accessKeyConfiguration
object

Linked access key configuration, or null for allow-all scope.