Skip to main content
POST
Place a gate

Authorizations

Authorization
string
header
required

Your secret server API key (bs_dev_… or bs_production_…) with Gates API access: the gates:write scope, granted in the Console under Settings → Developer Tools → API Keys. Without it every Gates API call answers gates_scope_required. The organization and environment always come from the key. Site keys are refused.

Body

application/json
key
string
required

The gate key: lower-case letters, digits, _ or -, up to 64, starting with a letter or digit. What create-verification-link sends as gate. Unique per environment.

Pattern: ^[a-z0-9][a-z0-9_-]{0,63}$
Example:

"presale-nyc-1120"

name
string
required
Required string length: 1 - 120
Example:

"NYC presale"

message
string

The gate's line to people on the arrival card.

Maximum string length: 90
Example:

"Two tickets per fan. Real fans only."

gateType
enum<string>
default:human
Available options:
human,
age
ageThreshold
enum<integer>

Required when gateType is age (else age_threshold_required).

Available options:
13,
18,
21
preset
enum<string>

Pre-fill the policy from a preset; any policy fields override it.

Available options:
presale,
promo,
drop,
vote,
reservation,
claim
policy
object

A gate's policy document (versioned; validated whole). Unknown fields are refused. When preset is also sent on the create call, the preset pre-fills these fields and any field here overrides it.

Example:
destinationUrl
string<uri>

Where the gate sends a person after they pass. https:// only. Revealed to the person only after their request passes.

Maximum string length: 2048
Example:

"https://example.com/presale/nyc"

activate
boolean
default:false

Make the gate live in the same call.

Response

The placed gate. NOTE: handler errors also arrive here (HTTP 200) as data.error — codes: invalid_key (401 — missing, malformed or inactive key), gates_scope_required (403 — the key lacks Gates API access), org_not_found (404), age_threshold_required (400), invalid_policy (400), gate_key_taken (409), internal (500).

data
object
required