Skip to main content
POST
/realms/{realmId}/organizations/{organizationId}/business-policies/generate-policy

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

realmId
string
required
organizationId
string
required

Body

application/json
context
enum<string>
required
Available options:
PAYMENT,
SPEND_REVIEW,
TRAVEL
prompt
string
required
Required string length: 3 - 2000
includeWallets
boolean

Response

200 - application/json

Successful response

POST .../business-policies/generate-policy response.

policy is create-compatible: submit it to POST .../business-policies as it stands, minus actions.approvals[].name (the create route rejects that, exactly as it does on edit).

policy
object
required

POST .../business-policies/generate-policy response — a DRAFT policy. It is NOT persisted and has no id: submit it through the create route to save it (stripping actions.approvals[].name, which the create route rejects, exactly as the edit flow already does).

unsupported
string[]
required

Restrictions the request asked for that this policy does NOT express — for example a wallet whose id was not supplied. Empty when everything was captured.

Always show these before the draft is saved: the policy is otherwise valid and will govern MORE payments than the request described.