---
title: "checkOrgPolicyExplanation"
---

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

# checkOrgPolicyExplanation

Path: Forge API › policies

`POST /orgs/{org_id}/policy-explanations`

Explain a simulated decision: each check, each pass, each statement, and each condition term's value on each side. It takes the request `channel` as a simulation does (Api by default; Mcp explains rules on request.channel === "Mcp"). A decision that read a record you can't read is Withheld, with nothing of why.

## Path parameters

- `org_id` (`checkOrgPolicyExplanation.path.org_id`; string, required)
  - pattern: `^org_[0-7][0-9a-hjkmnp-tv-z]{25}$`

## Request body

_Required._

- `repo_id` (`checkOrgPolicyExplanation.repo_id`; string, required)
  - pattern: `^repo_[0-7][0-9a-hjkmnp-tv-z]{25}$`
- `user_id` (`checkOrgPolicyExplanation.user_id`; string, required)
  - pattern: `^(?:user|extension)_[0-7][0-9a-hjkmnp-tv-z]{25}$`
- `attempt` (`checkOrgPolicyExplanation.attempt`; PolicyAttempt, required)
  - any of the following:
    - `object`
      - `kind` (`checkOrgPolicyExplanation.attempt.1.kind`; string, required)
        - one of `"model"`
      - `action` (`checkOrgPolicyExplanation.attempt.1.action`; string, required)
        - one of `"read"`, `"delete"`, `"tag"`, `"untag"`
      - `record_id` (`checkOrgPolicyExplanation.attempt.1.record_id`; string, required)
        - pattern: `^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$`
      - `branch` (`checkOrgPolicyExplanation.attempt.1.branch`; string, optional)
        - minLength: `1`
    - `object`
      - `kind` (`checkOrgPolicyExplanation.attempt.2.kind`; string, required)
        - one of `"model"`
      - `action` (`checkOrgPolicyExplanation.attempt.2.action`; string, required)
        - one of `"update"`
      - `record_id` (`checkOrgPolicyExplanation.attempt.2.record_id`; string, required)
        - pattern: `^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$`
      - `fields` (`checkOrgPolicyExplanation.attempt.2.fields`; object, required)
      - `branch` (`checkOrgPolicyExplanation.attempt.2.branch`; string, optional)
        - minLength: `1`
    - `object`
      - `kind` (`checkOrgPolicyExplanation.attempt.3.kind`; string, required)
        - one of `"model"`
      - `action` (`checkOrgPolicyExplanation.attempt.3.action`; string, required)
        - one of `"create"`
      - `model_api_name` (`checkOrgPolicyExplanation.attempt.3.model_api_name`; string, required)
        - minLength: `1`
      - `fields` (`checkOrgPolicyExplanation.attempt.3.fields`; object, required)
      - `branch` (`checkOrgPolicyExplanation.attempt.3.branch`; string, optional)
        - minLength: `1`
    - `object`
      - `kind` (`checkOrgPolicyExplanation.attempt.4.kind`; string, required)
        - one of `"schema"`
      - `action` (`checkOrgPolicyExplanation.attempt.4.action`; string, required)
        - one of `"read"`, `"create"`, `"update"`, `"delete"`
      - `model_api_name` (`checkOrgPolicyExplanation.attempt.4.model_api_name`; string, required)
        - minLength: `1`
      - `branch` (`checkOrgPolicyExplanation.attempt.4.branch`; string, optional)
        - minLength: `1`
    - `object`
      - `kind` (`checkOrgPolicyExplanation.attempt.5.kind`; string, required)
        - one of `"repo"`
      - `action` (`checkOrgPolicyExplanation.attempt.5.action`; string, required)
        - one of `"read"`, `"update"`, `"readHistory"`, `"createBranches"`, `"deleteBranches"`, `"restoreBranches"`, `"commit"`, `"discard"`, `"manageCheckpoints"`, `"createChangeRequests"`, `"comment"`, `"closeChangeRequests"`, `"merge"`, `"readAttachments"`, `"uploadAttachments"`, `"manageTags"`, `"readCi"`, `"manageCi"`, `"managePolicies"`
    - `object`
      - `kind` (`checkOrgPolicyExplanation.attempt.6.kind`; string, required)
        - one of `"agentInstructions"`
      - `action` (`checkOrgPolicyExplanation.attempt.6.action`; string, required)
        - one of `"read"`, `"manage"`
    - `object`
      - `kind` (`checkOrgPolicyExplanation.attempt.7.kind`; string, required)
        - one of `"agentSkills"`
      - `action` (`checkOrgPolicyExplanation.attempt.7.action`; string, required)
        - one of `"read"`, `"manage"`
    - `object`
      - `kind` (`checkOrgPolicyExplanation.attempt.8.kind`; string, required)
        - one of `"extension"`
      - `action` (`checkOrgPolicyExplanation.attempt.8.action`; string, required)
        - one of `"read"`, `"create"`, `"update"`, `"delete"`, `"publish"`
      - `extension` (`checkOrgPolicyExplanation.attempt.8.extension`; string, required)
        - maxLength: `129` · pattern: `^[a-z0-9]+(?:-[a-z0-9]+)*\.[a-z0-9]+(?:-[a-z0-9]+)*$`
      - `branch` (`checkOrgPolicyExplanation.attempt.8.branch`; string, optional)
        - minLength: `1`
    - `object`
      - `kind` (`checkOrgPolicyExplanation.attempt.9.kind`; string, required)
        - one of `"installation"`
      - `action` (`checkOrgPolicyExplanation.attempt.9.action`; string, required)
        - one of `"read"`, `"manage"`, `"bindConnections"`, `"share"`
      - `extension` (`checkOrgPolicyExplanation.attempt.9.extension`; string, required)
        - maxLength: `129` · pattern: `^[a-z0-9]+(?:-[a-z0-9]+)*\.[a-z0-9]+(?:-[a-z0-9]+)*$`
      - `branch` (`checkOrgPolicyExplanation.attempt.9.branch`; string, optional)
        - minLength: `1`
    - `object`
      - `kind` (`checkOrgPolicyExplanation.attempt.10.kind`; string, required)
        - one of `"tool"`
      - `action` (`checkOrgPolicyExplanation.attempt.10.action`; ToolPolicyAction, required)
        - any of the following:
          - `string`: one of `"call"`
      - `extension` (`checkOrgPolicyExplanation.attempt.10.extension`; string, required)
        - maxLength: `129` · pattern: `^[a-z0-9]+(?:-[a-z0-9]+)*\.[a-z0-9]+(?:-[a-z0-9]+)*$`
      - `name` (`checkOrgPolicyExplanation.attempt.10.name`; string, required)
        - maxLength: `128` · pattern: `^[A-Za-z_][A-Za-z0-9_]*(?:\.[A-Za-z_][A-Za-z0-9_]*)*$`
      - `branch` (`checkOrgPolicyExplanation.attempt.10.branch`; string, optional)
        - minLength: `1`
    - `object`
      - `kind` (`checkOrgPolicyExplanation.attempt.11.kind`; string, required)
        - one of `"workflow"`
      - `action` (`checkOrgPolicyExplanation.attempt.11.action`; string, required)
        - one of `"run"`, `"signal"`, `"terminate"`, `"readRuns"`
      - `extension` (`checkOrgPolicyExplanation.attempt.11.extension`; string, required)
        - maxLength: `129` · pattern: `^[a-z0-9]+(?:-[a-z0-9]+)*\.[a-z0-9]+(?:-[a-z0-9]+)*$`
      - `name` (`checkOrgPolicyExplanation.attempt.11.name`; string, required)
        - maxLength: `128` · pattern: `^[A-Za-z_][A-Za-z0-9_]*$`
      - `branch` (`checkOrgPolicyExplanation.attempt.11.branch`; string, optional)
        - minLength: `1`
    - `object`
      - `kind` (`checkOrgPolicyExplanation.attempt.12.kind`; string, required)
        - one of `"schedule"`
      - `action` (`checkOrgPolicyExplanation.attempt.12.action`; string, required)
        - one of `"manage"`, `"run"`, `"readRuns"`
      - `extension` (`checkOrgPolicyExplanation.attempt.12.extension`; string, required)
        - maxLength: `129` · pattern: `^[a-z0-9]+(?:-[a-z0-9]+)*\.[a-z0-9]+(?:-[a-z0-9]+)*$`
      - `name` (`checkOrgPolicyExplanation.attempt.12.name`; string, required)
        - maxLength: `128` · pattern: `^[A-Za-z_][A-Za-z0-9_]*$`
      - `branch` (`checkOrgPolicyExplanation.attempt.12.branch`; string, optional)
        - minLength: `1`
    - `object`
      - `kind` (`checkOrgPolicyExplanation.attempt.13.kind`; string, required)
        - one of `"trigger"`
      - `action` (`checkOrgPolicyExplanation.attempt.13.action`; string, required)
        - one of `"manage"`, `"run"`, `"readRuns"`
      - `extension` (`checkOrgPolicyExplanation.attempt.13.extension`; string, required)
        - maxLength: `129` · pattern: `^[a-z0-9]+(?:-[a-z0-9]+)*\.[a-z0-9]+(?:-[a-z0-9]+)*$`
      - `name` (`checkOrgPolicyExplanation.attempt.13.name`; string, required)
        - maxLength: `128` · pattern: `^[A-Za-z_][A-Za-z0-9_]*$`
      - `branch` (`checkOrgPolicyExplanation.attempt.13.branch`; string, optional)
        - minLength: `1`
