---
updatedAt: 2026-05-28T08:16:45.000Z
agentTools:
  projectIndex: https://docs.scalr.io/llms.txt
---

# Override Policy

This endpoint overrides a soft-mandatory policy.

# OpenAPI definition

```json
{
  "components": {
    "schemas": {
      "PolicyCheck": {
        "description": "A policy check contains the details of the policy check phase of a run in Scalr.\n\nPolicy check is performed immediately after Terraform plan and cost estimation have completed for every run\nin every workspace, including dry runs, where policies have been linked.",
        "properties": {
          "attributes": {
            "properties": {
              "permissions": {
                "type": "object"
              },
              "result": {
                "description": "OPA policy decision.",
                "properties": {
                  "advisory-failed": {
                    "default": 0,
                    "description": "Number of policy checks that have failed with 'advisory' level.",
                    "type": "integer"
                  },
                  "duration-ms": {
                    "default": 0,
                    "description": "Duration of the policy check operation.",
                    "type": "integer"
                  },
                  "hard-failed": {
                    "default": 0,
                    "description": "Number of policy checks that have failed with \"hard-mandatory\" level.",
                    "type": "integer"
                  },
                  "passed": {
                    "default": 0,
                    "description": "Number of policy checks that have passed.",
                    "type": "integer"
                  },
                  "policies": {
                    "description": "List of policies that were checked.",
                    "items": {
                      "properties": {
                        "messages": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "name": {
                          "type": "string"
                        },
                        "result": {
                          "enum": [
                            "passed",
                            "hard_failed",
                            "soft_failed",
                            "advisory_failed"
                          ],
                          "type": "string"
                        },
                        "unit-path": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "result"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "result": {
                    "default": false,
                    "description": "Indicates whether all policy checks have passed without failures.",
                    "type": "boolean"
                  },
                  "soft-failed": {
                    "default": 0,
                    "description": "Number of policy checks that have failed with \"soft-mandatory\" level.",
                    "type": "integer"
                  },
                  "total-failed": {
                    "default": 0,
                    "description": "Total number of policy checks that have failed.",
                    "type": "integer"
                  }
                },
                "type": "object"
              },
              "status": {
                "description": "The Policy checks's current status.\n\nTransient states:\n* `pending` - The initial status of a policy check once it has been created.\n* `queued` - The policy check has been queued, awaiting backend service capacity to run terraform.\n* `running` - The policy check is running.\n* `soft_failed` Policy check has finished, and run hasn't passed policy with the `soft` level.\n  User having `policy-checks:override` permission can override the policy check decision,\n  and push this run next to apply.\n\nFinal states:\n* `canceled` - The policy check has been canceled.\n* `errored` - The policy check has finished with an error. Attribute `error-message` contains the details.\n* `hard_failed` - Run hasn't passed policy with the `hard` level.\n* `overridden` - The policy check `soft_failed` status has been overridden.\n* `passed` - Run has successfully passed all configured policies.\n* `unreachable` - The policy check will not run.",
                "enum": [
                  "pending",
                  "queued",
                  "passed",
                  "errored",
                  "hard_failed",
                  "soft_failed",
                  "overridden",
                  "unreachable",
                  "canceled"
                ],
                "type": "string"
              },
              "status-timestamps": {
                "additionalProperties": {
                  "format": "date-time",
                  "type": "string"
                },
                "description": "Date/Time of transition to each status that has occurred.",
                "type": "object"
              }
            },
            "type": "object"
          },
          "id": {
            "readOnly": true,
            "type": "string"
          },
          "links": {
            "properties": {
              "output": {
                "description": "Link to download the policy check raw output.",
                "type": "string"
              }
            },
            "readOnly": true,
            "type": "object"
          },
          "type": {
            "enum": [
              "policy-checks"
            ],
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "PolicyCheckDocument": {
        "description": "JSON:API Document.\n\nsee: https://jsonapi.org/format/#document-structure",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PolicyCheck"
          },
          "included": {
            "items": {
              "type": "object"
            },
            "readOnly": true,
            "type": "array"
          },
          "meta": {
            "readOnly": true,
            "type": "object"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "API-Key": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Scalr IACP API",
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0"
    },
    "title": "Scalr IACP API",
    "version": "unversioned"
  },
  "openapi": "3.0.0",
  "paths": {
    "/policy-checks/{policy_check}/actions/override": {
      "post": {
        "description": "This endpoint overrides a soft-mandatory policy.",
        "operationId": "override_policy",
        "parameters": [
          {
            "description": "The ID of the policy check to override.",
            "in": "path",
            "name": "policy_check",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/vnd.api+json": {
                "examples": {
                  "default": {
                    "value": "{\n  \"data\": {\n    \"attributes\": {\n      \"result\": {\n        \"advisory-failed\": 0,\n        \"duration-ms\": 81,\n        \"hard-failed\": 0,\n        \"passed\": 2,\n        \"policies\": [\n          {\n            \"messages\": [],\n            \"name\": \"cost-check\",\n            \"result\": \"passed\"\n          },\n          {\n            \"messages\": [],\n            \"name\": \"credential-limit\",\n            \"result\": \"passed\"\n          },\n          {\n            \"messages\": [\n              \"aws_instance.default: instance type t2.2xlarge is not allowed. T2 instance types are considered deprecated, please rewrite your templates to use T3/T4 instance types\"\n            ],\n            \"name\": \"instance_types\",\n            \"result\": \"soft_failed\"\n          }\n        ],\n        \"result\": false,\n        \"soft-failed\": 1,\n        \"total-failed\": 1\n      },\n      \"status\": \"overridden\",\n      \"status-timestamps\": {\n        \"overridden-at\": \"2020-11-06T17:01:47Z\",\n        \"pending-at\": \"2020-11-06T16:42:18Z\",\n        \"queued-at\": \"2020-11-06T16:42:55Z\",\n        \"soft-failed-at\": \"2020-11-06T16:42:56Z\"\n      }\n    },\n    \"id\": \"pchk-t61gbtus33m5eu8\",\n    \"links\": {\n      \"output\": \"https://scalr.io/api/iacp/v3/policy-checks/pchk-t61gbtus33m5eu8/output\",\n      \"self\": \"https://scalr.io/api/iacp/v3/policy-checks/pchk-t61gbtus33m5eu8\"\n    },\n    \"relationships\": {},\n    \"type\": \"policy-checks\"\n  },\n  \"included\": null,\n  \"meta\": null\n}"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PolicyCheckDocument"
                }
              }
            },
            "description": "Success."
          },
          "404": {
            "description": "Policy check not found or user unauthorized to perform action."
          },
          "409": {
            "description": "Override is not possible in a current policy check status."
          },
          "4XX": {
            "description": "Client error."
          },
          "5XX": {
            "description": "Server error."
          }
        },
        "summary": "Override Policy",
        "tags": [
          "policy-checks"
        ],
        "x-resource": "PolicyCheck",
        "x-service": "tf-api"
      }
    }
  },
  "security": [
    {
      "API-Key": []
    }
  ],
  "servers": [
    {
      "url": "https://{Domain}/api/iacp/v3",
      "variables": {
        "Domain": {
          "default": "example.scalr.io",
          "description": "Domain where Scalr is hosted"
        }
      }
    }
  ]
}
```

# Sibling pages

* [Get a Policy Check](https://docs.scalr.io/scalr/reference/get_policy_check.md)
* [Policy Check Log](https://docs.scalr.io/scalr/reference/get_policy_checks_log.md)
* [List Policy Checks](https://docs.scalr.io/scalr/reference/list_policy_checks.md)