---
title: "Update an analysis"
method: PATCH
path: "/analyses/{analysis_id}"
tags: ["analyses"]
---

# Update an analysis

`PATCH /analyses/{analysis_id}`

## Request

- Base URL: `https://{tenant_name}.benchling.com/api/v2-beta`
- URL: `https://{tenant_name}.benchling.com/api/v2-beta/analyses/{analysis_id}`
- Auth: HTTP bearer

Update an analysis.

This endpoint can be used to attach DataFrames and Files to an analysis by providing file and/or data frame
ids inside the `dataFrameIds` and `fileIds` elements. This will append the dataFramess and files to the analysis.

If attaching files:
1. Upload the files with the [Create a file](https://docs.benchling.com/docs/api/v2-beta/benchling-api-beta/files/create-file) endpoint
2. Use this endpoint to attach file ids via the `fileIds` array element

If attaching data frames:
1. Create the data frames from existing files using the [Create a data frame](https://docs.benchling.com/docs/api/v2-beta/benchling-api-beta/data-frames/create-data-frame)
endpoint
2. Use this endpoint to attach data frame ids via the `dataFrameIds` array element

For more details and examples on building Analysis integrations, see our [developer guide](https://docs.benchling.com/docs/analyses-api-developer-guide).

## Path parameters

- `analysis_id` string, required

## Request body

- AnalysisUpdate
  - `dataFrameIds` string[]: IDs of the data frames to append to an analysis
  - `fileIds` string[]: IDs of the files to append to an analysis

## Response `200`

OK

- Analysis
  - `dataFrameIds` string[]
  - `fileIds` string[]
  - `folderId` string: ID of the folder that contains the analysis
  - `id` string

## Other responses

- `403`: Forbidden
- `404`: Not Found

---

[API](https://skmtc.dev/benchling/apis/benchling-api-beta.md) - [All operations](https://skmtc.dev/benchling/apis/benchling-api-beta/llms.txt) - [OpenAPI document](https://skmtc.dev/benchling/apis/benchling-api-beta/revisions/eba0b3d5b98e?raw)
