---
title: "Create an inventory bundle"
method: POST
path: "/api/v1/bundles/inventories/{inventory_id}"
tags: ["Bundles"]
---

# Create an inventory bundle

`POST /api/v1/bundles/inventories/{inventory_id}`

## Request

- Base URL: `https://pcp.example.com`
- URL: `https://pcp.example.com/api/v1/bundles/inventories/{inventory_id}`
- Auth: HTTP bearer

## Path parameters

- `inventory_id` string, required

## Request body

- CreateInventoryBundleRequest: CreateInventoryBundleRequest schema
  - `auto_create` boolean
  - `environment` string, nullable
  - `fields` object
  - `integration_id` string, uuid
  - `resource_classes` string[], nullable
  - `resource_subclasses` string[], nullable
  - `tags` string[]

## Response `200`

OK

- InventoryBundleResponse: InventoryBundleResponse schema
  - `auto_create` boolean
  - `configuration` object, nullable
  - `created_at` string, date-time
  - `environment` string, nullable
  - `fields` object
  - `id` string, uuid
  - `integration_id` string, uuid
  - `inventory_id` string, uuid
  - `organization_id` string, uuid
  - `protocol` string, nullable
  - `resource_classes` string[]
  - `resource_subclasses` string[]
  - `tags` string[]
  - `type` string, nullable
  - `updated_at` string, date-time

## Other responses

- `400`: Bad Request _(validation or deserialization error)_
- `401`: Missing, invalid or expired credentials
- `403`: The caller may not do this
- `500`: Internal Server Error _(panics)_
- `default`

---

[API](https://skmtc.dev/plakar/apis/plakar-control-plane-api-v1.md) - [All operations](https://skmtc.dev/plakar/apis/plakar-control-plane-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/plakar/apis/plakar-control-plane-api-v1/revisions/2ac049494a01?raw)
