curl -X PUT https://api.getversive.com/api/v1/studies/9b2f7c1e-4a4b-4f6e-9a1d-1c2d3e4f5a6b/quotas \
-H "Authorization: Bearer $VERSIVE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mode": "url_param",
"param_name": "group",
"buckets": [
{ "value": "1", "limit": 50 },
{ "value": "2", "limit": 50 }
],
"unmatched_param_policy": "reject"
}'
Quotas
Update study quotas
Replace the study-level quota configuration
PUT
/
studies
/
{id}
/
quotas
curl -X PUT https://api.getversive.com/api/v1/studies/9b2f7c1e-4a4b-4f6e-9a1d-1c2d3e4f5a6b/quotas \
-H "Authorization: Bearer $VERSIVE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mode": "url_param",
"param_name": "group",
"buckets": [
{ "value": "1", "limit": 50 },
{ "value": "2", "limit": 50 }
],
"unmatched_param_policy": "reject"
}'
Replaces the study’s quota configuration. Modes are mutually exclusive: send the full configuration for the mode you want, and any previous configuration is discarded. Question quotas are not affected.
string
required
The study ID.
string
required
off, fixed, or url_param.integer
Required in
fixed mode, not allowed otherwise. 0 closes the study to new participants.string
Required in
url_param mode, not allowed otherwise. Letters, digits, underscores, and hyphens only; up to 64 characters.array
Required in
url_param mode, not allowed otherwise. One { value, limit } per link value, up to 50, with unique values. Matching is exact and case-sensitive. A limit of 0 closes that value.string
default:"allow"
allow lets in participants whose link has no matching value (they don’t count toward any bucket); reject turns them away.Response
The saved configuration, same shape as Get study quotas.To check what a given link would do before sharing it,
POST /studies/{id}/quotas/evaluate with { "entry_params": { "group": "1" } } returns { allowed, reason, bucket } without recording anything.curl -X PUT https://api.getversive.com/api/v1/studies/9b2f7c1e-4a4b-4f6e-9a1d-1c2d3e4f5a6b/quotas \
-H "Authorization: Bearer $VERSIVE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mode": "url_param",
"param_name": "group",
"buckets": [
{ "value": "1", "limit": 50 },
{ "value": "2", "limit": 50 }
],
"unmatched_param_policy": "reject"
}'