> ## Documentation Index
> Fetch the complete documentation index at: https://developers.portao3.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

# /realms/{realmId}/organizations/{organizationId}/business-policies



## OpenAPI

````yaml /api-reference/platform.openapi.json post /realms/{realmId}/organizations/{organizationId}/business-policies
openapi: 3.0.3
info:
  title: Platform
  version: 1.0.0
  description: >-
    Portão 3 platform API. Generated by tools/openapi from code (routes +
    security) and the hand-written spec (request/response bodies). Confidence
    tiers: generated:typed=64 copied:manual=6 unknown=68.
servers:
  - url: https://api.platform.v2.portao3.com.br/
    description: production
  - url: https://api.platform.dev.3pers.com.br/
    description: development
security:
  - bearerAuth: []
tags:
  - name: Wallets
  - name: Cards
  - name: PIX
  - name: PIX Keys (DICT)
  - name: Boleto
  - name: Transfers
  - name: Batch Payments
  - name: Scheduled Payments
  - name: Transactions & Statements
  - name: Invoices
  - name: Contracts & Deals
  - name: Billing
  - name: Notifications
  - name: Files
  - name: Users
  - name: Business Policies
  - name: Policy Request
  - name: Vehicles
paths:
  /realms/{realmId}/organizations/{organizationId}/business-policies:
    post:
      tags:
        - Business Policies
      summary: /realms/{realmId}/organizations/{organizationId}/business-policies
      operationId: postRealmsByRealmIdOrganizationsByOrganizationIdBusinessPolicies
      parameters:
        - name: realmId
          in: path
          required: true
          schema:
            type: string
        - name: organizationId
          in: path
          required: true
          schema:
            type: string
      responses:
        '201':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  realmId:
                    type: string
                  organizationId:
                    type: string
                  context:
                    type: string
                    enum:
                      - PAYMENT
                      - SPEND_REVIEW
                      - TRAVEL
                    description: The business surface a policy governs.
                  name:
                    type: string
                  description:
                    type: string
                  order:
                    type: number
                    description: Evaluation sorts ascending; first match wins.
                  status:
                    type: string
                    enum:
                      - ACTIVE
                      - DISABLED
                  actions:
                    type: object
                    properties:
                      hierarchy:
                        type: boolean
                        description: true = approvals resolve one-by-one in array order.
                      autoAction:
                        type: string
                        enum:
                          - APPROVE
                          - DENY
                          - NONE
                        description: >-
                          What happens when a policy matches:

                          - `APPROVE` — allowed outright, no policy-request

                          - `DENY` — refused outright

                          - `NONE` — an approval flow is required (`approvals`
                          must be non-empty)
                      approvalDeadlineHours:
                        type: number
                        description: >-
                          Feeds the policy-request `approvalDeadline` (default
                          72).
                      moveBalance:
                        type: object
                        properties:
                          addBalance:
                            type: boolean
                          fromAccountId:
                            type: string
                            description: Required when `addBalance` is true.
                          fromWalletId:
                            type: string
                            description: Required when `addBalance` is true.
                        required:
                          - addBalance
                      approvals:
                        type: array
                        items:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - USER
                                - GROUP
                            id:
                              type: string
                              description: >-
                                userId when type=USER, identity groupId when
                                type=GROUP.
                            name:
                              type: string
                              description: >-
                                Display name / group name, snapshotted for the
                                UI.
                          required:
                            - type
                            - id
                            - name
                        description: >-
                          Non-empty when autoAction=NONE; empty/absent
                          otherwise.
                    required:
                      - hierarchy
                      - autoAction
                  conditions:
                    type: object
                    properties:
                      logic:
                        type: string
                        enum:
                          - AND
                          - OR
                      groups:
                        type: array
                        items:
                          type: object
                          properties:
                            logic:
                              type: string
                              enum:
                                - AND
                                - OR
                            dependsOn:
                              type: array
                              items:
                                type: string
                            items:
                              type: array
                              items:
                                type: object
                                properties:
                                  operator:
                                    type: string
                                    description: >-
                                      Same ConditionOperator union the security
                                      rules use (incl. LLM_EVALUATE).
                                  field:
                                    type: string
                                  maskType:
                                    type: string
                                  dynamicFieldValue:
                                    type: string
                                  value: {}
                                required:
                                  - operator
                                  - field
                          required:
                            - logic
                            - items
                        description: >-
                          An EMPTY array matches unconditionally — the
                          catch-all/default policy.
                    required:
                      - logic
                      - groups
                  createdAt:
                    anyOf:
                      - type: string
                      - type: string
                        format: date-time
                  updatedAt:
                    anyOf:
                      - type: string
                      - type: string
                        format: date-time
                required:
                  - id
                  - realmId
                  - organizationId
                  - context
                  - name
                  - order
                  - status
                  - actions
                  - conditions
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````