Skip to content

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 value
  • Unknown managementMode value
  • mandateId must be absent for self-invested compartments
  • mandateId is required for discretionary-management compartments
  • mandateId can only be updated on a discretionary-management compartment
  • Compartment must already use discretionary-management
  • Source and target compartments must differ
  • Target compartment must belong to the same policy
  • amount must be absent when the source compartment is self-invested
  • funds 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

  1. Check the endpoint-specific request rules in the API reference.
  2. Align the body with the current compartment management mode or target resource state.
  3. Retry with compatible fields, such as omitting mandateId for self-invested compartments or using amount only for discretionary-management transfers.