For Developers
Create CIDR
POST https://ed.link/api/v2/teams/:team_id/origin-policies/:policy_id/cidrs
Adds an IPv4 or IPv6 CIDR rule with an explicit allow or deny outcome.
Permissions
Requires the origin_policies.create system permission.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
:team_id | UUID | Yes | The ID of the team. |
:policy_id | UUID | Yes | The ID of the origin policy. |
Request Body
| Property | Type | Required | Description |
|---|---|---|---|
network | String | Yes | IPv4 or IPv6 network in CIDR notation (e.g. 203.0.113.0/24). |
outcome | String | Yes | Rule outcome: allowed or denied. |
label | String | No | Optional human-readable description. |
enabled | Boolean | No | Whether the rule is enabled (defaults to true). |
Sample Request
const response = await axios.post(
`https://ed.link/api/v2/teams/${team_id}/origin-policies/${policy_id}/cidrs`,
{
network: '203.0.113.0/24',
outcome: 'allowed',
label: 'Production VPN Gateway'
},
{
headers: {
authorization: `Bearer ${user_session_token}`,
'content-type': 'application/json'
}
}
);
Sample Response
{
"$data": {
"id": "18de75a1-4b12-4c8d-9011-30112fa50012",
"network": "203.0.113.0/24",
"outcome": "allowed",
"label": "Production VPN Gateway",
"system_controlled": false,
"enabled": true
}
}