- `channel` (`checkOrgPolicyExplanation.channel`; string, optional)
  - one of `"Api"`, `"Mcp"`
- `draft` (`checkOrgPolicyExplanation.draft`; object, optional)
  - `source` (`checkOrgPolicyExplanation.draft.source`; string, required)
    - minLength: `1`
  - `repo_id` (`checkOrgPolicyExplanation.draft.repo_id`; string, optional)
    - pattern: `^repo_[0-7][0-9a-hjkmnp-tv-z]{25}$`
  - `policy_id` (`checkOrgPolicyExplanation.draft.policy_id`; string, optional)
    - pattern: `^policy_[0-7][0-9a-hjkmnp-tv-z]{25}$`

## Example request

```json
{
  "repo_id": "string",
  "user_id": "string",
  "attempt": {
    "kind": "model",
    "action": "read",
    "record_id": "string",
    "branch": "string"
  },
  "channel": "Api",
  "draft": {
    "source": "string",
    "repo_id": "string",
    "policy_id": "string"
  }
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url '<base-url>/orgs/<org_id>/policy-explanations' \
  --header 'Content-Type: application/json' \
  --data '
{
  "repo_id": "string",
  "user_id": "string",
  "attempt": {
    "kind": "model",
    "action": "read",
    "record_id": "string",
    "branch": "string"
  },
  "channel": "Api",
  "draft": {
    "source": "string",
    "repo_id": "string",
    "policy_id": "string"
  }
}
'
```

