---
title: "Check the syntax of an OPL file"
method: POST
path: "/opl/syntax/check"
tags: ["relationship"]
---

# Check the syntax of an OPL file

`POST /opl/syntax/check`

The OPL file is expected in the body of the request.

## Response `200`

checkOplSyntaxResult

- CheckOplSyntaxResult
  - `errors` ParseError[] — The list of syntax errors
    - `end` SourcePosition
      - `Line` integer
      - `column` integer
    - `message` string
    - `start` SourcePosition
      - `Line` integer
      - `column` integer

## Other responses

- `400` — errorGeneric
- `default` — errorGeneric

## Changes

- **2022-11-25** `5f207fe3fcc0` — 6 warning, 5 info
  - removed the optional property `code` from the response with the `400` status
  - removed the optional property `details` from the response with the `400` status
  - removed the optional property `message` from the response with the `400` status
  - removed the optional property `reason` from the response with the `400` status
  - …7 more
- **2022-10-11** `1eff08550ab3` — 1 info
  - api operation id `postCheckOplSyntax` removed and replaced with `checkOplSyntax`
- **2022-10-11** `5fd438f545b7` — 1 info
  - endpoint added
- **2021-10-07** `e90046dbd055` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/ory/apis/ory-keto-api/changes/opl/syntax/check/post.md)

---

[API](https://skmtc.dev/ory/apis/ory-keto-api.md) · [All operations](https://skmtc.dev/ory/apis/ory-keto-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ory/ory-keto-api/revisions/4e980fe4b29b/schema)
