Skip to main content
PATCH
Update gateway token key

Authorizations

Authorization
string
header
required

Management-only Telnyx account credential.

Headers

Idempotency-Key
string
required

24h, scoped by account+method+path. Same key/body returns same outcome; changed body 409; in-progress 409 with Retry-After. Token-create replay returns 200 metadata WITHOUT secret.

Required string length: 1 - 128
Pattern: ^[A-Za-z0-9_-]+$
If-Match
string
required

Exact quoted resource-version ETag; an exact intermediary-weakened echo W/"n" is accepted. Wildcard, combined and malformed validators are rejected; stale 412; missing 428. HTTP field names are case-insensitive. Replayed idempotent result is checked first.

Required string length: 1 - 256
Pattern: ^[^\u0000-\u001f\u007f]+$

Path Parameters

id
string<uuid>
required

Body

application/json
max_parallel_requests
integer | null

Optional maximum concurrent reserved/dispatched cache misses across replicas. Null means no concurrency cap. Cache hits do not consume slots; unknown usage retains its budget hold without a slot.

Required range: 1 <= x <= 1000
name
string
Required string length: 1 - 256
Pattern: ^[^\u0000-\u001f\u007f]+$
max_budget
number | null

Omitted or null defaults to the maximum (1000 USD) (on a blocked key, null is kept until the key is unblocked); a value below the minimum (0.000001 USD) or above the maximum is rejected with 400 limit_out_of_range; a malformed value (negative, wrong type or precision) is 400 invalid_request. Block the key (blocked: true) to deny it; blocking is always accepted. The default budget is lifetime unless budget_duration is set. Budgets and spend are an enforcement guard computed at one flat placeholder rate for every Telnyx-hosted model (rate_version telnyx-reference-v1: 5 USD per million input and 15 USD per million output tokens), not the customer's bill; Telnyx Inference usage is billed separately at the model's actual price.

Required range: 0.000001 <= x <= 1000Must be a multiple of 0.000001
budget_duration
enum<string> | null
Available options:
1d,
7d,
30d,
null
tpm_limit
integer | null

Omitted or null defaults to the maximum (10000000) (on a blocked key, null is kept until the key is unblocked); a value below the minimum (1) or above the maximum is rejected with 400 limit_out_of_range; a malformed value (negative, wrong type or precision) is 400 invalid_request. Block the key (blocked: true) to deny it; blocking is always accepted.

Required range: 1 <= x <= 10000000
rpm_limit
integer | null

Omitted or null defaults to the maximum (6000) (on a blocked key, null is kept until the key is unblocked); a value below the minimum (1) or above the maximum is rejected with 400 limit_out_of_range; a malformed value (negative, wrong type or precision) is 400 invalid_request. Block the key (blocked: true) to deny it; blocking is always accepted.

Required range: 1 <= x <= 6000
allowed_models
string[] | null
Maximum array length: 1000
Required string length: 1 - 256
Pattern: ^[^\u0000-\u001f\u007f]+$
expires_at
string<date-time> | null
blocked
boolean
required_end_user_id
boolean

Require a nonempty caller-asserted end-user ID; not proof of identity. Omission preserves the current requirement.

Response

OK

data
object
required