Skip to main content
PATCH
JavaScript

Authorizations

Authorization
string
header
required

Telnyx API key

Path Parameters

instance_id
string<uuid>
required

The Agent Gateway's id.

key_id
string
required

The key's id, a 64-character hash the instance stores in place of the key.

Pattern: ^[0-9a-f]{64}$

Body

application/json

A field left out stays as it is; null clears it.

name
string

A label for people.

Required string length: 1 - 100
models
string[]

The models the key may use. [] allows every model.

Maximum array length: 100
Required string length: 1 - 200
max_budget
number | null

The most the key may spend, in USD.

Required range: x >= 0
budget_resets_every
string | null

How often the spend resets.

Pattern: ^[1-9][0-9]{0,6}[smhd]$
Example:

"30d"

expires_in
string | null

How long from now until the key stops working.

Pattern: ^[1-9][0-9]{0,6}[smhd]$
Example:

"30d"

team_id
string<uuid> | null

Move the key to this team, or null to leave its team.

blocked
boolean

true makes the instance refuse the key; false lets it through again.

requests_per_minute
integer | null

The most requests the key may make per minute.

Required range: 1 <= x <= 2147483647
tokens_per_minute
integer | null

The most tokens the key may use per minute.

Required range: 1 <= x <= 2147483647
max_parallel_requests
integer | null

The most requests the key may have in flight at once.

Required range: 1 <= x <= 2147483647

Response

The updated key

data
object
required

A key on an instance, without its value.