> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.benchling.com/in-vivo/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.benchling.com/in-vivo/_mcp/server.

# Create a study

POST https://acme-api.invivo.benchling.com/api/public/v1/studies
Content-Type: application/json

Creates a study owned by your team.

Reference: https://docs.benchling.com/in-vivo/studies/study-create

## Authentication

- OAuth2 — send the obtained token as `Authorization: Bearer <token>`

## Request

### Body (application/json)

This endpoint expects a StudyCreateV1.

- `name` (string, required) — The name of the study.
- `type` (enum, required) — 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: `internal`, `external`
- `author_id` (string, required) — Unique identifier for a user.
- `study_code_id` (string, optional, nullable) — The unique identifier of the study code to draw the study's code from. Must belong to your team.
- `started_on` (date, optional, nullable) — The start date of the study.
- `project_id` (string, optional, nullable) — The project to assign the study to. Must belong to your team.
- `timezone` (string, optional, nullable) — The timezone of the study, as an IANA timezone identifier.
- `owner_id` (string, optional, nullable) — The owner of the study. Must be an active user on your team and must differ from `author_id`.
- `team` (list of StudyTeamV1, optional, nullable) — The team of the study. May not include the author or owner, and every user must be active on your team.
- `metadata` (map from string to any, optional, nullable) — The metadata associated to the study. Validated against your team's `study_meta` glossary.

## Response

### 201

The study was created.

- `id` (string, required) — Unique identifier for a study.
- `name` (string, required) — The name of the study.
- `code` (string, required, nullable) — The code of the study.
- `study_code_id` (string, required, nullable) — The unique identifier of the study code template.
- `type` (enum, required) — 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: `internal`, `external`
- `status` (enum, required) — Review status of a study.
  - Allowed values: `awaiting_approval`, `in_progress`, `rejected`
- `description` (string, required, nullable) — The description of the study.
- `timezone` (string, required, nullable) — The timezone of the study, as an IANA timezone identifier.
- `metadata` (map from string to any, required, nullable) — The metadata associated to the study.
- `author` (StudyAuthorUserV1, required, nullable) — The author of the study.
- `owner` (StudyAuthorUserV1, required, nullable) — The owner of the study.
- `project` (ProjectV1, required, nullable) — The project of the study.
- `started_on` (date, required) — Calendar date with no time or offset component, in ISO-8601 form.
- `tracking_day_base` (integer, required, nullable) — The day number assigned to the study's start date, from which all subsequent tracking days are counted.
- `completed_at` (datetime, required, nullable) — The completed timestamp of the study.
- `canceled_at` (datetime, required, nullable) — The canceled timestamp of the study.
- `created_at` (datetime, required) — UTC timestamp with microsecond precision, always suffixed with `Z`, in the form `yyyy-MM-ddTHH:mm:ss.SSSSSSZ`.
- `updated_at` (datetime, required) — UTC timestamp with microsecond precision, always suffixed with `Z`, in the form `yyyy-MM-ddTHH:mm:ss.SSSSSSZ`.
- `team` (list of StudyUserNestedV1, required) — The team of the study. Empty when the study has no team members.

## Errors

### 400 Bad Request Error

The request was rejected. Validation failures return a `ValidationErrorResponse`; an unrecognised `X-Studies-Api-Version` header returns an `AuthErrorResponse` with the code `invalid_header`.

- `BadRequestErrorResponse`

### 401 Unauthorized Error

Authentication failed. The body is normally empty; when an otherwise valid access token is missing required claims the body is an `AuthErrorResponse` with the code `invalid_token`.

- `any`

### 403 Forbidden Error

The access token does not grant the scopes this operation requires. The body is normally empty; when the token's team is missing or deleted the body is an `AuthErrorResponse` with the code `invalid_data`.

- `any`

### 429 Too Many Requests Error

A rate limit was exceeded. Retry once the window resets; no `Retry-After` header is sent, so use `X-RateLimit-Reset`.

- `error` ("rate_limit_exceeded", required) — A machine-readable error code.
- `message` (string, required) — A human-readable explanation of the failure.

## Types

### StudyTeamV1

A team membership to assign to a study. The study's author and owner may not be listed as team members.

- `user_id` (string, required) — Unique identifier for a user.
- `access` (enum, required) — Level of access a team member has to a study.
  - Allowed values: `read`, `write`

### StudyAuthorUserV1

A user referenced as the author or owner of a study.

- `id` (string, required) — Unique identifier for a user.
- `name` (string, required) — The name of the user.
- `email` (string, required) — The email address of the user.
- `timezone` (string, required) — The timezone of the user. Defaults to `UTC` when the user has none set.

### ProjectV1

A project that groups related studies.

- `id` (string, required) — Unique identifier for a project.
- `name` (string, required) — The name of the project.
- `metadata` (map from string to any, required, nullable) — The metadata associated to the project.
- `created_at` (datetime, required) — UTC timestamp with microsecond precision, always suffixed with `Z`, in the form `yyyy-MM-ddTHH:mm:ss.SSSSSSZ`.
- `updated_at` (datetime, required) — UTC timestamp with microsecond precision, always suffixed with `Z`, in the form `yyyy-MM-ddTHH:mm:ss.SSSSSSZ`.

### StudyUserNestedV1

A member of a study's team, as embedded in a study response.

- `id` (string, required) — Unique identifier for a user.
- `name` (string, required) — The name of the user.
- `email` (string, required) — The email address of the user.
- `timezone` (string, required) — The timezone of the user. Defaults to `UTC` when the user has none set.
- `type` (enum, required) — The role a user holds on a study. Derived from the study's author and owner assignments; every other member is `team`.
  - Allowed values: `author`, `owner`, `team`
