{"openapi":"3.1.0","info":{"title":"Nairon service-api","description":"Platform control-plane API (flows, config, usage) + MCP server — Nairon version-2.","version":"0.2.0"},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Secret API key (nrn_sk_...) as a Bearer token"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"x-api-key","description":"Secret API key (nrn_sk_...)"}},"schemas":{}},"paths":{"/healthz":{"get":{"tags":["meta"],"description":"Liveness probe — no auth required.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"service":{"type":"string","enum":["service-api"]},"version":{"type":"string"}},"required":["status","service","version"],"additionalProperties":false}}}}}}},"/v1/projects/{projectId}/flows":{"get":{"tags":["flows"],"parameters":[{"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"flows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"projectId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"name":{"type":"string"},"type":{"type":"string","enum":["simple","graph"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"tier":{"type":"string","enum":["standard","pro"]},"agentProfileId":{"anyOf":[{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","projectId","name","type","description","tier","agentProfileId","createdAt","updatedAt"],"additionalProperties":false}}},"required":["flows"],"additionalProperties":false}}}}}},"post":{"tags":["flows"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":5000},"type":{"default":"simple","type":"string","enum":["simple","graph"]},"flowSchema":{},"agentProfileId":{"anyOf":[{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},{"type":"null"}]}},"required":["name","flowSchema"]}}}},"parameters":[{"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"in":"path","name":"projectId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"projectId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"name":{"type":"string"},"type":{"type":"string","enum":["simple","graph"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"tier":{"type":"string","enum":["standard","pro"]},"agentProfileId":{"anyOf":[{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","projectId","name","type","description","tier","agentProfileId","createdAt","updatedAt"],"additionalProperties":false}}}}}}},"/v1/flows/{flowId}":{"get":{"tags":["flows"],"parameters":[{"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"in":"path","name":"flowId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"projectId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"name":{"type":"string"},"type":{"type":"string","enum":["simple","graph"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"tier":{"type":"string","enum":["standard","pro"]},"agentProfileId":{"anyOf":[{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","projectId","name","type","description","tier","agentProfileId","createdAt","updatedAt"],"additionalProperties":false}}}}}},"patch":{"tags":["flows"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":5000},"agentProfileId":{"anyOf":[{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},{"type":"null"}]}}}}}},"parameters":[{"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"in":"path","name":"flowId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"projectId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"name":{"type":"string"},"type":{"type":"string","enum":["simple","graph"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"tier":{"type":"string","enum":["standard","pro"]},"agentProfileId":{"anyOf":[{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","projectId","name","type","description","tier","agentProfileId","createdAt","updatedAt"],"additionalProperties":false}}}}}},"delete":{"tags":["flows"],"parameters":[{"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"in":"path","name":"flowId","required":true}],"responses":{"204":{"description":"Default Response","content":{"application/json":{"schema":{}}}}}}},"/v1/flows/{flowId}/versions":{"get":{"tags":["flow-versions"],"parameters":[{"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"in":"path","name":"flowId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"versions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"flowId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tag":{"type":"string"},"flowSchema":{"anyOf":[{},{"type":"null"}]},"isActive":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","flowId","version","tag","flowSchema","isActive","createdAt","updatedAt"],"additionalProperties":false}}},"required":["versions"],"additionalProperties":false}}}}}},"post":{"tags":["flow-versions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"flowSchema":{}},"required":["flowSchema"]}}}},"parameters":[{"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"in":"path","name":"flowId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"flowId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tag":{"type":"string"},"flowSchema":{"anyOf":[{},{"type":"null"}]},"isActive":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","flowId","version","tag","flowSchema","isActive","createdAt","updatedAt"],"additionalProperties":false}}}}}}},"/v1/flow-versions/{versionId}":{"get":{"tags":["flow-versions"],"parameters":[{"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"in":"path","name":"versionId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"flowId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tag":{"type":"string"},"flowSchema":{"anyOf":[{},{"type":"null"}]},"isActive":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","flowId","version","tag","flowSchema","isActive","createdAt","updatedAt"],"additionalProperties":false}}}}}},"patch":{"tags":["flow-versions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tag":{"type":"string","minLength":1,"maxLength":100}},"required":["tag"]}}}},"parameters":[{"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"in":"path","name":"versionId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"flowId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tag":{"type":"string"},"flowSchema":{"anyOf":[{},{"type":"null"}]},"isActive":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","flowId","version","tag","flowSchema","isActive","createdAt","updatedAt"],"additionalProperties":false}}}}}},"delete":{"tags":["flow-versions"],"parameters":[{"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"in":"path","name":"versionId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"flowId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tag":{"type":"string"},"flowSchema":{"anyOf":[{},{"type":"null"}]},"isActive":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","flowId","version","tag","flowSchema","isActive","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]}}}}}}},"/v1/flow-versions/{versionId}/activate":{"post":{"tags":["flow-versions"],"parameters":[{"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"in":"path","name":"versionId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"flowId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tag":{"type":"string"},"flowSchema":{"anyOf":[{},{"type":"null"}]},"isActive":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","flowId","version","tag","flowSchema","isActive","createdAt","updatedAt"],"additionalProperties":false}}}}}}},"/v1/projects/{projectId}/phone-numbers":{"get":{"tags":["phone-numbers"],"parameters":[{"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"phoneNumbers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"projectId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"type":{"type":"string","enum":["nairon","partner","external"]},"name":{"type":"string"},"number":{"type":"string"},"status":{"type":"string","enum":["enabled","disabled"]},"flowId":{"anyOf":[{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},{"type":"null"}]},"externalPhoneFields":{"anyOf":[{},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","projectId","type","name","number","status","flowId","externalPhoneFields","createdAt","updatedAt"],"additionalProperties":false}}},"required":["phoneNumbers"],"additionalProperties":false}}}}}},"post":{"tags":["phone-numbers"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"number":{"type":"string","minLength":1,"maxLength":64},"status":{"default":"disabled","type":"string","enum":["enabled","disabled"]},"type":{"default":"nairon","type":"string","enum":["nairon","partner","external"]},"flowId":{"anyOf":[{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},{"type":"null"}]},"externalPhoneFields":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"required":["name","number"]}}}},"parameters":[{"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"in":"path","name":"projectId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"projectId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"type":{"type":"string","enum":["nairon","partner","external"]},"name":{"type":"string"},"number":{"type":"string"},"status":{"type":"string","enum":["enabled","disabled"]},"flowId":{"anyOf":[{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},{"type":"null"}]},"externalPhoneFields":{"anyOf":[{},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","projectId","type","name","number","status","flowId","externalPhoneFields","createdAt","updatedAt"],"additionalProperties":false}}}}}}},"/v1/phone-numbers/{phoneNumberId}/flow":{"patch":{"tags":["phone-numbers"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"flowId":{"anyOf":[{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},{"type":"null"}]}},"required":["flowId"]}}}},"parameters":[{"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"in":"path","name":"phoneNumberId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"projectId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"type":{"type":"string","enum":["nairon","partner","external"]},"name":{"type":"string"},"number":{"type":"string"},"status":{"type":"string","enum":["enabled","disabled"]},"flowId":{"anyOf":[{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},{"type":"null"}]},"externalPhoneFields":{"anyOf":[{},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","projectId","type","name","number","status","flowId","externalPhoneFields","createdAt","updatedAt"],"additionalProperties":false}}}}}}},"/v1/projects/{projectId}/agent-profiles":{"get":{"tags":["agent-profiles"],"parameters":[{"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"agentProfiles":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"projectId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"name":{"type":"string"},"isDefault":{"type":"boolean"},"supportedInputLanguages":{"type":"array","items":{"type":"string"}},"reasoningMode":{"type":"string"},"outputVoiceId":{"type":"string"},"flowIds":{"type":"array","items":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","projectId","name","isDefault","supportedInputLanguages","reasoningMode","outputVoiceId","flowIds","createdAt","updatedAt"],"additionalProperties":false}}},"required":["agentProfiles"],"additionalProperties":false}}}}}}},"/v1/agent-profiles/{agentProfileId}":{"get":{"tags":["agent-profiles"],"parameters":[{"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"in":"path","name":"agentProfileId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"projectId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"name":{"type":"string"},"isDefault":{"type":"boolean"},"supportedInputLanguages":{"type":"array","items":{"type":"string"}},"reasoningMode":{"type":"string"},"outputVoiceId":{"type":"string"},"flowIds":{"type":"array","items":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","projectId","name","isDefault","supportedInputLanguages","reasoningMode","outputVoiceId","flowIds","createdAt","updatedAt"],"additionalProperties":false}}}}}},"put":{"tags":["agent-profiles"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"flowIds":{"type":"array","items":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"}},"isDefault":{"type":"boolean"},"supportedInputLanguages":{"minItems":1,"type":"array","items":{"type":"string","enum":["de","el","en","es","fr","it","nl","pt"]}},"reasoningMode":{"type":"string","enum":["fast","balanced","smart","turbo"]},"outputVoiceId":{"type":"string","minLength":1,"maxLength":200}},"required":["name","flowIds","isDefault","supportedInputLanguages","reasoningMode","outputVoiceId"]}}}},"parameters":[{"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"in":"path","name":"agentProfileId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"projectId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"name":{"type":"string"},"isDefault":{"type":"boolean"},"supportedInputLanguages":{"type":"array","items":{"type":"string"}},"reasoningMode":{"type":"string"},"outputVoiceId":{"type":"string"},"flowIds":{"type":"array","items":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","projectId","name","isDefault","supportedInputLanguages","reasoningMode","outputVoiceId","flowIds","createdAt","updatedAt"],"additionalProperties":false}}}}}}},"/v1/projects/{projectId}/usage":{"get":{"tags":["usage"],"parameters":[{"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"in":"query","name":"to","required":false},{"schema":{"default":"day","type":"string","enum":["hour","day"]},"in":"query","name":"granularity","required":false},{"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"granularity":{"type":"string","enum":["hour","day"]},"points":{"type":"array","items":{"type":"object","properties":{"windowStart":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"windowEnd":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"service":{"type":"string","enum":["tts","stt","s2s","llm","kb","voice_minutes"]},"mode":{"anyOf":[{"type":"string","enum":["realtime","batch"]},{"type":"null"}]},"metric":{"type":"string","enum":["seconds","tokens_in","tokens_out","chars","minutes","requests"]},"quantity":{"type":"number"}},"required":["windowStart","windowEnd","service","mode","metric","quantity"],"additionalProperties":false}}},"required":["projectId","granularity","points"],"additionalProperties":false}}}}}}},"/v1/orgs/{orgId}/usage":{"get":{"tags":["usage"],"parameters":[{"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"in":"query","name":"to","required":false},{"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"in":"path","name":"orgId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"totals":{"type":"array","items":{"type":"object","properties":{"service":{"type":"string","enum":["tts","stt","s2s","llm","kb","voice_minutes"]},"mode":{"anyOf":[{"type":"string","enum":["realtime","batch"]},{"type":"null"}]},"metric":{"type":"string","enum":["seconds","tokens_in","tokens_out","chars","minutes","requests"]},"quantity":{"type":"number"}},"required":["service","mode","metric","quantity"],"additionalProperties":false}}},"required":["organizationId","totals"],"additionalProperties":false}}}}}}},"/internal/projects/{projectId}/api-keys":{"get":{"tags":["internal"],"parameters":[{"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"apiKeys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"name":{"type":"string"},"keyType":{"type":"string","enum":["publishable","secret"]},"keyPrefix":{"type":"string"},"last4":{"type":"string"},"status":{"type":"string","enum":["active","revoked"]},"lastUsedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","name","keyType","keyPrefix","last4","status","lastUsedAt","createdAt"],"additionalProperties":false}}},"required":["apiKeys"],"additionalProperties":false}}}}}},"post":{"tags":["internal"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"keyType":{"default":"secret","type":"string","enum":["publishable","secret"]}},"required":["name"]}}}},"parameters":[{"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"in":"path","name":"projectId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"apiKey":{"type":"object","properties":{"id":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"name":{"type":"string"},"keyType":{"type":"string","enum":["publishable","secret"]},"keyPrefix":{"type":"string"},"last4":{"type":"string"},"status":{"type":"string","enum":["active","revoked"]},"lastUsedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","name","keyType","keyPrefix","last4","status","lastUsedAt","createdAt"],"additionalProperties":false},"plaintext":{"type":"string"}},"required":["apiKey","plaintext"],"additionalProperties":false}}}}}}},"/internal/projects/{projectId}/api-keys/{apiKeyId}":{"delete":{"tags":["internal"],"parameters":[{"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"in":"path","name":"apiKeyId","required":true}],"responses":{"204":{"description":"Default Response","content":{"application/json":{"schema":{}}}}}}},"/internal/projects/{projectId}/usage":{"get":{"tags":["internal"],"parameters":[{"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"in":"query","name":"to","required":false},{"schema":{"default":"day","type":"string","enum":["hour","day"]},"in":"query","name":"granularity","required":false},{"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"granularity":{"type":"string","enum":["hour","day"]},"points":{"type":"array","items":{"type":"object","properties":{"windowStart":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"windowEnd":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"service":{"type":"string","enum":["tts","stt","s2s","llm","kb","voice_minutes"]},"mode":{"anyOf":[{"type":"string","enum":["realtime","batch"]},{"type":"null"}]},"metric":{"type":"string","enum":["seconds","tokens_in","tokens_out","chars","minutes","requests"]},"quantity":{"type":"number"}},"required":["windowStart","windowEnd","service","mode","metric","quantity"],"additionalProperties":false}}},"required":["projectId","granularity","points"],"additionalProperties":false}}}}}}},"/internal/orgs/{orgId}/usage":{"get":{"tags":["internal"],"parameters":[{"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"in":"query","name":"to","required":false},{"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"in":"path","name":"orgId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"totals":{"type":"array","items":{"type":"object","properties":{"service":{"type":"string","enum":["tts","stt","s2s","llm","kb","voice_minutes"]},"mode":{"anyOf":[{"type":"string","enum":["realtime","batch"]},{"type":"null"}]},"metric":{"type":"string","enum":["seconds","tokens_in","tokens_out","chars","minutes","requests"]},"quantity":{"type":"number"}},"required":["service","mode","metric","quantity"],"additionalProperties":false}}},"required":["organizationId","totals"],"additionalProperties":false}}}}}}},"/v1/partner/customers":{"post":{"tags":["partner"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"clientEmail":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","clientEmail"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"}},"required":["organizationId"],"additionalProperties":false}}}}}}},"/v1/partner":{"get":{"tags":["partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"organizationId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"type":{"type":"string","enum":["affiliate","implementation","reseller","full_service"]},"status":{"type":"string","enum":["active","suspended"]},"referralCode":{"type":"string"},"commissionRate":{"type":"number"},"companyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"commissions":{"type":"object","properties":{"referralCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"activeCustomers":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totalEarningsCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pendingEarningsCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["referralCount","activeCustomers","totalEarningsCents","pendingEarningsCents"],"additionalProperties":false}},"required":["id","organizationId","type","status","referralCode","commissionRate","companyName","website","country","commissions"],"additionalProperties":false}}}}}}},"/v1/templates":{"get":{"tags":["headless"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"templates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"headlessIntegratorId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["draft","published","archived"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","headlessIntegratorId","name","description","status","createdAt","updatedAt"],"additionalProperties":false}}},"required":["templates"],"additionalProperties":false}}}}}},"post":{"tags":["headless"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000}},"required":["name"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"headlessIntegratorId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["draft","published","archived"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","headlessIntegratorId","name","description","status","createdAt","updatedAt"],"additionalProperties":false}}}}}}},"/v1/templates/{templateId}":{"get":{"tags":["headless"],"parameters":[{"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"in":"path","name":"templateId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"headlessIntegratorId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["draft","published","archived"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","headlessIntegratorId","name","description","status","createdAt","updatedAt"],"additionalProperties":false}}}}}}},"/v1/templates/{templateId}/versions":{"get":{"tags":["headless"],"parameters":[{"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"in":"path","name":"templateId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"versions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"templateId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tag":{"anyOf":[{"type":"string"},{"type":"null"}]},"payload":{},"fieldsSchema":{},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","templateId","version","tag","payload","fieldsSchema","publishedAt","createdAt","updatedAt"],"additionalProperties":false}}},"required":["versions"],"additionalProperties":false}}}}}},"post":{"tags":["headless"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"payload":{"type":"object","properties":{"flows":{"minItems":1,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":100},"name":{"type":"string","minLength":1,"maxLength":200},"flowType":{"type":"string","enum":["simple","graph"]},"flowSchema":{}},"required":["key","name","flowType","flowSchema"]}},"agentProfile":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"reasoningMode":{"type":"string","enum":["fast","balanced","smart","turbo"]},"supportedInputLanguages":{"minItems":1,"type":"array","items":{"type":"string"}},"outputVoiceId":{"type":"string"}},"required":["name","reasoningMode","supportedInputLanguages"]},"knowledgeBases":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":100},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000}},"required":["key","name"]}},"integrations":{"type":"array","items":{"type":"object","properties":{"integrationTemplateId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"}},"required":["integrationTemplateId"]}},"phoneNumberRequirements":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":100},"label":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000}},"required":["key","label"]}}},"required":["flows"]},"tag":{"type":"string","maxLength":100},"fieldsSchema":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-zA-Z_][a-zA-Z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":200},"type":{"type":"string","enum":["string","number","boolean"]},"required":{"type":"boolean"},"defaultValue":{"type":"string","maxLength":2000},"helpText":{"type":"string","maxLength":2000}},"required":["key","label","type","required"]}}},"required":["payload"]}}}},"parameters":[{"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"in":"path","name":"templateId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"templateId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tag":{"anyOf":[{"type":"string"},{"type":"null"}]},"payload":{},"fieldsSchema":{},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","templateId","version","tag","payload","fieldsSchema","publishedAt","createdAt","updatedAt"],"additionalProperties":false}}}}}}},"/v1/template-versions/{versionId}/publish":{"post":{"tags":["headless"],"parameters":[{"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"in":"path","name":"versionId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"templateId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tag":{"anyOf":[{"type":"string"},{"type":"null"}]},"payload":{},"fieldsSchema":{},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","templateId","version","tag","payload","fieldsSchema","publishedAt","createdAt","updatedAt"],"additionalProperties":false}}}}}}},"/v1/templates/{templateId}/instances":{"get":{"tags":["headless"],"parameters":[{"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"in":"path","name":"templateId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"instances":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"templateId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"templateVersionId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"organizationId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"projectId":{"anyOf":[{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},{"type":"null"}]},"name":{"type":"string"},"fieldValues":{},"status":{"type":"string","enum":["provisioning","active","update_available","updating","failed","archived"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","templateId","templateVersionId","organizationId","projectId","name","fieldValues","status","createdAt","updatedAt"],"additionalProperties":false}}},"required":["instances"],"additionalProperties":false}}}}}},"post":{"tags":["headless"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"name":{"type":"string","minLength":1,"maxLength":200},"fieldValues":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["organizationId","name","fieldValues"]}}}},"parameters":[{"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"in":"path","name":"templateId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"instanceId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"projectId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"}},"required":["instanceId","projectId"],"additionalProperties":false}}}}}}},"/v1/instances/{instanceId}":{"get":{"tags":["headless"],"parameters":[{"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"in":"path","name":"instanceId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"templateId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"templateVersionId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"organizationId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"projectId":{"anyOf":[{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},{"type":"null"}]},"name":{"type":"string"},"fieldValues":{},"status":{"type":"string","enum":["provisioning","active","update_available","updating","failed","archived"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","templateId","templateVersionId","organizationId","projectId","name","fieldValues","status","createdAt","updatedAt"],"additionalProperties":false}}}}}}},"/v1/instances/{instanceId}/upgrade":{"post":{"tags":["headless"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"targetTemplateVersionId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"newFieldValues":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["targetTemplateVersionId"]}}}},"parameters":[{"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"in":"path","name":"instanceId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"templateId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"templateVersionId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"organizationId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"projectId":{"anyOf":[{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},{"type":"null"}]},"name":{"type":"string"},"fieldValues":{},"status":{"type":"string","enum":["provisioning","active","update_available","updating","failed","archived"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","templateId","templateVersionId","organizationId","projectId","name","fieldValues","status","createdAt","updatedAt"],"additionalProperties":false}}}}}}},"/mcp":{"post":{"responses":{"200":{"description":"Default Response"}}},"get":{"responses":{"200":{"description":"Default Response"}}},"delete":{"responses":{"200":{"description":"Default Response"}}}}},"servers":[{"url":"https://service.v2.nairon.xyz","description":"platform-v2"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}]}