Skip to main content
POST
/
config_schemas
Python
import os
from miru_platform_sdk import Miru

client = Miru(
    api_key=os.environ.get("MIRU_API_KEY"),  # This is the default and can be omitted
)
config_schema = client.config_schemas.create(
    config_type_ref={},
    documents=[{
        "data": "data",
        "name": "motion-control.json",
    }],
    format="json",
    language="jsonschema",
)
print(config_schema.id)
{
  "object": "config_schema",
  "id": "cfg_sch_123",
  "digest": "sha256:1234567890",
  "config_type_name": "Motion Control",
  "instance_filepath": "/v1/motion-control.json",
  "created_at": "2021-01-01T00:00:00Z",
  "updated_at": "2021-01-01T00:00:00Z",
  "config_type_id": "cfg_typ_123",
  "language": "jsonschema",
  "format": "json"
}
ScopeRequired
config_schemas:writeYes
Consider using the Miru CLI in a CI/CD pipeline to create config schemas instead of calling this endpoint directly.

Authorizations

X-API-Key
string
header
required

The API key to use for authentication.

Headers

Miru-Version
string
required

The API version the client was built against.

Example:

"2026-03-09.tetons"

Query Parameters

expand
enum<string>[]

Fields to expand on the config schema resource.

Available options:
documents,
config_type
Example:
["documents"]

Body

application/json
config_type_ref
Config Type Reference · object
required

A reference to a config type. At least one of id or slug must be provided. When both are provided, id takes precedence and slug is ignored.

language
enum<string>
required
Available options:
jsonschema,
cue
Example:

"jsonschema"

format
enum<string>
required
Available options:
json,
yaml,
cue
documents
Schema Document · object[]
required

The schema document files.

instance_filepath
string

The file path for config instances created from this schema.

Example:

"/v1/motion-control.json"

git_commit
Git Commit Request · object

The git commit to link to this config schema.

Response

200 - application/json

Successfully created the config schema.

object
enum<string>
required

The object type, which is always config_schema.

Available options:
config_schema
Example:

"config_schema"

id
string
required

ID of the config schema.

Example:

"cfg_sch_123"

digest
string
required

The digest of the config schema.

Example:

"sha256:1234567890"

config_type_name
string
required

The name of the config type.

Example:

"Motion Control"

instance_filepath
string
required

The file path to deploy the config instance relative to /srv/miru/config_instances. v1/motion-control.json would deploy to /srv/miru/config_instances/v1/motion-control.json.

Example:

"/v1/motion-control.json"

created_at
string<date-time>
required

Timestamp of when the config schema was created.

Example:

"2021-01-01T00:00:00Z"

updated_at
string<date-time>
required

Timestamp of when the config schema was last updated.

Example:

"2021-01-01T00:00:00Z"

config_type_id
string
required

ID of the config type.

Example:

"cfg_typ_123"

language
enum<string>
required
Available options:
jsonschema,
cue
Example:

"jsonschema"

format
enum<string>
required
Available options:
json,
yaml,
cue
documents
Schema Document · object[]

Expand the config schema documents using expand=documents in the query string.

Example:
[
{
"id": "doc_123",
"name": "main.json",
"data": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"type\": \"object\"\n}\n"
}
]
config_type
Config Type · object

Expand the config type using 'expand=config_type' in the query string.

Example:
{
"object": "config_type",
"id": "cfg_typ_123",
"name": "Motion Control",
"slug": "motion-control",
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T00:00:00Z",
"created_by_id": "usr_123",
"updated_by_id": "usr_123"
}
Last modified on March 13, 2026