---
title: "Validate policy document"
url: https://hexelstudio.com/docs/api/ciam-iam/authz/validate-policy
---

# Validate policy document

**POST** `/authz/validate-policy`

## Headers

- `Authorization: string`

  `Bearer <token>`.

## Body parameters

- `body: object`

  document

## Returns

`200` OK (`ValidatePolicyResponse`)

- `errors: optional array of string`

- `valid: optional boolean`

## Errors

- `400` Bad Request

## Example

```bash
curl --request POST \
  --url 'https://api.hexelstudio.com/v1/authz/validate-policy' \
  --header "Authorization: Bearer $ACCESS_TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{}'
```

### Response (200)

```json
{
  "errors": [
    "string"
  ],
  "valid": true
}
```

### Response (400)

```json
{
  "key": "string"
}
```
