auto
will be translated to lax
or none
depending if Always Use HTTPS is enabled. Note that when using value none
, the secure attribute cannot be set to never
.always
indicates that the Secure attribute will be set in the Set-Cookie header, never
indicates that the Secure attribute will not be set, and auto
will set the Secure attribute depending if Always Use HTTPS is enabled.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.en-US
(English) will be used.true
, an accepted user will have session_duration minutes to browse the site. After that, they will have to go through the waiting room again. If false
, a user's session cookie will be automatically renewed on every request.true
, requests to the waiting room with the header Accept: application/json
will receive a JSON response object with information on the user's status in the waiting room as opposed to the configured static HTML page. This JSON response object has one property cfWaitingRoom
which is an object containing the following fields:inWaitingRoom
: Boolean indicating if the user is in the waiting room (always true).waitTimeKnown
: Boolean indicating if the current estimated wait times are accurate. If false, they are not available.waitTime
: Valid only when waitTimeKnown
is true. Integer indicating the current estimated time in minutes the user will wait in the waiting room. When queueingMethod
is random, this is set to waitTime50Percentile
.waitTime25Percentile
: Valid only when queueingMethod
is random and waitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 25% of users that gain entry the fastest (25th percentile).waitTime50Percentile
: Valid only when queueingMethod
is random and waitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 50% of users that gain entry the fastest (50th percentile). In other words, half of the queued users are expected to let into the origin website before waitTime50Percentile
and half are expected to be let in after it.waitTime75Percentile
: Valid only when queueingMethod
is random and waitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 75% of users that gain entry the fastest (75th percentile).waitTimeFormatted
: String displaying the waitTime
formatted in English for users. If waitTimeKnown
is false, waitTimeFormatted
will display unavailable.queueIsFull
: Boolean indicating if the waiting room's queue is currently full and not accepting new users at the moment.queueAll
: Boolean indicating if all users will be queued in the waiting room and no one will be let into the origin website.lastUpdated
: String displaying the timestamp as an ISO 8601 string of the user's last attempt to leave the waiting room and be let into the origin website. The user is able to make another attempt after refreshIntervalSeconds
past this time. If the user makes a request too soon, it will be ignored and lastUpdated
will not change.refreshIntervalSeconds
: Integer indicating the number of seconds after lastUpdated
until the user is able to make another attempt to leave the waiting room and be let into the origin website. When the queueingMethod
is reject
, there is no specified refresh time — it will always be zero.queueingMethod
: The queueing method currently used by the waiting room. It is either fifo, random, passthrough, or reject.isFIFOQueue
: Boolean indicating if the waiting room uses a FIFO (First-In-First-Out) queue.isRandomQueue
: Boolean indicating if the waiting room uses a Random queue where users gain access randomly.isPassthroughQueue
: Boolean indicating if the waiting room uses a passthrough queue. Keep in mind that when passthrough is enabled, this JSON response will only exist when queueAll
is true or isEventPrequeueing
is true because in all other cases requests will go directly to the origin.isRejectQueue
: Boolean indicating if the waiting room uses a reject queue.isEventActive
: Boolean indicating if an event is currently occurring. Events are able to change a waiting room's behavior during a specified period of time. For additional information, look at the event properties prequeue_start_time
, event_start_time
, and event_end_time
in the documentation for creating waiting room events. Events are considered active between these start and end times, as well as during the prequeueing period if it exists.isEventPrequeueing
: Valid only when isEventActive
is true. Boolean indicating if an event is currently prequeueing users before it starts.timeUntilEventStart
: Valid only when isEventPrequeueing
is true. Integer indicating the number of minutes until the event starts.timeUntilEventStartFormatted
: String displaying the timeUntilEventStart
formatted in English for users. If isEventPrequeueing
is false, timeUntilEventStartFormatted
will display unavailable.timeUntilEventEnd
: Valid only when isEventActive
is true. Integer indicating the number of minutes until the event ends.timeUntilEventEndFormatted
: String displaying the timeUntilEventEnd
formatted in English for users. If isEventActive
is false, timeUntilEventEndFormatted
will display unavailable.shuffleAtEventStart
: Valid only when isEventActive
is true. Boolean indicating if the users in the prequeue are shuffled randomly when the event starts.json_response_enabled
is true and the request hits the waiting room, an example JSON response when queueingMethod
is fifo and no event is active could be:json_response_enabled
is true and the request hits the waiting room, an example JSON response when queueingMethod
is random and an event is active could be:true
, all the traffic that is coming to a route will be sent to the waiting room. No new traffic can get to the route once this field is set and estimated time will become unavailable.queue_all
is enabled or an event is prequeueing, users in the waiting room will not be accepted to the origin. These users will always see a waiting room page that refreshes automatically. The valid queueing methods are:fifo
(default): First-In-First-Out queue where customers gain access in the order they arrived.random
: Random queue where customers gain access randomly, regardless of arrival time.passthrough
: Users will pass directly through the waiting room and into the origin website. As a result, any configured limits will not be respected while this is enabled. This method can be used as an alternative to disabling a waiting room (with suspended
) so that analytics are still reported. This can be used if you wish to allow all traffic normally, but want to restrict traffic during a waiting room event, or vice versa.reject
: Users will be immediately rejected from the waiting room. As a result, no users will reach the origin website while this is enabled. This can be used if you wish to reject all traffic while performing maintenance, block traffic during a specified period of time (an event), or block traffic while events are not occurring. Consider a waiting room used for vaccine distribution that only allows traffic during sign-up events, and otherwise blocks all traffic. For this case, the waiting room uses reject
, and its events override this with fifo
, random
, or passthrough
. When this queueing method is enabled and neither queueAll
is enabled nor an event is prequeueing, the waiting room page will not refresh automatically.true
, the traffic will not go to the waiting room.{
"cookie_attributes": {
"samesite": "auto",
"secure": "auto"
},
"custom_page_html": "{{#waitTimeKnown}} {{waitTime}} mins {{/waitTimeKnown}} {{^waitTimeKnown}} Queue all enabled {{/waitTimeKnown}}",
"default_template_language": "es-ES",
"description": "Production - DO NOT MODIFY",
"disable_session_renewal": false,
"host": "shop.example.com",
"json_response_enabled": false,
"name": "production_webinar",
"new_users_per_minute": 200,
"path": "/shop/checkout",
"queue_all": true,
"queueing_method": "fifo",
"session_duration": 5,
"suspended": false,
"total_active_users": 200
}
curl --location --request PATCH 'https://api.cloudflare.com/client/v4/zones//waiting_rooms/' \
--header 'Content-Type: application/json' \
--data-raw '{
"cookie_attributes": {
"samesite": "auto",
"secure": "auto"
},
"custom_page_html": "{{#waitTimeKnown}} {{waitTime}} mins {{/waitTimeKnown}} {{^waitTimeKnown}} Queue all enabled {{/waitTimeKnown}}",
"default_template_language": "es-ES",
"description": "Production - DO NOT MODIFY",
"disable_session_renewal": false,
"host": "shop.example.com",
"json_response_enabled": false,
"name": "production_webinar",
"new_users_per_minute": 200,
"path": "/shop/checkout",
"queue_all": true,
"queueing_method": "fifo",
"session_duration": 5,
"suspended": false,
"total_active_users": 200
}'
{
"errors": [],
"messages": [],
"result": {
"cookie_attributes": {
"samesite": "auto",
"secure": "auto"
},
"created_on": "2014-01-01T05:20:00.12345Z",
"custom_page_html": "{{#waitTimeKnown}} {{waitTime}} mins {{/waitTimeKnown}} {{^waitTimeKnown}} Queue all enabled {{/waitTimeKnown}}",
"default_template_language": "es-ES",
"description": "Production - DO NOT MODIFY",
"disable_session_renewal": false,
"host": "shop.example.com",
"id": "699d98642c564d2e855e9661899b7252",
"json_response_enabled": false,
"modified_on": "2014-01-01T05:20:00.12345Z",
"name": "production_webinar",
"new_users_per_minute": 200,
"next_event_prequeue_start_time": "2021-09-28T15:00:00.000Z",
"next_event_start_time": "2021-09-28T15:00:00.000Z",
"path": "/shop/checkout",
"queue_all": true,
"queueing_method": "fifo",
"session_duration": 5,
"suspended": false,
"total_active_users": 200
},
"success": true
}