---
name: "mongoc_bulk_operation_insert"
section: "3"
platform: "linux"
package: "libmongoc-doc"
version: "1.30.4-1+deb13u3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/mongoc_bulk_operation_insert"
---

# mongoc\_bulk\_operation\_insert(3)

## SYNOPSIS

```
void
mongoc_bulk_operation_insert (mongoc_bulk_operation_t *bulk,
                              const bson_t *document);
```

Queue an insert of a single document into a bulk operation. The insert is not performed until *mongoc\_bulk\_operation\_execute()* is called.

This function is superseded by *mongoc\_bulk\_operation\_insert\_with\_opts()*.

## PARAMETERS

- •

  **bulk**: A *mongoc\_bulk\_operation\_t*.

- •

  **document**: A *bson\_t*.

## ERRORS

Errors are propagated via *mongoc\_bulk\_operation\_execute()*.

**SEE ALSO:**

```
Bulk Write Operations
```

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