- `access` (enum, required, nullable) — The access the user has to the study. Null for users whose membership is implied by being the author or owner.
  - Allowed values: `read`, `write`

### ValidationErrorResponse

Returned when a request body or parameter fails validation.

- `message` (string, required) — A summary of the failure.
- `errors` (map from string to list of string, required) — Failure messages keyed by the offending field, using the field's name as it appears on the wire. Nested fields are dotted, e.g. `schedule.duration`.

### AuthErrorResponse

Returned when a request is rejected during authentication, before it is processed.

- `error` (enum, required) — A machine-readable error code.
  - Allowed values: `invalid_header`, `invalid_token`, `invalid_data`
- `error_description` (string, required) — A human-readable explanation of the failure.

### ProblemDetail

An RFC 9457 problem detail, returned when a request is rejected before it reaches a controller method — most commonly an unparseable or absent JSON body. Unlike the rest of this API, null members are omitted rather than serialised as `null`.

- `title` (string, required) — A short, human-readable summary of the problem type.
- `status` (integer, required) — The HTTP status code, repeated in the body.
- `detail` (string, required) — A human-readable explanation specific to this occurrence.
- `instance` (string, required) — The path of the request that produced the problem.

## Examples

**Request**

```json
{
  "name": "Benchling In Vivo",
  "type": "internal",
  "author_id": "usr_72aeLmlraBB7Ekzu2zTsMW",
  "study_code_id": "sdc_n6vkWmmHoACZ15pTxztHk",
  "started_on": "2026-09-10",
  "project_id": "pjt_7IrvD7jMtAGvBl4AQUUr3g",
  "timezone": "America/Los_Angeles",
  "owner_id": "usr_5TSgutt2ZHPnKOdYbaNlRo",
  "team": [
    {
      "user_id": "usr_1Ua2eIYdPOlapHRHmg4rKQ",
      "access": "read"
    }
  ],
  "metadata": {
    "study-internal-id": "STUDY-1234"
  }
}
```

**Response**

```json
{
  "id": "sdy_6y9Wop1uArRjD93UiQ5qFy",
  "name": "Benchling In Vivo",
  "code": "CD-26-445",
  "study_code_id": "sdc_n6vkWmmHoACZ15pTxztHk",
  "type": "internal",
  "status": "in_progress",
  "description": "Efficacy study in a xenograft model.",
  "timezone": "America/Los_Angeles",
  "metadata": {
    "study-internal-id": "STUDY-1234"
  },
  "author": {
    "id": "usr_72aeLmlraBB7Ekzu2zTsMW",
    "name": "Jo Harper",
    "email": "jo.harper@example.com",
    "timezone": "UTC"
  },
  "owner": {
    "id": "usr_5TSgutt2ZHPnKOdYbaNlRo",
    "name": "Sam Ellis",
    "email": "sam.ellis@example.com",
    "timezone": "UTC"
  },
  "project": {
    "id": "pjt_7IrvD7jMtAGvBl4AQUUr3g",
    "name": "Oncology",
    "metadata": {
      "project-internal-id": "PROJ-1234"
    },
    "created_at": "2026-09-10T07:27:34.118856Z",
    "updated_at": "2026-09-10T07:27:34.118856Z"
  },
  "started_on": "2026-09-10",
  "tracking_day_base": 0,
  "completed_at": null,
  "canceled_at": null,
  "created_at": "2026-09-10T07:27:34.132511Z",
  "updated_at": "2026-09-10T07:27:34.132511Z",
  "team": [
    {
      "id": "usr_1Ua2eIYdPOlapHRHmg4rKQ",
      "name": "Robin Vance",
      "email": "robin.vance@example.com",
      "timezone": "UTC",
      "type": "team",
      "access": "read"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://acme-api.invivo.benchling.com/api/public/v1/studies"

payload = {
    "name": "Benchling In Vivo",
    "type": "internal",
    "author_id": "usr_72aeLmlraBB7Ekzu2zTsMW",
    "study_code_id": "sdc_n6vkWmmHoACZ15pTxztHk",
    "started_on": "2026-09-10",
    "project_id": "pjt_7IrvD7jMtAGvBl4AQUUr3g",
    "timezone": "America/Los_Angeles",
    "owner_id": "usr_5TSgutt2ZHPnKOdYbaNlRo",
    "team": [
        {
            "user_id": "usr_1Ua2eIYdPOlapHRHmg4rKQ",
            "access": "read"
        }
    ],
    "metadata": { "study-internal-id": "STUDY-1234" }
}
headers = {
    "Authorization": "<token>.",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://acme-api.invivo.benchling.com/api/public/v1/studies';
const options = {
  method: 'POST',
  headers: {Authorization: '<token>.', 'Content-Type': 'application/json'},
  body: '{"name":"Benchling In Vivo","type":"internal","author_id":"usr_72aeLmlraBB7Ekzu2zTsMW","study_code_id":"sdc_n6vkWmmHoACZ15pTxztHk","started_on":"2026-09-10","project_id":"pjt_7IrvD7jMtAGvBl4AQUUr3g","timezone":"America/Los_Angeles","owner_id":"usr_5TSgutt2ZHPnKOdYbaNlRo","team":[{"user_id":"usr_1Ua2eIYdPOlapHRHmg4rKQ","access":"read"}],"metadata":{"study-internal-id":"STUDY-1234"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```