Update rule
PATCH
https://api.vercel.com/ai-gateway/rulesUpdate a routing rule (enabled, action, or description)
https://api.vercel.com/ai-gateway/rules
const response = await fetch('https://api.vercel.com/ai-gateway/rules?teamId=string&slug=string', { method: 'PATCH', headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json', },});
const data = await response.json();console.log(data);Response
{ "action": { "reason": "Customer requested refund", "rewriteModel": "string" }, "createdAt": "123", "createdBy": "string", "deleted": "false", "description": "string", "enabled": "false", "match": { "model": "string" }, "ownerId": "example_id", "ruleId": "example_id", "type": "deny", "updatedAt": "123", "updatedBy": "string"}AuthorizationbearerToken
Default authentication mechanism
400Error
401The request is not authorized.
403You do not have permission to access this resource.
404Error
410Error
500Error