---
title: "Create a new schema"
method: POST
path: "/api/schemas/"
tags: ["schemas"]
---

# Create a new schema

`POST /api/schemas/`

## Request

- Base URL: `https://docs.blindinsight.io` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.blindinsight.io/api/schemas/`
- Auth: one of:
  - API key in cookie `sessionid`
  - HTTP basic
  - HTTP bearer
- TypeScript: <https://skmtc.dev/blindinsight/apis/blind-insight-rest-api/docs/api/schemas/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a new schema.

The response will be the newly created schema object.

**On the command line:**

```bash
blind schemas create --data schema.json
```

## Request body

- Schema: HyperlinkedModelSerializer with `id` as the first field.
  - `id` string, required
  - `url` string, uri, required
  - `dataset` string, uri, required
  - `name` string, required: A human-readable name for this schema.
  - `slug` string: A unique slug for this schema.
  - `description` string: A longer description of the schema.
  - `schema` object: The JSON schema definition.

## Response `201`

- Schema: HyperlinkedModelSerializer with `id` as the first field.
  - `id` string, required
  - `url` string, uri, required
  - `dataset` string, uri, required
  - `name` string, required: A human-readable name for this schema.
  - `slug` string: A unique slug for this schema.
  - `description` string: A longer description of the schema.
  - `schema` object: The JSON schema definition.

---

[API](https://skmtc.dev/blindinsight/apis/blind-insight-rest-api.md) - [All operations](https://skmtc.dev/blindinsight/apis/blind-insight-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/blindinsight/apis/blind-insight-rest-api/revisions/0ac902401cea?raw)
