Create Waiting Room Rule
POST/zones/{zone_id}/waiting_rooms/{waiting_room_id}/rules
Only available for the Waiting Room Advanced subscription. Creates a rule for a waiting room.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Create Waiting Room Rule
curl https://api.cloudflare.com/client/v4/zones/$ZONE_ID/waiting_rooms/$WAITING_ROOM_ID/rules \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
-d '{
"action": "bypass_waiting_room",
"expression": "ip.src in {10.20.30.40}",
"description": "allow all traffic from 10.20.30.40",
"enabled": true
}'{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": [
{
"id": "25756b2dfe6e378a06b033b670413757",
"action": "bypass_waiting_room",
"description": "allow all traffic from 10.20.30.40",
"enabled": true,
"expression": "ip.src in {10.20.30.40}",
"last_updated": "2014-01-01T05:20:00.12345Z",
"version": "1"
}
],
"result_info": {
"count": 1,
"page": 1,
"per_page": 20,
"total_count": 2000
}
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": [
{
"id": "25756b2dfe6e378a06b033b670413757",
"action": "bypass_waiting_room",
"description": "allow all traffic from 10.20.30.40",
"enabled": true,
"expression": "ip.src in {10.20.30.40}",
"last_updated": "2014-01-01T05:20:00.12345Z",
"version": "1"
}
],
"result_info": {
"count": 1,
"page": 1,
"per_page": 20,
"total_count": 2000
}
}