Create node access rule
create_node_access_ruleAdd an IP or Origin allowlist rule to a Global node.
New rules are deactivated and do nothing until activated. Active IP rules limit which client IPs can call the node; active origin rules limit which Origin headers it accepts. With both kinds active, a request must pass both. Everything else gets HTTP 403 within about 10 seconds. Rules don't affect the Chainstack API, so they can always be changed or deactivated with these tools.
Before activating, confirm with the user that the IP rules cover every IP that calls the node (servers, CI, their own machine); you can't check this. Origin rules are for browser-only access: once one is active, every request without an Origin header (servers, scripts, curl) is blocked, even from an allowed IP.
If an identical rule exists, it is returned instead of a duplicate.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | For ip, one IPv4 or IPv6 address (no CIDR ranges). For origin, a host name without scheme or path: example.com, *.example.com (the domain and its subdomains), or * (any origin). Up to 65 characters. | |
| node_id | Yes | Node ID (e.g., ND-123-456-789). | |
| activate | No | Also activate the rule. Only after the user confirms the allowlist. | |
| rule_type | Yes | ip or origin. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rule | Yes | ||
| created | No | ||
| message | Yes | ||
| warnings | No |