### TypeScript

```typescript
const url = '<base-url>/orgs/<org_id>/policy-explanations';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    repo_id: 'string',
    user_id: 'string',
    attempt: {kind: 'model', action: 'read', record_id: 'string', branch: 'string'},
    channel: 'Api',
    draft: {source: 'string', repo_id: 'string', policy_id: 'string'}
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "<base-url>/orgs/<org_id>/policy-explanations"

payload = {
    "repo_id": "string",
    "user_id": "string",
    "attempt": {
        "kind": "model",
        "action": "read",
        "record_id": "string",
        "branch": "string"
    },
    "channel": "Api",
    "draft": {
        "source": "string",
        "repo_id": "string",
        "policy_id": "string"
    }
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

DecisionExplanation

#### Example

```json
{
  "_tag": "Owner"
}
```

Any of the following:

- `object`
  - `_tag` (`checkOrgPolicyExplanation.response.200.1._tag`; string, required)
    - one of `"Owner"`
- `object`
  - `_tag` (`checkOrgPolicyExplanation.response.200.2._tag`; string, required)
    - one of `"Policies"`
  - `verdict` (`checkOrgPolicyExplanation.response.200.2.verdict`; string, required)
    - one of `"allowed"`, `"forbidden"`, `"hidden"`
  - `checks` (`checkOrgPolicyExplanation.response.200.2.checks`; array of object, required)
    - `step` (`checkOrgPolicyExplanation.response.200.2.checks.step`; string, required)
      - one of `"repoRead"`, `"recordRead"`, `"action"`
    - `action` (`checkOrgPolicyExplanation.response.200.2.checks.action`; string, required)
      - pattern: `^[a-z][A-Za-z]*$`
    - `outcome` (`checkOrgPolicyExplanation.response.200.2.checks.outcome`; string, required)
      - one of `"allow"`, `"deny"`
    - `org_pass` (`checkOrgPolicyExplanation.response.200.2.checks.org_pass`; object, required)
      - `outcome` (`checkOrgPolicyExplanation.response.200.2.checks.org_pass.outcome`; string, required)
        - one of `"allow"`, `"deny"`
      - `statements` (`checkOrgPolicyExplanation.response.200.2.checks.org_pass.statements`; array of StatementExplanation, required)
        - every option has:
          - `policy_id` (`<option>.policy_id`; string, required)
            - pattern: `^policy_[0-7][0-9a-hjkmnp-tv-z]{25}$`
          - `version_id` (`<option>.version_id`; string, required)
            - pattern: `^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$`
          - `policy_name` (`<option>.policy_name`; string, required)
            - minLength: `1`
          - `index` (`<option>.index`; integer, required)
            - maximum: `9007199254740991` · minimum: `0`
          - `applied` (`<option>.applied`; boolean, required)
          - `runs` (`<option>.runs`; array of object, required)
            - `side` (`<option>.runs.side`; string, required)
              - one of `"record"`, `"before"`, `"after"`
            - `terms` (`<option>.runs.terms`; array of object, required)
              - `at` (`<option>.runs.terms.at`; array of integer, required)
                - maximum: `9007199254740991` · minimum: `0`
              - `value` (`<option>.runs.terms.value`; any of, required)
                - any of the following:
                  - `object`
                    - `_tag` (`<option>.runs.terms.value.1._tag`; string, required)
                      - one of `"True"`
                    - `operands` (`<option>.runs.terms.value.1.operands`; array\<any of\>, required)
                      - any of the following:
                        - `object`
                          - `_tag` (`<option>.runs.terms.value.1.operands.1._tag`; string, required)
                            - one of `"Value"`
                          - `value` (`<option>.runs.terms.value.1.operands.1.value`; unknown, required)
                        - `object`
                          - `_tag` (`<option>.runs.terms.value.1.operands.2._tag`; string, required)
                            - one of `"Missing"`
                  - `object`
                    - `_tag` (`<option>.runs.terms.value.2._tag`; string, required)
                      - one of `"False"`
                    - `operands` (`<option>.runs.terms.value.2.operands`; array\<any of\>, required)
                      - any of the following:
                        - `object`
                          - `_tag` (`<option>.runs.terms.value.2.operands.1._tag`; string, required)
                            - one of `"Value"`
                          - `value` (`<option>.runs.terms.value.2.operands.1.value`; unknown, required)
                        - `object`
                          - `_tag` (`<option>.runs.terms.value.2.operands.2._tag`; string, required)
                            - one of `"Missing"`
                  - `object`
                    - `_tag` (`<option>.runs.terms.value.3._tag`; string, required)
                      - one of `"Unknown"`
                    - `operands` (`<option>.runs.terms.value.3.operands`; array\<any of\>, required)
                      - any of the following:
                        - `object`
                          - `_tag` (`<option>.runs.terms.value.3.operands.1._tag`; string, required)
                            - one of `"Value"`
                          - `value` (`<option>.runs.terms.value.3.operands.1.value`; unknown, required)
                        - `object`
                          - `_tag` (`<option>.runs.terms.value.3.operands.2._tag`; string, required)
                            - one of `"Missing"`
                  - `object`
                    - `_tag` (`<option>.runs.terms.value.4._tag`; string, required)
                      - one of `"Error"`
                    - `reason` (`<option>.runs.terms.value.4.reason`; string, required)
                      - one of `"unresolvedName"`, `"crossRepo"`, `"canReadDepth"`, `"canReadCycle"`, `"readBudget"`, `"unsupportedValue"`
        - any of the following, each adding:
          - `object` (`checkOrgPolicyExplanation.response.200.2.checks.org_pass.statements.1`)
            - `_tag` (`checkOrgPolicyExplanation.response.200.2.checks.org_pass.statements.1._tag`; string, required)
              - one of `"Allow"`
          - `object` (`checkOrgPolicyExplanation.response.200.2.checks.org_pass.statements.2`)
            - `_tag` (`checkOrgPolicyExplanation.response.200.2.checks.org_pass.statements.2._tag`; string, required)
              - one of `"Deny"`
    - `repo_pass` (`checkOrgPolicyExplanation.response.200.2.checks.repo_pass`; any of, required)
      - any of the following: `PassExplanation`, `null`
- `object`
  - `_tag` (`checkOrgPolicyExplanation.response.200.3._tag`; string, required)
    - one of `"Withheld"`

### 400

InvalidRequest | RequestBodyTooDeep

#### Example

```json
{
  "_tag": "InvalidRequest",
  "part": "path",
  "issues": [
    {
      "path": [
        "string"
      ],
      "message": "string"
    }
  ]
}
```

Any of the following:

- `InvalidRequestEncoded`
  - `_tag` (`InvalidRequestEncoded._tag`; string, required)
    - one of `"InvalidRequest"`
  - `part` (`InvalidRequestEncoded.part`; string, required)
    - one of `"path"`, `"query"`, `"headers"`, `"body"`
  - `issues` (`InvalidRequestEncoded.issues`; array of object, required)
    - `path` (`InvalidRequestEncoded.issues.path`; array\<any of\>, required)
      - any of the following: `string`, `integer`
    - `message` (`InvalidRequestEncoded.issues.message`; string, required)
- `RequestBodyTooDeepEncoded`
  - `_tag` (`RequestBodyTooDeepEncoded._tag`; string, required)
    - one of `"RequestBodyTooDeep"`
  - `max_depth` (`RequestBodyTooDeepEncoded.max_depth`; integer, required)
    - maximum: `9007199254740991` · minimum: `-9007199254740991`

### 401

InvalidCredentials

#### Example

```json
{
  "_tag": "InvalidCredentials"
}
```

- `_tag` (`checkOrgPolicyExplanation.response.401._tag`; string, required)
  - one of `"InvalidCredentials"`

### 403

Forbidden | ForbiddenOrigin | RequiresPersonalSession | RunBranchRequired

#### Example

```json
{
  "_tag": "Forbidden",
  "message": "string"
}
```

Any of the following:

- `ForbiddenEncoded`
  - `_tag` (`ForbiddenEncoded._tag`; string, required)
    - one of `"Forbidden"`
  - `message` (`ForbiddenEncoded.message`; string, required)
- `ForbiddenOriginEncoded`
  - `_tag` (`ForbiddenOriginEncoded._tag`; string, required)
    - one of `"ForbiddenOrigin"`
- `RequiresPersonalSessionEncoded`
  - `_tag` (`RequiresPersonalSessionEncoded._tag`; string, required)
    - one of `"RequiresPersonalSession"`
- `RunBranchRequiredEncoded`
  - `_tag` (`RunBranchRequiredEncoded._tag`; string, required)
    - one of `"RunBranchRequired"`
  - `branch` (`RunBranchRequiredEncoded.branch`; string, required)
    - minLength: `1`
  - `message` (`RunBranchRequiredEncoded.message`; string, required)

### 404

OrgNotFound | RepoNotFound | PolicyNotFound | MemberNotFound | BranchNotFound | CustomModelNotFound | CustomRecordNotFound | ExtensionNotFound | ExtensionInstallationNotFound | ExtensionToolNotFound | ExtensionWorkflowNotFound

#### Example

```json
{
  "_tag": "OrgNotFound"
}
```

Any of the following:

- `OrgNotFoundEncoded`
  - `_tag` (`OrgNotFoundEncoded._tag`; string, required)
    - one of `"OrgNotFound"`
- `RepoNotFoundEncoded`
  - `_tag` (`RepoNotFoundEncoded._tag`; string, required)
    - one of `"RepoNotFound"`
- `PolicyNotFoundEncoded`
  - `_tag` (`PolicyNotFoundEncoded._tag`; string, required)
    - one of `"PolicyNotFound"`
- `MemberNotFoundEncoded`
  - `_tag` (`MemberNotFoundEncoded._tag`; string, required)
    - one of `"MemberNotFound"`
- `BranchNotFoundEncoded`
  - `_tag` (`BranchNotFoundEncoded._tag`; string, required)
    - one of `"BranchNotFound"`
  - `branch` (`BranchNotFoundEncoded.branch`; string, required)
    - minLength: `1`
- `CustomModelNotFoundEncoded`
  - `_tag` (`CustomModelNotFoundEncoded._tag`; string, required)
    - one of `"CustomModelNotFound"`
  - `api_name` (`CustomModelNotFoundEncoded.api_name`; string, required)
    - minLength: `1`
- `CustomRecordNotFoundEncoded`
  - `_tag` (`CustomRecordNotFoundEncoded._tag`; string, required)
    - one of `"CustomRecordNotFound"`
  - `record_id` (`CustomRecordNotFoundEncoded.record_id`; string, required)
    - pattern: `^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$`
- `ExtensionNotFoundEncoded`
  - `_tag` (`ExtensionNotFoundEncoded._tag`; string, required)
    - one of `"ExtensionNotFound"`
  - `extension_name` (`ExtensionNotFoundEncoded.extension_name`; string, required)
    - minLength: `1`
- `ExtensionInstallationNotFoundEncoded`
  - `_tag` (`ExtensionInstallationNotFoundEncoded._tag`; string, required)
    - one of `"ExtensionInstallationNotFound"`
  - `extension_name` (`ExtensionInstallationNotFoundEncoded.extension_name`; string, required)
    - minLength: `1`
  - `message` (`ExtensionInstallationNotFoundEncoded.message`; string, required)
- `ExtensionToolNotFoundEncoded`
  - `_tag` (`ExtensionToolNotFoundEncoded._tag`; string, required)
    - one of `"ExtensionToolNotFound"`
  - `extension_name` (`ExtensionToolNotFoundEncoded.extension_name`; string, required)
    - minLength: `1`
  - `tool` (`ExtensionToolNotFoundEncoded.tool`; string, required)
    - minLength: `1`
- `ExtensionWorkflowNotFoundEncoded`
  - `_tag` (`ExtensionWorkflowNotFoundEncoded._tag`; string, required)
    - one of `"ExtensionWorkflowNotFound"`
  - `extension_name` (`ExtensionWorkflowNotFoundEncoded.extension_name`; string, required)
    - minLength: `1`
  - `workflow` (`ExtensionWorkflowNotFoundEncoded.workflow`; string, required)
    - minLength: `1`
  - `message` (`ExtensionWorkflowNotFoundEncoded.message`; string, required)

### 409

PolicyLevelMismatch

#### Example

```json
{
  "_tag": "PolicyLevelMismatch"
}
```

- `_tag` (`checkOrgPolicyExplanation.response.409._tag`; string, required)
  - one of `"PolicyLevelMismatch"`

### 413

RequestBodyTooLarge

#### Example

```json
{
  "_tag": "RequestBodyTooLarge",
  "max_bytes": -9007199254740991
}
```

- `_tag` (`checkOrgPolicyExplanation.response.413._tag`; string, required)
  - one of `"RequestBodyTooLarge"`
- `max_bytes` (`checkOrgPolicyExplanation.response.413.max_bytes`; integer, required)
  - maximum: `9007199254740991` · minimum: `-9007199254740991`

### 422

PolicyInvalid | InvalidCustomRecord | ExtensionScheduleNotDeclared | ExtensionTriggerNotDeclared

#### Example

```json
{
  "_tag": "PolicyInvalid",
  "problems": [
    {
      "severity": "error",
      "code": "syntax",
      "message": "string",
      "fix": "string",
      "location": {
        "line": -9007199254740991,
        "column": -9007199254740991
      },
      "policy": "string",
      "statement": -9007199254740991,
      "term": [
        0
      ]
    }
  ]
}
```

Any of the following:

- `PolicyInvalidEncoded`
  - `_tag` (`PolicyInvalidEncoded._tag`; string, required)
    - one of `"PolicyInvalid"`
  - `problems` (`PolicyInvalidEncoded.problems`; array of object, required)
    - `severity` (`PolicyInvalidEncoded.problems.severity`; string, required)
      - one of `"error"`, `"warning"`
    - `code` (`PolicyInvalidEncoded.problems.code`; string, required)
      - one of `"syntax"`, `"unsupported"`, `"truthiness"`, `"duplicate"`, `"unknownModel"`, `"unknownField"`, `"unknownAction"`, `"unknownExtension"`, `"unknownTool"`, `"unknownWorkflow"`, `"unknownSchedule"`, `"unknownTrigger"`, `"unknownGroup"`, `"unknownRepo"`, `"notAReference"`, `"noRecord"`, `"crossRepo"`, `"repoAllow"`, `"orgActionInRepo"`, `"repoModelInOrgPolicy"`
    - `message` (`PolicyInvalidEncoded.problems.message`; string, required)
    - `fix` (`PolicyInvalidEncoded.problems.fix`; any of, required)
      - any of the following: `string`, `null`
    - `location` (`PolicyInvalidEncoded.problems.location`; any of, required)
      - any of the following:
        - `object`
          - `line` (`PolicyInvalidEncoded.problems.location.1.line`; integer, required)
            - maximum: `9007199254740991` · minimum: `-9007199254740991`
          - `column` (`PolicyInvalidEncoded.problems.location.1.column`; integer, required)
            - maximum: `9007199254740991` · minimum: `-9007199254740991`
        - `null`
    - `policy` (`PolicyInvalidEncoded.problems.policy`; any of, required)
      - any of the following: `string`, `null`
    - `statement` (`PolicyInvalidEncoded.problems.statement`; any of, required)
      - any of the following: `integer`, `null`
    - `term` (`PolicyInvalidEncoded.problems.term`; any of, required)
      - any of the following: `array<integer>`, `null`
- `InvalidCustomRecordEncoded`
  - `_tag` (`InvalidCustomRecordEncoded._tag`; string, required)
    - one of `"InvalidCustomRecord"`
  - `reason` (`InvalidCustomRecordEncoded.reason`; string, required)
    - minLength: `1`
- `ExtensionScheduleNotDeclaredEncoded`
  - `_tag` (`ExtensionScheduleNotDeclaredEncoded._tag`; string, required)
    - one of `"ExtensionScheduleNotDeclared"`
  - `extension_name` (`ExtensionScheduleNotDeclaredEncoded.extension_name`; string, required)
    - minLength: `1`
  - `version` (`ExtensionScheduleNotDeclaredEncoded.version`; string, required)
    - minLength: `1`
  - `schedule` (`ExtensionScheduleNotDeclaredEncoded.schedule`; string, required)
    - minLength: `1`
  - `message` (`ExtensionScheduleNotDeclaredEncoded.message`; string, required)
- `ExtensionTriggerNotDeclaredEncoded`
  - `_tag` (`ExtensionTriggerNotDeclaredEncoded._tag`; string, required)
    - one of `"ExtensionTriggerNotDeclared"`
  - `extension_name` (`ExtensionTriggerNotDeclaredEncoded.extension_name`; string, required)
    - minLength: `1`
  - `version` (`ExtensionTriggerNotDeclaredEncoded.version`; string, required)
    - minLength: `1`
  - `trigger` (`ExtensionTriggerNotDeclaredEncoded.trigger`; string, required)
    - minLength: `1`

### 429

RateLimited

#### Example

```json
{
  "_tag": "RateLimited"
}
```

- `_tag` (`checkOrgPolicyExplanation.response.429._tag`; string, required)
  - one of `"RateLimited"`

### 500

OrgFailure | RepoFailure

#### Example

```json
{
  "_tag": "OrgFailure",
  "reason": "string"
}
```

Every option has:

- `reason` (`<option>.reason`; string, required)

Any of the following, each adding:

- `OrgFailureEncoded`
  - `_tag` (`OrgFailureEncoded._tag`; string, required)
    - one of `"OrgFailure"`
- `RepoFailureEncoded`
  - `_tag` (`RepoFailureEncoded._tag`; string, required)
    - one of `"RepoFailure"`

### 503

SessionUnavailable | RateLimitUnavailable

#### Example

```json
{
  "_tag": "SessionUnavailable"
}
```

Any of the following:

- `SessionUnavailableEncoded`
  - `_tag` (`SessionUnavailableEncoded._tag`; string, required)
    - one of `"SessionUnavailable"`
- `RateLimitUnavailableEncoded`
  - `_tag` (`RateLimitUnavailableEncoded._tag`; string, required)
    - one of `"RateLimitUnavailable"`


Source: https://buildrforge.com/docs/api/check-org-policy-explanation/index.md
