http://waitingrooms.dev/preview/<uuid>
. You can use the following query parameters to change the state of the preview:force_queue
: Boolean indicating if all users will be queued in the waiting room and no one will be let into the origin website (also known as queueAll).queue_is_full
: Boolean indicating if the waiting room's queue is currently full and not accepting new users at the moment.queueing_method
: The queueing method currently used by the waiting room.force_queue=true
or event=prequeueing
— for other cases the request will pass through to the origin. For our preview, this will be a fake origin website returning "Welcome".event
: Used to preview a waiting room event.prequeue_start_time
and event_start_time
).event_start_time
and event_end_time
).shuffle_at_event_start
: Boolean indicating if the event will shuffle users in the prequeue when it starts. This can only be set to true if an event is active (event
is not none).http://waitingrooms.dev/preview/<uuid>?force_queue=false&queue_is_full=false&queueing_method=random&event=started&shuffle_at_event_start=true
waitTime
: Non-zero, positive integer indicating the estimated wait time in minutes. The default value is 10 minutes.http://waitingrooms.dev/preview/<uuid>?waitTime=50
to configure the estimated wait time as 50 minutes.waitTimeKnown
}} Acts like a boolean value that indicates the behavior to take when wait time is not available, for instance when queue_all is true.waitTimeFormatted
}} Estimated wait time for the user. For example, five minutes. Alternatively, you can use:waitTime
}} Number of minutes of estimated wait for a user.waitTimeHours
}} Number of hours of estimated wait for a user (Math.floor(waitTime/60)
).waitTimeHourMinutes
}} Number of minutes above the waitTimeHours
value (waitTime%60
).queueIsFull
}} Changes to true when no more people can be added to the queue.cfWaitingRoom
object described under the json_response_enabled
property in other Waiting Room API calls.{
"custom_html": "{{#waitTimeKnown}} {{waitTime}} mins {{/waitTimeKnown}} {{^waitTimeKnown}} Queue all enabled {{/waitTimeKnown}}"
}
curl --location --request POST 'https://api.cloudflare.com/client/v4/zones//waiting_rooms/preview' \
--header 'Content-Type: application/json' \
--data-raw '{
"custom_html": "{{#waitTimeKnown}} {{waitTime}} mins {{/waitTimeKnown}} {{^waitTimeKnown}} Queue all enabled {{/waitTimeKnown}}"
}'
{
"errors": [],
"messages": [],
"result": {
"preview_url": "http://waitingrooms.dev/preview/35af8c12-6d68-4608-babb-b53435a5ddfb"
},
"success": true
}