Skip to main content
POST
Create
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-08-17.everglades"

Query Parameters

expand
enum<string>[]

Fields to expand on the config schema resource.

Available options:
documents,
config_type
Example:

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,
opaque
Example:

"jsonschema"

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

The schema document files.

instance_slots
Instance Slot · object[]

The file system destinations this config schema writes to. Slot keys and filepaths must each be unique within the schema, and slot filepaths must be unique across every config schema in a release. Optional: when omitted, the server creates a single required slot with key default, name Default, and a filepath of /srv/miru/configs/<config_type_slug>.<json|yaml> derived from the config type slug and the schema format. When provided, the array must contain at least one slot.

Minimum array length: 1
instance_format
enum<string>

The on-disk format used when a config instance is written to the device filesystem.

  • json: standard JSON.
  • yaml: YAML 1.2.
  • jsonc: JSON with comments (JSON plus // and /* */ comment syntax).
  • xml: XML.
  • text: plain, unstructured text with no specific format.
Available options:
json,
yaml,
jsonc,
xml,
text
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_slots
Instance Slot · object[]
required

The file system destinations this config schema writes to. Every config schema has at least one slot. Slots share the schema's validation and differ only in where the file is written; a file needing different validation is a different config type, not a slot. Slot keys and filepaths must each be unique within the schema, and slot filepaths must be unique across every config schema in a release.

Minimum array length: 1
Example:
instance_format
enum<string>
required

The on-disk format used when a config instance is written to the device filesystem.

  • json: standard JSON.
  • yaml: YAML 1.2.
  • jsonc: JSON with comments (JSON plus // and /* */ comment syntax).
  • xml: XML.
  • text: plain, unstructured text with no specific format.
Available options:
json,
yaml,
jsonc,
xml,
text
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,
opaque
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:
config_type
Config Type · object

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

Example:
Last modified on August 17, 2026