unprocessable_content
unprocessable_content
Description
The request is valid JSON and passed basic schema validation, but the operation is not valid for the resolved resource state or endpoint-specific business rule.
HTTP Status
422 Unprocessable Content
doc_url Format
The doc_url value is an absolute URL and changes by environment:
<docs-base-url>/errors/unprocessable_content
Typical Causes
- An enum-like field uses a syntactically valid string that is not supported by the endpoint.
- The request combines fields that are individually valid but invalid together.
- The requested action conflicts with the current resource state.
- On compartment-lifecycle endpoints, a management-mode, risk-level, mandate, delegation, or transfer rule is violated.
Compartment Lifecycle
Compartment-lifecycle endpoints return this code for semantic request failures after the target resource is resolved.
Typical messages:
Unknown riskLevel valueUnknown managementMode valuemandateId must be absent for self-invested compartmentsmandateId is required for discretionary-management compartmentsmandateId can only be updated on a discretionary-management compartmentCompartment must already use discretionary-managementSource and target compartments must differTarget compartment must belong to the same policyamount must be absent when the source compartment is self-investedfunds must be absent when the source compartment is discretionary-management
Example
Request:
http
POST /v1/compartment-lifecycle/policies/21000000-0000-4000-8000-000000000001/compartments
Content-Type: application/json
Authorization: Bearer <access-token>
{
"managementMode": "self-invested",
"mandateId": "12000000-0000-4000-8000-000000000001",
"name": "House purchase"
}Response:
json
{
"errors": [
{
"code": "unprocessable_content",
"message": "mandateId must be absent for self-invested compartments",
"doc_url": "https://docs.example.com/errors/unprocessable_content"
}
]
}How To Fix
- Check the endpoint-specific request rules in the API reference.
- Align the body with the current compartment management mode or target resource state.
- Retry with compatible fields, such as omitting
mandateIdfor self-invested compartments or usingamountonly for discretionary-management transfers.