Unispec Docs
ApiTyped memory

Register a record schema (version 1)

The definition uses a restricted JSON-Schema subset: object root, one level of properties, types string / number / integer / boolean / string-enum / string-array, at most 32 properties. Up to 32 schemas per project.

POST
/v1/schemas

The definition uses a restricted JSON-Schema subset: object root, one level of properties, types string / number / integer / boolean / string-enum / string-array, at most 32 properties. Up to 32 schemas per project.

Authorization

TokenAuth
Authorization<token>

Project API key as Token lb-sk_...

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/v1/schemas" \  -H "Content-Type: application/json" \  -d '{    "name": "link",    "json_schema": {      "type": "object",      "properties": {        "linkType": {          "type": "string",          "enum": [            "todo",            "explore-later",            "customers-link"          ]        },        "href": {          "type": "string"        },        "description": {          "type": "string"        }      },      "required": [        "linkType",        "href"      ]    }  }'
{  "name": "string",  "version": 0,  "json_schema": {    "type": "object",    "properties": {      "property1": {        "type": "string",        "enum": [          "string"        ],        "items": {          "type": "string"        },        "description": "string"      },      "property2": {        "type": "string",        "enum": [          "string"        ],        "items": {          "type": "string"        },        "description": "string"      }    },    "required": [      "string"    ]  },  "embed_template": "string",  "retention": {    "max_age_days": 1,    "max_count": 1  },  "created_at": "2019-08-24T14:15:22Z"}