---
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** `acd2fb10eb38` — 3 info
  - api tag `relationship` added
  - api tag `syntax` removed
  - removed the non-success response with the status `500`
- **2022-10-11** `99f412d15de3` — 1 info
  - api operation id `postCheckOplSyntax` removed and replaced with `checkOplSyntax`
- **2022-10-11** `f90372c00700` — 1 info
  - endpoint added
- **2021-09-24** `b323fac0f51a` — 1 breaking
  - api path removed without deprecation

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

---

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