headless-API
Everything on the headless dashboard — authoring templates, publishing versions, and
creating instances — is also available as a plain REST API on service.v2.nairon.xyz,
authenticated with a secret API key (nrn_sk_...) as Authorization: Bearer nrn_sk_... or
x-api-key. Instance creation from either path goes through the same materialization logic, so
scripting instance rollout is a first-class path, not a workaround.
Templates & versions
Section titled “Templates & versions”| Method & path | Purpose |
|---|---|
GET /v1/templates |
List templates. |
POST /v1/templates |
Create a template. |
GET /v1/templates/{templateId} |
Get a template. |
GET /v1/templates/{templateId}/versions |
List template versions. |
POST /v1/templates/{templateId}/versions |
Save a template version (payload with {{field}} placeholders, fieldsSchema). |
POST /v1/template-versions/{versionId}/publish |
Publish a version. |
Instances
Section titled “Instances”# Materialize an instancecurl -X POST https://service.v2.nairon.xyz/v1/templates/TEMPLATE_ID/instances \ -H "Authorization: Bearer NAIRON_API_KEY" -H "Content-Type: application/json" \ -d '{"templateVersionId": "VERSION_ID", "tenantOrganizationId": "ORG_ID", "fieldValues": { /* ... */ }}'
# Upgrade an instance to a newer published versioncurl -X POST https://service.v2.nairon.xyz/v1/instances/INSTANCE_ID/upgrade \ -H "Authorization: Bearer NAIRON_API_KEY"| Method & path | Purpose |
|---|---|
GET /v1/templates/{templateId}/instances |
List instances of a template. |
POST /v1/templates/{templateId}/instances |
Create (materialize) an instance. |
GET /v1/instances/{instanceId} |
Get an instance. |
POST /v1/instances/{instanceId}/upgrade |
Upgrade an instance to a newer published template version. |
See the full service-api reference for every endpoint and schema, or connect via the MCP server instead of raw REST.