?validate_only=true
as an optional query parameter to run validation only without persisting changes.{
"description": "New route for new prefix 203.0.113.1",
"nexthop": "203.0.113.1",
"prefix": "192.0.2.0/24",
"priority": 0,
"scope": {
"colo_names": [
"den01"
],
"colo_regions": [
"APAC"
]
},
"weight": 0
}
curl --location --request PUT 'https://api.cloudflare.com/client/v4/accounts//magic/routes/' \
--header 'Content-Type: application/json' \
--data-raw '{
"description": "New route for new prefix 203.0.113.1",
"nexthop": "203.0.113.1",
"prefix": "192.0.2.0/24",
"priority": 0,
"scope": {
"colo_names": [
"den01"
],
"colo_regions": [
"APAC"
]
},
"weight": 0
}'
{
"errors": [],
"messages": [],
"result": {
"modified": true,
"modified_route": {}
},
"success": true
}