---
url: /errors/compartment_not_found.md
---
# `COMPARTMENT_NOT_FOUND`

`COMPARTMENT_NOT_FOUND`

## Description

The requested compartment does not exist in the current environment or tenant.

## HTTP Status

`404 Not Found`

## `doc_url` Format

The `doc_url` value is an absolute URL and changes by environment:

`<docs-base-url>/errors/compartment_not_found`

## Typical Causes

* The compartment ID is wrong or stale.
* The compartment was deleted or never created.
* The request targets the wrong tenant or environment.

## Example

Response:

```json
{
  "errors": [
    {
      "code": "COMPARTMENT_NOT_FOUND",
      "message": "Compartment with id: '00000000-0000-4000-8000-000000000000' was not found",
      "doc_url": "https://docs.example.com/errors/compartment_not_found"
    }
  ]
}
```

## How To Fix

1. Verify the compartment ID and request path.
2. Ensure the compartment exists in the target environment.
3. Retry with a valid existing identifier.
