---
title: "Register Schema"
method: POST
path: "/model/{env}/schema"
---

# Register Schema

`POST /model/{env}/schema`

## Request

- Base URL: `https://api-docs.session-exchange.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api-docs.session-exchange.com/model/{env}/schema`
- Auth: none declared

## Path parameters

- `env` string, required

## Request body

- ModelSchemaRequest: A domain ModelSchema for an environment (specs/environment-model/v0.1). `entities` is validated structurally in the route (each needs name+key+folds); kept loose here so the schema can evolve without a model migration.
  - `entities` object[], required
  - `relations` object[]
  - `description` string

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/session-exchange/apis/a4sx.md) · [All operations](https://skmtc.dev/session-exchange/apis/a4sx/llms.txt) · [OpenAPI document](https://skmtc.dev/session-exchange/apis/a4sx/revisions/abaefc33dfc7?raw)
