---
title: "Cross-object insert"
method: POST
path: "/v1/insert"
tags: ["CrossObject"]
---

# Cross-object insert

`POST /v1/insert`

Insert events and feedback across object types

## Request body

- CrossObjectInsertRequest
  - `experiment` object, nullable — A mapping from experiment id to a set of log events and feedback items to insert
  - `dataset` object, nullable — A mapping from dataset id to a set of log events and feedback items to insert
  - `project_logs` object, nullable — A mapping from project id to a set of log events and feedback items to insert

## Response `200`

Returns the inserted row ids for the events on each individual object

- CrossObjectInsertResponse
  - `experiment` object, nullable — A mapping from experiment id to row ids for inserted `events`
  - `dataset` object, nullable — A mapping from dataset id to row ids for inserted `events`
  - `project_logs` object, nullable — A mapping from project id to row ids for inserted `events`

## Other responses

- `400` — The request was unacceptable, often due to missing a required parameter
- `401` — No valid API key provided
- `403` — The API key doesn’t have permissions to perform the request
- `429` — Too many requests hit the API too quickly. We recommend an exponential backoff of your requests
- `500` — Something went wrong on Braintrust's end. (These are rare.)

## Changes

- **2024-09-30** `ac2727014d93` — 5 breaking, 43 info
  - the response's body became nullable
  - the response's body became nullable
  - the response's body became nullable
  - the response's body became nullable
  - …44 more
- **2024-08-08** `344821ebe826` — 4 info
  - added the new optional request property `experiment/additionalProperties/events/items/anyOf[#/components/schemas/InsertExperimentEventMerge]/error`
  - added the new optional request property `experiment/additionalProperties/events/items/anyOf[#/components/schemas/InsertExperimentEventReplace]/error`
  - added the new optional request property `project_logs/additionalProperties/events/items/anyOf[#/components/schemas/InsertProjectLogsEventMerge]/error`
  - added the new optional request property `project_logs/additionalProperties/events/items/anyOf[#/components/schemas/InsertProjectLogsEventReplace]/error`
- …earlier changes not shown

[Full history](https://skmtc.dev/braintrustdata/apis/braintrust-api/changes/v1/insert/post.md)

---

[API](https://skmtc.dev/braintrustdata/apis/braintrust-api.md) · [All operations](https://skmtc.dev/braintrustdata/apis/braintrust-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/braintrustdata/braintrust-api/revisions/9d216c8243fe/schema)
