Skip to navigation

Create study groups

Beta

Creates between 1 and 100 treatment groups on the study. The request is validated as a whole; if any item is invalid, none are created. The study may not be archived or canceled.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

studyIdstringRequiredformat: "^sdy_[a-zA-Z0-9]{10,22}$"
The unique identifier of the study.

Headers

X-Studies-Api-VersionstringOptional

Request

The study groups to create.
namestringRequired1-255 characters
The name of the study group. May not be blank.
colorstringRequiredformat: "^#([0-9a-fA-F]{3}){1,2}$"

The color of the study group, as a three- or six-digit hex code.

max_animalsintegerRequired0-100
The maximum number of animals the study group may hold.
controlboolean or nullOptional
Indicates this group is the control. Defaults to false when omitted. A study has at most one control group, so a request may promote only one group and is rejected when the study already has one.
metadatamap from strings to any or nullOptional

Custom fields keyed by your team’s active study group metadata glossary slugs. Multi-select values must be arrays.

Response headers

X-RateLimit-LimitintegerOptional
The number of requests permitted in the current rate limit window.
X-RateLimit-RemainingintegerOptional

The number of requests still available in the current rate limit window. When several limits apply, this reflects the per-API-key limit, so a request can be rejected while this value is above zero.

X-RateLimit-ResetintegerOptional
The number of seconds until the current rate limit window resets.

Response

The created study groups.
datalist of objects
The study groups.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
429
Too Many Requests Error