Skip to navigation

Create a study

Creates a study owned by your team.

Authentication

AuthorizationBearer

OAuth authentication of the form <token>.

Headers

X-Studies-Api-VersionstringOptional

Request

The attributes of the study to create.
namestringRequired1-255 characters
The name of the study.
typeenumRequired

Whether the study is run in-house or by an external partner. The all value accepted by some filters is not a valid study type and is never returned.

Allowed values:
author_idstringRequiredformat: "^usr_[a-zA-Z0-9]{10,22}$"
Unique identifier for a user.
study_code_idstring or nullOptionalformat: "^sdc_[a-zA-Z0-9]{10,22}$"
The unique identifier of the study code to draw the study's code from. Must belong to your team.
started_ondate or nullOptional
The start date of the study.
project_idstring or nullOptionalformat: "^pjt_[a-zA-Z0-9]{10,22}$"
The project to assign the study to. Must belong to your team.
timezonestring or nullOptional
The timezone of the study, as an IANA timezone identifier.
owner_idstring or nullOptionalformat: "^usr_[a-zA-Z0-9]{10,22}$"

The owner of the study. Must be an active user on your team and must differ from author_id.

teamlist of objects or nullOptional
The team of the study. May not include the author or owner, and every user must be active on your team.
metadatamap from strings to any or nullOptional

The metadata associated to the study. Validated against your team’s study_meta glossary.

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 study was created.
idstringformat: "^sdy_[a-zA-Z0-9]{10,22}$"
Unique identifier for a study.
namestring<=255 characters
The name of the study.
codestring or null<=255 characters
The code of the study.
study_code_idstring or nullformat: "^sdc_[a-zA-Z0-9]{10,22}$"
The unique identifier of the study code template.
typeenum

Whether the study is run in-house or by an external partner. The all value accepted by some filters is not a valid study type and is never returned.

Allowed values:
statusenum
Review status of a study.
Allowed values:
descriptionstring or null
The description of the study.
timezonestring or null
The timezone of the study, as an IANA timezone identifier.
metadatamap from strings to any or null
The metadata associated to the study.
authorobject or null
The author of the study.
ownerobject or null
The owner of the study.
projectobject or null
The project of the study.
started_ondate

Calendar date with no time or offset component, in ISO-8601 form.

tracking_day_baseinteger or null
The day number assigned to the study's start date, from which all subsequent tracking days are counted.
completed_atdatetime or null
The completed timestamp of the study.
canceled_atdatetime or null
The canceled timestamp of the study.
created_atdatetime

UTC timestamp with microsecond precision, always suffixed with Z, in the form yyyy-MM-ddTHH:mm:ss.SSSSSSZ.

updated_atdatetime

UTC timestamp with microsecond precision, always suffixed with Z, in the form yyyy-MM-ddTHH:mm:ss.SSSSSSZ.

teamlist of objects
The team of the study. Empty when the study has no team members.

Errors

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