Search + K

Command Palette

Search for a command to run...

Sign In

Update an AI Gateway Dynamic Route.

PATCH /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}
Copy endpoint
https://api.cloudflare.com/client/v4

Update an AI Gateway Dynamic Route.

Parameters

path Path Parameters

Name Type
account_id required
string
gateway_id required
string
id required
string

Request Body

application/json
{ name: string; }

Responses

200 application/json

Success

{ route: {
account_tag: string;
created_at: string;
deployment: {
comment?: string | null;
created_at: string;
deployment_id: string;
version_id: string;
}
;
elements: ({ id: string;outputs: { ... };type: "start"; } | {
id: string;
outputs: { ... };
properties: { ... };
type: "conditional";
}
| { id: string;outputs: { ... };type: "percentage"; } | {
id: string;
outputs: { ... };
properties: { ... };
type: "rate";
}
| {
id: string;
outputs: { ... };
properties: { ... };
type: "model";
}
| { id: string;outputs: { ... };type: "end"; }
)[]
;
gateway_id: string;
id: string;
modified_at: string;
name: string;
version: {
active: "true" | "false";
comment?: string | null;
created_at: string;
data: string;
version_id: string;
}
;
}
;success: boolean; }

Client Errors

400 application/json

Input Error

{ route: {
account_tag: string;
created_at: string;
elements: ({ id: string;outputs: { ... };type: "start"; } | {
id: string;
outputs: { ... };
properties: { ... };
type: "conditional";
}
| { id: string;outputs: { ... };type: "percentage"; } | {
id: string;
outputs: { ... };
properties: { ... };
type: "rate";
}
| {
id: string;
outputs: { ... };
properties: { ... };
type: "model";
}
| { id: string;outputs: { ... };type: "end"; }
)[]
;
gateway_id: string;
id: string;
modified_at: string;
name: string;
}
;success: boolean; }