---
title: "Create an inventory"
method: POST
path: "/api/v1/account/organizations/{id}/inventories"
tags: ["Inventories"]
---

# Create an inventory

`POST /api/v1/account/organizations/{id}/inventories`

## Request

- Base URL: `https://pcp.example.com`
- URL: `https://pcp.example.com/api/v1/account/organizations/{id}/inventories`
- Auth: HTTP bearer

## Path parameters

- `id` string, uuid, required

## Request body

- InventoryGenericCreateRequest: InventoryGenericCreateRequest schema
  - `aws_configuration` object
    - `access_key` object
      - `provider` object, nullable
        - `id` string, uuid
      - `value` string
    - `credentials_type` string
    - `region` string
    - `secret_access_key` object
      - `provider` object, nullable
        - `id` string, uuid
      - `value` string
  - `gcp_configuration` object
    - `gcp_project_id` object
      - `provider` object, nullable
        - `id` string, uuid
      - `value` string
    - `gcp_service_account_json` object
      - `provider` object, nullable
        - `id` string, uuid
      - `value` string
  - `k8s_configuration` object
    - `k8s_filter_namespaces` string
    - `k8s_kubeconf` object
      - `provider` object, nullable
        - `id` string, uuid
      - `value` string
  - `name` string
  - `openshift_configuration` object
    - `openshift_filter_namespaces` string
    - `openshift_kubeconf` object
      - `provider` object, nullable
        - `id` string, uuid
      - `value` string
  - `openstack_configuration` object
    - `openstack_application_credential_id` object
      - `provider` object, nullable
        - `id` string, uuid
      - `value` string
    - `openstack_application_credential_secret` object
      - `provider` object, nullable
        - `id` string, uuid
      - `value` string
    - `openstack_auth_url` string
    - `openstack_domain_name` string
    - `openstack_password` object
      - `provider` object, nullable
        - `id` string, uuid
      - `value` string
    - `openstack_project_id` string
    - `openstack_project_name` string
    - `openstack_region` string
    - `openstack_username` object
      - `provider` object, nullable
        - `id` string, uuid
      - `value` string
  - `ovh_configuration` object
    - `application_key` object
      - `provider` object, nullable
        - `id` string, uuid
      - `value` string
    - `application_secret` object
      - `provider` object, nullable
        - `id` string, uuid
      - `value` string
    - `consumer_key` object
      - `provider` object, nullable
        - `id` string, uuid
      - `value` string
    - `endpoint` string
  - `scaleway_configuration` object
    - `scw_access_key` object
      - `provider` object, nullable
        - `id` string, uuid
      - `value` string
    - `scw_project_id` object
      - `provider` object, nullable
        - `id` string, uuid
      - `value` string
    - `scw_secret_key` object
      - `provider` object, nullable
        - `id` string, uuid
      - `value` string
  - `type` string, required
  - `vmware_configuration` object
    - `vsphere_password` object
      - `provider` object, nullable
        - `id` string, uuid
      - `value` string
    - `vsphere_server` object
      - `provider` object, nullable
        - `id` string, uuid
      - `value` string
    - `vsphere_tls_ca_bundle` object
      - `provider` object, nullable
        - `id` string, uuid
      - `value` string
    - `vsphere_tls_skip_verify` string
    - `vsphere_username` object
      - `provider` object, nullable
        - `id` string, uuid
      - `value` string

## Response `200`

OK

- InventoryCreateResponse: InventoryCreateResponse schema
  - `created_at` string, date-time
  - `id` string, uuid
  - `name` string

## 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)
