Skip to main content
PATCH
/
org
/
rules
/
{ruleId}
Update an organization rule
curl --request PATCH \
  --url https://api.onecli.sh/v1/org/rules/{ruleId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "hostPattern": "<string>",
  "pathPattern": "<string>",
  "enabled": true,
  "rateLimit": 123,
  "conditions": [
    {
      "target": "<string>",
      "operator": "<string>",
      "value": "<string>",
      "key": "<string>"
    }
  ]
}
'
{
  "success": true
}

Documentation Index

Fetch the complete documentation index at: https://onecli.sh/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

API key obtained from the dashboard or GET /user/api-key

Path Parameters

ruleId
string
required

Body

application/json
name
string
hostPattern
string
pathPattern
string | null
method
enum<string> | null
Available options:
GET,
POST,
PUT,
PATCH,
DELETE
action
enum<string>
Available options:
block,
rate_limit,
manual_approval
enabled
boolean
rateLimit
integer | null
rateLimitWindow
enum<string> | null
Available options:
minute,
hour,
day
conditions
object[] | null

Response

Rule updated

success
boolean