{"openapi":"3.0.0","info":{"title":"Ingram Cloud API","version":"1","description":"REST API for Ingram Cloud: run agents, manage sessions, memory, and connectors. See https://cloud.ingram.tech/docs"},"servers":[{"url":"https://api.cloud.ingram.tech"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"A tenant-admin or smith-scoped token (the `tha_`/`thp_` handle is the bearer value). See the auth docs."}},"schemas":{"CatalogListOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CatalogEntryOut"}}},"required":["data"]},"CatalogEntryOut":{"type":"object","properties":{"slug":{"type":"string"},"display_name":{"type":"string"},"description":{"type":"string"},"mcp_url":{"type":"string"},"auth":{"type":"object","properties":{"kind":{"type":"string"},"provider":{"type":"string","nullable":true},"client_mode":{"type":"string"}},"required":["kind","provider","client_mode"]},"scopes":{"type":"array","items":{"type":"string"}},"default_allowlist":{"type":"array","nullable":true,"items":{"type":"string"}},"default_approval_policy":{"type":"array","items":{"type":"object","properties":{"match":{"type":"string"},"require":{"type":"string"}},"required":["match"]}},"logo_url":{"type":"string","nullable":true},"docs_url":{"type":"string","nullable":true}},"required":["slug","display_name","description","mcp_url","auth","scopes","default_allowlist","default_approval_policy","logo_url","docs_url"]},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string"},"param":{"type":"string","nullable":true},"code":{"type":"string"}},"required":["message","type","param","code"]}},"required":["error"]},"ApprovalListOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApprovalOut"}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","has_more"]},"ApprovalOut":{"type":"object","properties":{"id":{"type":"string"},"run_id":{"type":"string","nullable":true},"smith_id":{"type":"string","nullable":true},"tool_call_id":{"type":"string","nullable":true},"tool":{"type":"string","nullable":true},"args":{"type":"object","additionalProperties":{"nullable":true}},"status":{"type":"string"},"actor":{"type":"string","nullable":true},"reason":{"type":"string","nullable":true},"created_at":{"type":"string","nullable":true},"resolved_at":{"type":"string","nullable":true}},"required":["id","run_id","smith_id","tool_call_id","tool","args","status","actor","reason","created_at","resolved_at"]},"ProjectOut":{"type":"object","properties":{"id":{"type":"string"},"organization":{"type":"string"},"name":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"nullable":true}},"created_at":{"type":"string","nullable":true},"archived_at":{"type":"string","nullable":true}},"required":["id","organization","name","metadata","created_at","archived_at"]},"ProjectIn":{"type":"object","properties":{"name":{"type":"string"},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}}},"required":["name"]},"ProjectListOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ProjectOut"}}},"required":["data"]},"ProjectTokenOut":{"type":"object","properties":{"id":{"type":"string"},"token":{"type":"string"},"scope":{"type":"string"},"sub":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"expires_at":{"type":"string","nullable":true}},"required":["id","token","scope","sub","scopes","expires_at"]},"ProjectTokenIn":{"type":"object","properties":{"ttl_seconds":{"type":"integer","nullable":true},"name":{"type":"string","nullable":true}}},"CustomerOut":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"external_ids":{"type":"object","additionalProperties":{"type":"string"}},"metadata":{"type":"object","additionalProperties":{"nullable":true}},"smith_count":{"type":"integer"},"created_at":{"type":"string","nullable":true}},"required":["id","name","external_ids","metadata","created_at"]},"CustomerCreate":{"type":"object","properties":{"name":{"type":"string"},"external_ids":{"type":"object","additionalProperties":{"type":"string"}},"metadata":{"type":"object","additionalProperties":{"nullable":true}}},"required":["name"]},"CustomerListOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CustomerOut"}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]},"CustomerPatch":{"type":"object","properties":{"name":{"type":"string","nullable":true},"external_ids":{"type":"object","nullable":true,"additionalProperties":{"type":"string"}},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}}}},"BudgetOut":{"type":"object","properties":{"id":{"type":"string"},"scope":{"type":"string","enum":["tenant","smith","customer"]},"scope_id":{"type":"string","nullable":true},"period":{"type":"string"},"limit_usd":{"type":"number"},"action":{"type":"string","enum":["warn","block"]},"created_at":{"type":"string","nullable":true}},"required":["id","scope","period","limit_usd","action"]},"BudgetIn":{"type":"object","properties":{"scope":{"type":"string"},"scope_id":{"type":"string","nullable":true},"limit_usd":{"type":"number"},"action":{"type":"string","default":"warn"},"period":{"type":"string","default":"monthly"}},"required":["scope","limit_usd"]},"BudgetListOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BudgetOut"}}},"required":["data"]},"BudgetStatusOut":{"type":"object","properties":{"id":{"type":"string"},"scope":{"type":"string","enum":["tenant","smith","customer"]},"scope_id":{"type":"string","nullable":true},"period":{"type":"string"},"limit_usd":{"type":"number"},"action":{"type":"string","enum":["warn","block"]},"created_at":{"type":"string","nullable":true},"period_start":{"type":"string"},"period_key":{"type":"string"},"spent":{"type":"number"},"pct":{"type":"number"},"over":{"type":"boolean"}},"required":["id","scope","period","limit_usd","action","period_start","period_key","spent","pct","over"]},"BudgetPatch":{"type":"object","properties":{"limit_usd":{"type":"number","nullable":true},"action":{"type":"string","nullable":true}}},"ScheduleOut":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"cron":{"type":"string"},"timezone":{"type":"string"},"input":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"thread_id":{"type":"string","nullable":true},"max_concurrent":{"type":"integer"},"on_failure":{"type":"string"},"enabled":{"type":"boolean"},"next_fire_at":{"type":"string","nullable":true},"last_fire_at":{"type":"string","nullable":true},"created_at":{"type":"string","nullable":true}},"required":["id","name","cron","timezone","input","thread_id","max_concurrent","on_failure","enabled","next_fire_at","last_fire_at","created_at"]},"ScheduleIn":{"type":"object","properties":{"cron":{"type":"string"},"name":{"type":"string","nullable":true},"timezone":{"type":"string","default":"UTC"},"input":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}},"default":[]},"thread_id":{"type":"string","nullable":true},"max_concurrent":{"type":"integer","default":1},"on_failure":{"type":"string","default":"webhook"},"enabled":{"type":"boolean","default":true}},"required":["cron"]},"ScheduleListOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ScheduleOut"}}},"required":["data"]},"SchedulePatch":{"type":"object","properties":{"name":{"type":"string","nullable":true},"cron":{"type":"string","nullable":true},"timezone":{"type":"string","nullable":true},"input":{"type":"array","nullable":true,"items":{"type":"object","additionalProperties":{"nullable":true}}},"thread_id":{"type":"string","nullable":true},"max_concurrent":{"type":"integer","nullable":true},"on_failure":{"type":"string","nullable":true},"enabled":{"type":"boolean","nullable":true}}},"ScheduleRunNowOut":{"type":"object","properties":{"schedule_id":{"type":"string"},"run":{"type":"object","additionalProperties":{"nullable":true}}},"required":["schedule_id","run"]},"ConnectionOut":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"expires_at":{"type":"string","nullable":true},"metadata":{"type":"object","additionalProperties":{"nullable":true}},"created_at":{"type":"string","nullable":true}},"required":["id","provider","scopes","status","expires_at","created_at"]},"ConnectionIn":{"type":"object","properties":{"provider":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"credential":{"$ref":"#/components/schemas/Credential"},"metadata":{"type":"object","additionalProperties":{"nullable":true}}},"required":["provider","credential"]},"Credential":{"type":"object","properties":{"kind":{"type":"string"},"access_token":{"type":"string","nullable":true},"refresh_token":{"type":"string","nullable":true},"expires_at":{"type":"string","nullable":true},"token_uri":{"type":"string","nullable":true}}},"ConnectionListOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ConnectionOut"}}},"required":["data"]},"ConnectionPatch":{"type":"object","properties":{"scopes":{"type":"array","nullable":true,"items":{"type":"string"}},"credential":{"allOf":[{"$ref":"#/components/schemas/Credential"},{"nullable":true}]},"status":{"type":"string","nullable":true},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}}}},"AuthorizeOut":{"type":"object","properties":{"authorize_url":{"type":"string","nullable":true},"provider":{"type":"string"}},"required":["authorize_url","provider"]},"AuthorizeIn":{"type":"object","properties":{"provider":{"type":"string"},"return_url":{"type":"string","nullable":true},"mcp_server":{"type":"string","nullable":true}},"required":["provider"]},"ConversationOut":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["conversation"]},"created_at":{"type":"integer"},"updated_at":{"type":"integer"},"title":{"type":"string","nullable":true},"smith_id":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"nullable":true}}},"required":["id","object","created_at","updated_at","title","smith_id","metadata"]},"ConversationCreate":{"type":"object","properties":{"title":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"nullable":true}}}},"ConversationListOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ConversationOut"}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","has_more"]},"ConversationUpdate":{"type":"object","properties":{"title":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"nullable":true}}}},"ConversationDeleted":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["conversation.deleted"]},"deleted":{"type":"boolean","enum":[true]}},"required":["id","object","deleted"]},"ConversationItemListOut":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/ConversationItem"}},"first_id":{"type":"string","nullable":true},"last_id":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["object","data","first_id","last_id","has_more"]},"ConversationItem":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"role":{"type":"string"},"status":{"type":"string"},"content":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}}},"required":["id","type"]},"DeploymentCreatedOut":{"type":"object","properties":{"id":{"type":"string"},"target":{"$ref":"#/components/schemas/DeploymentTarget"},"kind":{"type":"string"},"address":{"type":"string","nullable":true},"provider":{"type":"string","nullable":true},"provider_metadata":{"type":"object","additionalProperties":{"nullable":true}},"secret_keys":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"created_at":{"type":"string","nullable":true},"start_token":{"type":"string"},"deep_link":{"type":"string"},"prefilled_message":{"type":"string"},"install_url":{"type":"string"},"state":{"type":"string"},"slack_app_id":{"type":"string"}},"required":["id","target","kind","address","provider","status","created_at"]},"DeploymentTarget":{"type":"object","properties":{"type":{"type":"string","enum":["smith","agent"]},"id":{"type":"string"}},"required":["type","id"]},"DeploymentIn":{"type":"object","properties":{"target":{"$ref":"#/components/schemas/DeploymentTarget"},"kind":{"type":"string"},"address":{"type":"string","nullable":true},"provider":{"type":"string","nullable":true},"provider_metadata":{"type":"object","additionalProperties":{"nullable":true}},"secrets":{"type":"object","additionalProperties":{"nullable":true}},"setup":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}}},"required":["target","kind"]},"DeploymentListOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentOut"}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","has_more"]},"DeploymentOut":{"type":"object","properties":{"id":{"type":"string"},"target":{"$ref":"#/components/schemas/DeploymentTarget"},"kind":{"type":"string"},"address":{"type":"string","nullable":true},"provider":{"type":"string","nullable":true},"provider_metadata":{"type":"object","additionalProperties":{"nullable":true}},"secret_keys":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"created_at":{"type":"string","nullable":true}},"required":["id","target","kind","address","provider","status","created_at"]},"DeploymentPatch":{"type":"object","properties":{"display_name":{"type":"string","nullable":true},"owner_email":{"type":"string","nullable":true}}},"AgentOut":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string","nullable":true},"name":{"type":"string"},"is_default":{"type":"boolean"},"draft":{"$ref":"#/components/schemas/AgentDraft"},"active_version":{"type":"integer","nullable":true},"rollout_version":{"type":"integer","nullable":true},"rollout_percent":{"type":"integer"},"smith_count":{"type":"integer"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true}},"required":["id","slug","name","is_default","draft","active_version","rollout_version","rollout_percent","created_at","updated_at"]},"AgentDraft":{"type":"object","properties":{"instructions":{"type":"string","nullable":true},"model":{"type":"string","nullable":true},"enabled_hosted_tools":{"type":"array","items":{"type":"string"}},"auto_memory":{"type":"boolean","nullable":true},"variables":{"type":"array","items":{"$ref":"#/components/schemas/AgentVariable"}}},"required":["instructions","model","enabled_hosted_tools","auto_memory","variables"]},"AgentVariable":{"type":"object","properties":{"name":{"type":"string"},"default":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"required":{"type":"boolean"}},"required":["name"]},"AgentIn":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string","nullable":true},"instructions":{"type":"string","nullable":true},"model":{"type":"string","nullable":true},"enabled_hosted_tools":{"type":"array","nullable":true,"items":{"type":"string"}},"auto_memory":{"type":"boolean","nullable":true},"variables":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/AgentVariable"}}},"required":["name"]},"AgentListOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AgentOut"}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","has_more"]},"AgentPatch":{"type":"object","properties":{"name":{"type":"string","nullable":true},"instructions":{"type":"string","nullable":true},"model":{"type":"string","nullable":true},"enabled_hosted_tools":{"type":"array","nullable":true,"items":{"type":"string"}},"auto_memory":{"type":"boolean","nullable":true},"variables":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/AgentVariable"}}}},"AgentVersionListOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AgentVersionOut"}}},"required":["data"]},"AgentVersionOut":{"type":"object","properties":{"version":{"type":"integer"},"snapshot":{"type":"object","properties":{"instructions":{"type":"string","nullable":true},"model":{"type":"string","nullable":true},"enabled_hosted_tools":{"type":"array","items":{"type":"string"}},"auto_memory":{"type":"boolean","nullable":true},"variables":{"type":"array","items":{"$ref":"#/components/schemas/AgentVariable"}}}},"created_by":{"type":"string","nullable":true},"note":{"type":"string","nullable":true},"created_at":{"type":"string","nullable":true}},"required":["version","snapshot","created_by","note","created_at"]},"PublishIn":{"type":"object","properties":{"note":{"type":"string","nullable":true}}},"RolloutIn":{"type":"object","properties":{"version":{"type":"integer"},"percent":{"type":"integer","minimum":0,"maximum":100,"default":100}},"required":["version"]},"ImportIn":{"type":"object","properties":{"from_smith":{"type":"string"},"name":{"type":"string"}},"required":["from_smith","name"]},"AttachOut":{"type":"object","properties":{"attached":{"type":"array","items":{"type":"object","properties":{"smith_id":{"type":"string"},"override_keys":{"type":"array","items":{"type":"string"}}},"required":["smith_id","override_keys"]}},"count":{"type":"integer"}},"required":["attached","count"]},"AttachIn":{"type":"object","properties":{"all":{"type":"boolean","default":false},"smith_ids":{"type":"array","nullable":true,"items":{"type":"string"}}}},"SmithOut":{"type":"object","properties":{"id":{"type":"string"},"external_id":{"type":"string","nullable":true},"display_name":{"type":"string","nullable":true},"locale":{"type":"string","nullable":true},"timezone":{"type":"string","nullable":true},"customer_id":{"type":"string","nullable":true},"metadata":{"type":"object","additionalProperties":{"nullable":true}},"model":{"type":"string"},"instructions":{"type":"string"},"rendered_instructions":{"type":"string","nullable":true},"enabled_hosted_tools":{"type":"array","items":{"type":"string"}},"auto_memory":{"type":"boolean"},"config_source":{"type":"string","enum":["agent","override","custom"]},"agent_id":{"type":"string","nullable":true},"agent_version":{"type":"integer","nullable":true},"pin":{"type":"integer","nullable":true},"created_at":{"type":"string"}},"required":["id","external_id","display_name","locale","timezone","model","instructions","created_at"]},"SmithCreate":{"type":"object","properties":{"external_id":{"type":"string","nullable":true},"display_name":{"type":"string","nullable":true},"locale":{"type":"string","nullable":true},"timezone":{"type":"string","nullable":true},"customer_id":{"type":"string","nullable":true},"metadata":{"type":"object","additionalProperties":{"nullable":true}},"agent_id":{"type":"string","nullable":true},"pin":{"type":"integer","nullable":true},"model":{"type":"string","nullable":true},"instructions":{"type":"string","nullable":true},"enabled_hosted_tools":{"type":"array","nullable":true,"items":{"type":"string"}},"auto_memory":{"type":"boolean","nullable":true}}},"SmithListOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SmithOut"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true}},"required":["data","has_more"]},"SmithPatch":{"type":"object","properties":{"display_name":{"type":"string","nullable":true},"locale":{"type":"string","nullable":true},"timezone":{"type":"string","nullable":true},"customer_id":{"type":"string","nullable":true},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"agent_id":{"type":"string","nullable":true},"pin":{"type":"integer","nullable":true},"model":{"type":"string","nullable":true},"instructions":{"type":"string","nullable":true},"enabled_hosted_tools":{"type":"array","nullable":true,"items":{"type":"string"}},"auto_memory":{"type":"boolean","nullable":true}}},"RevisionListOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SmithRevisionOut"}}},"required":["data"]},"SmithRevisionOut":{"type":"object","properties":{"version":{"type":"integer"},"snapshot":{"type":"object","properties":{"instructions":{"type":"string","nullable":true},"model":{"type":"string","nullable":true},"enabled_hosted_tools":{"type":"array","items":{"type":"string"}},"auto_memory":{"type":"boolean"}}},"created_by":{"type":"string","nullable":true},"note":{"type":"string","nullable":true},"created_at":{"type":"string","nullable":true}},"required":["version","snapshot"]},"RestoreIn":{"type":"object","properties":{"note":{"type":"string","nullable":true}}},"RunListOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RunOut"}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","has_more"]},"RunOut":{"type":"object","properties":{"id":{"type":"string"},"smith_id":{"type":"string"},"thread_id":{"type":"string"},"status":{"type":"string"},"channel":{"type":"string"},"input":{"type":"array","items":{"$ref":"#/components/schemas/InputMessage"}},"output":{"type":"object","nullable":true,"properties":{"content":{"type":"string"},"content_type":{"type":"string"},"tool_calls":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"suggested_replies":{"type":"array","items":{"type":"string"}}}},"stop_reason":{"type":"string","nullable":true},"usage":{"$ref":"#/components/schemas/RunUsage"},"metadata":{"type":"object","additionalProperties":{"nullable":true}},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true}},"required":["id","smith_id","thread_id","status","channel","input","output","stop_reason","usage","created_at","updated_at"]},"InputMessage":{"type":"object","properties":{"role":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}}]}},"required":["role","content"]},"RunUsage":{"type":"object","nullable":true,"properties":{"input_tokens":{"type":"number"},"output_tokens":{"type":"number"},"total_tokens":{"type":"number"},"cost":{"type":"number"}},"required":["input_tokens","output_tokens","total_tokens"]},"MemoryBatchOut":{"type":"object","properties":{"memories":{"type":"array","items":{"$ref":"#/components/schemas/MemoryOut"}}},"required":["memories"]},"MemoryOut":{"type":"object","properties":{"id":{"type":"string"},"category":{"type":"string","nullable":true},"subject":{"type":"string","nullable":true},"content":{"type":"string"},"source":{"type":"string","nullable":true},"confidence":{"type":"number","nullable":true},"score":{"type":"number","nullable":true},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true}},"required":["id","category","subject","content","source","created_at","updated_at"]},"MemoryBatch":{"type":"object","properties":{"memories":{"type":"array","items":{"$ref":"#/components/schemas/MemoryIn"}}},"required":["memories"]},"MemoryIn":{"type":"object","properties":{"category":{"type":"string","nullable":true},"subject":{"type":"string","nullable":true},"content":{"type":"string"},"source":{"type":"string","nullable":true},"confidence":{"type":"number","nullable":true},"metadata":{"type":"object","additionalProperties":{"nullable":true}}},"required":["content"]},"MemoryListOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MemoryOut"}},"has_more":{"type":"boolean"}},"required":["data","has_more"]},"MemorySearchOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MemoryOut"}}},"required":["data"]},"SearchBody":{"type":"object","properties":{"query":{"type":"string"},"categories":{"type":"array","nullable":true,"items":{"type":"string"}},"limit":{"type":"integer","default":10}},"required":["query"]},"MemoryPatch":{"type":"object","properties":{"category":{"type":"string","nullable":true},"subject":{"type":"string","nullable":true},"content":{"type":"string","nullable":true},"source":{"type":"string","nullable":true},"confidence":{"type":"number","nullable":true},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}}}},"BlockListOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BlockOut"}}},"required":["data"]},"BlockOut":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"value":{"type":"string"},"char_limit":{"type":"integer"},"updated_at":{"type":"string","nullable":true}},"required":["id","label","description","value","char_limit","updated_at"]},"BlockSingleOut":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BlockOut"}},"required":["data"]},"BlockPatch":{"type":"object","properties":{"value":{"type":"string"},"mode":{"type":"string","enum":["replace","append"],"default":"replace"}},"required":["value"]},"McpServerWriteOut":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"auth":{"$ref":"#/components/schemas/McpAuth"},"origin":{"type":"string"},"catalog_slug":{"type":"string","nullable":true},"tool_allowlist":{"type":"array","nullable":true,"items":{"type":"string"}},"approval_policy":{"type":"array","items":{"$ref":"#/components/schemas/ApprovalRule"}},"tools":{"type":"array","items":{"$ref":"#/components/schemas/McpTool"}},"tools_refreshed_at":{"type":"string","nullable":true},"status":{"type":"string"},"discovery_error":{"type":"string","nullable":true},"created_at":{"type":"string","nullable":true},"tools_discovered":{"type":"integer"}},"required":["id","name","url","auth","tools","tools_refreshed_at","status","discovery_error","created_at","tools_discovered"]},"McpAuth":{"type":"object","properties":{"kind":{"type":"string"},"provider":{"type":"string","nullable":true},"client_mode":{"type":"string"}},"required":["kind","provider"]},"ApprovalRule":{"type":"object","properties":{"match":{"type":"string"},"require":{"type":"string"}},"required":["match"]},"McpTool":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"requires_approval":{"type":"boolean"},"enabled":{"type":"boolean"}},"required":["name","description","requires_approval","enabled"]},"McpServerIn":{"type":"object","properties":{"url":{"type":"string","nullable":true},"catalog":{"type":"string","nullable":true},"auth":{"$ref":"#/components/schemas/McpAuthIn"},"tool_allowlist":{"type":"array","nullable":true,"items":{"type":"string"}},"approval_policy":{"type":"array","nullable":true,"items":{"type":"object","properties":{"match":{"type":"string"},"require":{"type":"string"}},"required":["match"],"additionalProperties":{"nullable":true}}}}},"McpAuthIn":{"type":"object","nullable":true,"properties":{"kind":{"type":"string","nullable":true},"provider":{"type":"string","nullable":true},"secret":{"type":"string","nullable":true},"client_mode":{"type":"string","nullable":true}}},"McpServerListOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/McpServerOut"}}},"required":["data"]},"McpServerOut":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"auth":{"$ref":"#/components/schemas/McpAuth"},"origin":{"type":"string"},"catalog_slug":{"type":"string","nullable":true},"tool_allowlist":{"type":"array","nullable":true,"items":{"type":"string"}},"approval_policy":{"type":"array","items":{"$ref":"#/components/schemas/ApprovalRule"}},"tools":{"type":"array","items":{"$ref":"#/components/schemas/McpTool"}},"tools_refreshed_at":{"type":"string","nullable":true},"status":{"type":"string"},"discovery_error":{"type":"string","nullable":true},"created_at":{"type":"string","nullable":true}},"required":["id","name","url","auth","tools","tools_refreshed_at","status","discovery_error","created_at"]},"TraceListOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TraceOut"}}},"required":["data"]},"TraceOut":{"type":"object","properties":{"id":{"type":"string"},"smith_id":{"type":"string"},"app_id":{"type":"string","nullable":true},"root_kind":{"$ref":"#/components/schemas/SpanKind"},"name":{"type":"string"},"status":{"type":"string"},"started_at":{"type":"string"},"ended_at":{"type":"string","nullable":true},"duration_ms":{"type":"integer","nullable":true},"total_tokens":{"type":"integer","nullable":true},"total_cost":{"type":"number","nullable":true},"attributes":{"type":"object","additionalProperties":{"nullable":true}}},"required":["id","smith_id","app_id","root_kind","name","status","started_at","ended_at","duration_ms","total_tokens","total_cost","attributes"]},"SpanKind":{"type":"string","enum":["run","model_call","tool_call","memory_op","retrieval","sub_agent","runtime_event"]},"TraceDetailOut":{"type":"object","properties":{"id":{"type":"string"},"smith_id":{"type":"string"},"app_id":{"type":"string","nullable":true},"root_kind":{"$ref":"#/components/schemas/SpanKind"},"name":{"type":"string"},"status":{"type":"string"},"started_at":{"type":"string"},"ended_at":{"type":"string","nullable":true},"duration_ms":{"type":"integer","nullable":true},"total_tokens":{"type":"integer","nullable":true},"total_cost":{"type":"number","nullable":true},"attributes":{"type":"object","additionalProperties":{"nullable":true}},"spans":{"type":"array","items":{"$ref":"#/components/schemas/SpanOut"}},"span_tree":{"type":"array","items":{"$ref":"#/components/schemas/SpanNodeOut"}}},"required":["id","smith_id","app_id","root_kind","name","status","started_at","ended_at","duration_ms","total_tokens","total_cost","attributes","spans","span_tree"]},"SpanOut":{"type":"object","properties":{"id":{"type":"string"},"trace_id":{"type":"string"},"parent_span_id":{"type":"string","nullable":true},"kind":{"$ref":"#/components/schemas/SpanKind"},"name":{"type":"string"},"status":{"type":"string"},"started_at":{"type":"string"},"ended_at":{"type":"string","nullable":true},"duration_ms":{"type":"integer","nullable":true},"model":{"type":"string","nullable":true},"input_tokens":{"type":"integer","nullable":true},"output_tokens":{"type":"integer","nullable":true},"cost":{"type":"number","nullable":true},"attributes":{"type":"object","additionalProperties":{"nullable":true}}},"required":["id","trace_id","parent_span_id","kind","name","status","started_at","ended_at","duration_ms","model","input_tokens","output_tokens","cost","attributes"]},"SpanNodeOut":{"type":"object","properties":{"id":{"type":"string"},"trace_id":{"type":"string"},"parent_span_id":{"type":"string","nullable":true},"kind":{"$ref":"#/components/schemas/SpanKind"},"name":{"type":"string"},"status":{"type":"string"},"started_at":{"type":"string"},"ended_at":{"type":"string","nullable":true},"duration_ms":{"type":"integer","nullable":true},"model":{"type":"string","nullable":true},"input_tokens":{"type":"integer","nullable":true},"output_tokens":{"type":"integer","nullable":true},"cost":{"type":"number","nullable":true},"attributes":{"type":"object","additionalProperties":{"nullable":true}},"children":{"type":"array","items":{"$ref":"#/components/schemas/SpanNodeOut"}}},"required":["id","trace_id","parent_span_id","kind","name","status","started_at","ended_at","duration_ms","model","input_tokens","output_tokens","cost","attributes","children"]},"UsageBreakdownOut":{"type":"object","properties":{"group_by":{"type":"string","enum":["app","smith","model","customer"]},"totals":{"type":"object","properties":{"tokens":{"type":"number"},"cost":{"type":"number"},"run_count":{"type":"number"}},"required":["tokens","cost","run_count"]},"groups":{"type":"array","items":{"type":"object","properties":{"app":{"type":"string","nullable":true},"smith":{"type":"string","nullable":true},"model":{"type":"string","nullable":true},"customer":{"type":"string","nullable":true},"tokens":{"type":"number"},"cost":{"type":"number"},"run_count":{"type":"number"}},"required":["tokens","cost","run_count"]}},"meters":{"type":"array","items":{"type":"object","properties":{"meter":{"type":"string"},"customer":{"type":"string","nullable":true},"quantity":{"type":"number"},"events":{"type":"number"}},"required":["meter","quantity","events"]}}},"required":["group_by","totals","groups"]},"UsageEventListOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/UsageEventOut"}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]},"UsageEventOut":{"type":"object","properties":{"id":{"type":"string"},"smith_id":{"type":"string"},"customer_id":{"type":"string","nullable":true},"meter":{"type":"string"},"quantity":{"type":"number"},"day":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"nullable":true}},"created_at":{"type":"string","nullable":true}},"required":["id","smith_id","customer_id","meter","quantity","day","metadata","created_at"]},"TraceIngestOut":{"type":"object","properties":{"accepted":{"type":"integer"}},"required":["accepted"]},"TraceIngestIn":{"type":"object","properties":{"spans":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}}}},"UsageEventIn":{"type":"object","properties":{"smith_id":{"type":"string","nullable":true},"meter":{"type":"string"},"quantity":{"type":"number"},"idempotency_key":{"type":"string","nullable":true},"metadata":{"type":"object","additionalProperties":{"nullable":true}}}},"ProviderListOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ProviderOut"}}},"required":["data"]},"ProviderOut":{"type":"object","properties":{"provider":{"type":"string"},"client_id":{"type":"string","nullable":true},"token_uri":{"type":"string","nullable":true},"scopes_allowed":{"type":"array","items":{"type":"string"}},"refresh_webhook":{"type":"string","nullable":true},"has_client_secret":{"type":"boolean"}},"required":["provider","client_id","token_uri","scopes_allowed","refresh_webhook","has_client_secret"]},"ProviderConfiguredOut":{"type":"object","properties":{"provider":{"type":"string"},"configured":{"type":"boolean"}},"required":["provider","configured"]},"ProviderIn":{"type":"object","properties":{"client_id":{"type":"string","nullable":true},"client_secret":{"type":"string","nullable":true},"token_uri":{"type":"string","nullable":true},"scopes_allowed":{"type":"array","items":{"type":"string"},"default":[]},"refresh_webhook":{"type":"string","nullable":true}}},"ModelsListOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ModelOut"}},"providers":{"type":"array","items":{"$ref":"#/components/schemas/ModelProviderOut"}}},"required":["data","providers"]},"ModelOut":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string"},"label":{"type":"string"},"available":{"type":"boolean"},"source":{"type":"string","nullable":true,"enum":["byok","platform",null]}},"required":["id","provider","label","available"]},"ModelProviderOut":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"base_url":{"type":"boolean"},"platform_key":{"type":"boolean"}},"required":["id","label","base_url"]},"ModelKeyListOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ModelKeyOut"}}},"required":["data"]},"ModelKeyOut":{"type":"object","properties":{"provider":{"type":"string"},"base_url":{"type":"string","nullable":true},"has_key":{"type":"boolean"},"updated_at":{"type":"string","nullable":true}},"required":["provider","base_url","has_key","updated_at"]},"ModelKeyConfiguredOut":{"type":"object","properties":{"provider":{"type":"string"},"configured":{"type":"boolean"},"base_url":{"type":"string","nullable":true}},"required":["provider","configured","base_url"]},"ModelKeyIn":{"type":"object","properties":{"api_key":{"type":"string"},"base_url":{"type":"string","nullable":true}},"required":["api_key"]},"HostedToolsListOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/HostedToolOut"}}},"required":["data"]},"HostedToolOut":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}},"required":["name","description"]},"WebhookCreateOut":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"secret":{"type":"string"}},"required":["id","url","events","active","secret"]},"WebhookIn":{"type":"object","properties":{"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"},"default":[]},"active":{"type":"boolean","default":true}},"required":["url"]},"WebhookListOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookOut"}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","has_more"]},"WebhookOut":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"created_at":{"type":"string","nullable":true}},"required":["id","url","events","active","created_at"]},"WebhookIdOut":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"WebhookPatch":{"type":"object","properties":{"url":{"type":"string","nullable":true},"events":{"type":"array","nullable":true,"items":{"type":"string"}},"active":{"type":"boolean","nullable":true}}},"WebhookTestOut":{"type":"object","properties":{"delivered":{"type":"boolean"}},"required":["delivered"]},"EventListOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EventOut"}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","has_more"]},"EventOut":{"type":"object","properties":{"v":{"type":"integer"},"id":{"type":"string"},"type":{"type":"string"},"smith_id":{"type":"string","nullable":true},"data":{"type":"object","additionalProperties":{"nullable":true}},"created_at":{"type":"string","nullable":true}},"required":["v","id","type","smith_id","data","created_at"]},"MintedTokenOut":{"type":"object","properties":{"id":{"type":"string"},"token":{"type":"string"},"scope":{"type":"string"},"sub":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"expires_at":{"type":"string","nullable":true}},"required":["id","token","scope","sub","scopes","expires_at"]},"TokenIn":{"type":"object","properties":{"scope":{"type":"string","default":"smith"},"smith_id":{"type":"string","nullable":true},"permissions":{"type":"array","nullable":true,"items":{"type":"string"}},"ttl_seconds":{"type":"integer","nullable":true},"name":{"type":"string","nullable":true}}},"TokenListOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TokenOut"}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","has_more"]},"TokenOut":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"sub":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"prefix":{"type":"string","nullable":true},"created_at":{"type":"string","nullable":true},"expires_at":{"type":"string","nullable":true},"revoked_at":{"type":"string","nullable":true}},"required":["id","name","sub","scopes","prefix","created_at","expires_at","revoked_at"]},"UsageOut":{"type":"object","properties":{"totals":{"type":"object","properties":{"runs":{"type":"integer"},"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"},"total_tokens":{"type":"integer"}},"required":["runs","input_tokens","output_tokens","total_tokens"]},"series":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"runs":{"type":"integer"},"total_tokens":{"type":"integer"}},"required":["date","runs","total_tokens"]}}},"required":["totals","series"]},"TelegramBotOut":{"type":"object","properties":{"configured":{"type":"boolean"},"bot_username":{"type":"string"},"bot_id":{"type":"integer"},"has_token":{"type":"boolean"},"webhook_url":{"type":"string"}},"required":["configured"]},"TelegramBotIn":{"type":"object","properties":{"bot_token":{"type":"string"},"webhook_secret":{"type":"string","nullable":true}},"required":["bot_token"]},"WhatsAppConfigOut":{"type":"object","properties":{"configured":{"type":"boolean"},"phone_number_id":{"type":"string"},"display_phone_number":{"type":"string","nullable":true},"has_app_secret":{"type":"boolean"},"webhook_url":{"type":"string"},"verify_token":{"type":"string"}},"required":["configured"]},"WhatsAppConfigIn":{"type":"object","properties":{"phone_number_id":{"type":"string"},"access_token":{"type":"string"},"app_secret":{"type":"string","nullable":true},"verify_token":{"type":"string","nullable":true},"business_id":{"type":"string","nullable":true}}},"EmailConfigOut":{"type":"object","properties":{"configured":{"type":"boolean"},"from_domain":{"type":"string"},"display_name":{"type":"string","nullable":true},"has_token":{"type":"boolean"},"inbound_url":{"type":"string"},"inbound_secret":{"type":"string"}},"required":["configured"]},"EmailConfigIn":{"type":"object","properties":{"cloudflare_account_id":{"type":"string"},"cloudflare_api_token":{"type":"string"},"from_domain":{"type":"string"},"display_name":{"type":"string","nullable":true},"inbound_secret":{"type":"string","nullable":true}},"required":["cloudflare_account_id","cloudflare_api_token","from_domain"]},"SuppressionListOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SuppressionEntry"}}},"required":["data"]},"SuppressionEntry":{"type":"object","properties":{"address":{"type":"string"},"reason":{"type":"string"},"created_at":{"type":"string","nullable":true}},"required":["address","reason","created_at"]},"SuppressionOut":{"type":"object","properties":{"address":{"type":"string"},"reason":{"type":"string"}},"required":["address","reason"]},"SuppressionIn":{"type":"object","properties":{"address":{"type":"string"},"reason":{"type":"string"}},"required":["address"]},"SlackAppOut":{"type":"object","properties":{"configured":{"type":"boolean"},"bot_user_id":{"type":"string"},"team_id":{"type":"string"},"events_url":{"type":"string"},"oauth_ready":{"type":"boolean"},"oauth_redirect_url":{"type":"string"},"return_url":{"type":"string"},"factory":{"$ref":"#/components/schemas/SlackFactoryStatus"}},"required":["configured"]},"SlackFactoryStatus":{"type":"object","properties":{"configured":{"type":"boolean"}},"required":["configured"]},"SlackAppIn":{"type":"object","properties":{"bot_token":{"type":"string","nullable":true},"signing_secret":{"type":"string","nullable":true},"client_id":{"type":"string","nullable":true},"client_secret":{"type":"string","nullable":true},"oauth_scopes":{"type":"string","nullable":true},"oauth_user_scopes":{"type":"string","nullable":true},"return_url":{"type":"string","nullable":true},"factory":{"$ref":"#/components/schemas/SlackFactoryIn"}}},"SlackFactoryIn":{"type":"object","nullable":true,"properties":{"config_token":{"type":"string"},"config_refresh_token":{"type":"string","nullable":true},"manifest_template":{"type":"object","additionalProperties":{"nullable":true}}},"required":["config_token","manifest_template"]},"LinkedinAppOut":{"type":"object","properties":{"configured":{"type":"boolean"},"client_id":{"type":"string"},"page_urn":{"type":"string","nullable":true},"has_page_token":{"type":"boolean"},"webhook_url":{"type":"string"},"messaging_enabled":{"type":"boolean"}},"required":["configured"]},"LinkedinAppIn":{"type":"object","properties":{"client_id":{"type":"string"},"client_secret":{"type":"string"},"page_urn":{"type":"string","nullable":true},"webhook_secret":{"type":"string","nullable":true}},"required":["client_id","client_secret"]}},"parameters":{}},"paths":{"/v1/catalog":{"get":{"summary":"List catalog integration presets","tags":["Catalog"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"The Ingram-curated MCP integration presets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogListOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/catalog/{slug}":{"get":{"summary":"Get a catalog integration preset","tags":["Catalog"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"The catalog entry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogEntryOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/approvals":{"get":{"summary":"List approvals","tags":["Approvals"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"smith_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"status","in":"query"},{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"The tenant's approvals, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalListOut"}}}},"400":{"description":"Malformed request (e.g. a bad pagination cursor).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/approvals/{aprId}":{"get":{"summary":"Get an approval","tags":["Approvals"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"aprId","in":"path"}],"responses":{"200":{"description":"The approval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/organization/projects":{"post":{"summary":"Create a project","tags":["Projects"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectIn"}}}},"responses":{"201":{"description":"The created (or adopted) project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List projects","tags":["Projects"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"name","in":"query"},{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"The org's live projects, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectListOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/organization/projects/{pid}":{"get":{"summary":"Get a project","tags":["Projects"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"}],"responses":{"200":{"description":"The project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Archive a project","tags":["Projects"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"}],"responses":{"204":{"description":"Archived."},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/organization/projects/{pid}/tokens":{"post":{"summary":"Mint a project token","tags":["Projects"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectTokenIn"}}}},"responses":{"201":{"description":"The minted token (secret shown once).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectTokenOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/organization/projects/{pid}/tokens/{tid}":{"delete":{"summary":"Revoke a project token","tags":["Projects"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"},{"schema":{"type":"string"},"required":true,"name":"tid","in":"path"}],"responses":{"204":{"description":"Revoked."},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/customers":{"post":{"summary":"Create a customer","tags":["Customers"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerCreate"}}}},"responses":{"201":{"description":"The created customer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List customers","tags":["Customers"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"The tenant's live customers, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerListOut"}}}},"400":{"description":"Malformed request (e.g. a bad pagination cursor).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/customers/{cid}":{"get":{"summary":"Get a customer","tags":["Customers"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"cid","in":"path"}],"responses":{"200":{"description":"The customer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update a customer","tags":["Customers"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"cid","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerPatch"}}}},"responses":{"200":{"description":"The updated customer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Archive a customer","tags":["Customers"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"cid","in":"path"}],"responses":{"204":{"description":"Archived."},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/budgets":{"post":{"summary":"Create a budget","tags":["Budgets"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetIn"}}}},"responses":{"201":{"description":"The created budget.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (e.g. duplicate slug, resource in use).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List budgets","tags":["Budgets"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"The tenant's budgets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetListOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/budgets/{bid}":{"get":{"summary":"Get a budget","tags":["Budgets"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"bid","in":"path"}],"responses":{"200":{"description":"The budget.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update a budget","tags":["Budgets"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"bid","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetPatch"}}}},"responses":{"200":{"description":"The updated budget.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a budget","tags":["Budgets"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"bid","in":"path"}],"responses":{"204":{"description":"Deleted."},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/budgets/{bid}/status":{"get":{"summary":"Get a budget's month-to-date status","tags":["Budgets"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"bid","in":"path"}],"responses":{"200":{"description":"The budget plus its month-to-date spend.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetStatusOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/organization/billing/balance":{"get":{"summary":"Get the organization's credit balance","tags":["Billing"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"The credit balance.","content":{"application/json":{"schema":{"type":"object","properties":{"currency":{"type":"string"},"balance_cents":{"type":"integer"},"stripe_customer":{"type":"boolean"}},"required":["currency","balance_cents","stripe_customer"]}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/organization/billing/ledger":{"get":{"summary":"List recent credit ledger entries","tags":["Billing"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"The most recent ledger entries, newest first.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amount_cents":{"type":"integer"},"currency":{"type":"string"},"kind":{"type":"string"},"description":{"type":"string"},"created_at":{"type":"string","nullable":true}},"required":["id","amount_cents","currency","kind","description","created_at"]}}},"required":["data"]}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/organization/billing/usage":{"get":{"summary":"Per-project draw from the org wallet for a month","tags":["Billing"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$"},"required":false,"name":"period","in":"query"}],"responses":{"200":{"description":"Credits drawn per project this period.","content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"string"},"currency":{"type":"string"},"total_drawn_cents":{"type":"integer"},"projects":{"type":"array","items":{"type":"object","properties":{"project_id":{"type":"string"},"name":{"type":"string"},"drawn_cents":{"type":"integer"},"budget_limit":{"type":"number","nullable":true},"budget_action":{"type":"string","nullable":true}},"required":["project_id","name","drawn_cents","budget_limit","budget_action"]}}},"required":["period","currency","total_drawn_cents","projects"]}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/organization/billing/checkout":{"post":{"summary":"Start a credit top-up (embedded Stripe Checkout)","tags":["Billing"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amount_cents":{"type":"integer"},"return_url":{"type":"string"},"mode":{"type":"string","enum":["test","live"],"default":"live"}},"required":["amount_cents","return_url"]}}}},"responses":{"201":{"description":"The embedded Checkout client secret.","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/organization/billing/setup":{"post":{"summary":"Add a card to unlock the welcome credit","tags":["Billing"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"return_url":{"type":"string"},"mode":{"type":"string","enum":["test","live"],"default":"live"}},"required":["return_url"]}}}},"responses":{"201":{"description":"The hosted card-setup URL.","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/organization/billing/confirm":{"post":{"summary":"Confirm + credit a returning Checkout Session","tags":["Billing"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"session_id":{"type":"string"}},"required":["session_id"]}}}},"responses":{"200":{"description":"Whether the session credited the balance.","content":{"application/json":{"schema":{"type":"object","properties":{"credited":{"type":"boolean"},"payment_status":{"type":"string"}},"required":["credited","payment_status"]}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/organization/billing/autoreload":{"get":{"summary":"Get the organization's auto-reload settings","tags":["Billing"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"The auto-reload configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"threshold_cents":{"type":"integer"},"amount_cents":{"type":"integer"}},"required":["enabled","threshold_cents","amount_cents"]}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"summary":"Set the organization's auto-reload settings","tags":["Billing"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"threshold_cents":{"type":"integer"},"amount_cents":{"type":"integer"}},"required":["enabled","threshold_cents","amount_cents"]}}}},"responses":{"200":{"description":"The saved auto-reload configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"threshold_cents":{"type":"integer"},"amount_cents":{"type":"integer"}},"required":["enabled","threshold_cents","amount_cents"]}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/organization/billing/reload":{"post":{"summary":"Charge the saved card to top up now","tags":["Billing"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amount_cents":{"type":"integer"},"mode":{"type":"string","enum":["test","live"],"default":"live"}}}}}},"responses":{"200":{"description":"Whether the off-session charge credited.","content":{"application/json":{"schema":{"type":"object","properties":{"credited":{"type":"boolean"},"payment_status":{"type":"string"}},"required":["credited","payment_status"]}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (e.g. duplicate slug, resource in use).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/organization/billing/portal":{"get":{"summary":"Open the Stripe billing portal","tags":["Billing"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"return_url","in":"query"},{"schema":{"type":"string","enum":["test","live"],"default":"live"},"required":false,"name":"mode","in":"query"}],"responses":{"200":{"description":"The Stripe billing-portal URL.","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/smiths/{pid}/schedules":{"post":{"summary":"Create a schedule","tags":["Schedules"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleIn"}}}},"responses":{"201":{"description":"The created schedule.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List a smith's schedules","tags":["Schedules"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"}],"responses":{"200":{"description":"The smith's schedules, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleListOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/smiths/{pid}/schedules/{sid}":{"patch":{"summary":"Update a schedule","tags":["Schedules"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"},{"schema":{"type":"string"},"required":true,"name":"sid","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchedulePatch"}}}},"responses":{"200":{"description":"The updated schedule.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a schedule","tags":["Schedules"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"},{"schema":{"type":"string"},"required":true,"name":"sid","in":"path"}],"responses":{"204":{"description":"Deleted."},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/smiths/{pid}/schedules/{sid}/run_now":{"post":{"summary":"Fire a schedule immediately","tags":["Schedules"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"},{"schema":{"type":"string"},"required":true,"name":"sid","in":"path"}],"responses":{"200":{"description":"The schedule id and the run it just fired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleRunNowOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/smiths/{pid}/connections":{"post":{"summary":"Create a connection","tags":["Connections"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionIn"}}}},"responses":{"201":{"description":"The created connection (secret-free).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List a smith's connections","tags":["Connections"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"},{"schema":{"type":"string"},"required":false,"name":"provider","in":"query"}],"responses":{"200":{"description":"The smith's connections (secret-free).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionListOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/smiths/{pid}/connections/{cid}":{"get":{"summary":"Get a connection","tags":["Connections"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"},{"schema":{"type":"string"},"required":true,"name":"cid","in":"path"}],"responses":{"200":{"description":"The connection (secret-free).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update a connection","tags":["Connections"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"},{"schema":{"type":"string"},"required":true,"name":"cid","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionPatch"}}}},"responses":{"200":{"description":"The updated connection (secret-free).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a connection","tags":["Connections"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"},{"schema":{"type":"string"},"required":true,"name":"cid","in":"path"}],"responses":{"204":{"description":"Deleted."},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/smiths/{pid}/connections/{cid}/refresh":{"post":{"summary":"Force a token refresh","tags":["Connections"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"},{"schema":{"type":"string"},"required":true,"name":"cid","in":"path"}],"responses":{"200":{"description":"The refreshed connection (secret-free).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (e.g. duplicate slug, resource in use).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/smiths/{pid}/connections/authorize":{"post":{"summary":"Mint an OAuth authorize URL","tags":["Connections"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizeIn"}}}},"responses":{"200":{"description":"The minted authorize URL and echoed provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizeOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/conversations":{"post":{"summary":"Create a conversation","tags":["Conversations"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationCreate"}}}},"responses":{"200":{"description":"The created conversation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationOut"}}}},"400":{"description":"Malformed request (e.g. a bad pagination cursor).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List conversations","tags":["Conversations"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"The smith's conversations, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationListOut"}}}},"400":{"description":"Malformed request (e.g. a bad pagination cursor).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/conversations/{cnvId}":{"get":{"summary":"Get a conversation","tags":["Conversations"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"cnvId","in":"path"}],"responses":{"200":{"description":"The conversation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Update a conversation","tags":["Conversations"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"cnvId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationUpdate"}}}},"responses":{"200":{"description":"The updated conversation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a conversation","tags":["Conversations"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"cnvId","in":"path"}],"responses":{"200":{"description":"Deletion acknowledged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationDeleted"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/conversations/{cnvId}/items":{"get":{"summary":"List items in a conversation","tags":["Conversations"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"cnvId","in":"path"},{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"order","in":"query"}],"responses":{"200":{"description":"The conversation's items.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationItemListOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/deployments":{"post":{"summary":"Create a deployment","tags":["Deployments"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentIn"}}}},"responses":{"201":{"description":"The created deployment (plus any setup affordances).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentCreatedOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (e.g. duplicate slug, resource in use).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List deployments","tags":["Deployments"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","enum":["smith","agent"]},"required":false,"name":"target_type","in":"query"},{"schema":{"type":"string"},"required":false,"name":"target_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Deployments in the project, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentListOut"}}}},"400":{"description":"Malformed request (e.g. a bad pagination cursor).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/deployments/{depId}":{"get":{"summary":"Get a deployment","tags":["Deployments"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"depId","in":"path"}],"responses":{"200":{"description":"The deployment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update a deployment","tags":["Deployments"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"depId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentPatch"}}}},"responses":{"200":{"description":"The updated deployment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (e.g. duplicate slug, resource in use).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a deployment","tags":["Deployments"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"depId","in":"path"}],"responses":{"204":{"description":"Deleted."},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents":{"post":{"summary":"Create an agent","tags":["agents"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentIn"}}}},"responses":{"201":{"description":"The created agent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (e.g. duplicate slug, resource in use).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List agents","tags":["agents"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"The tenant's live agents.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentListOut"}}}},"400":{"description":"Malformed request (e.g. a bad pagination cursor).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{aid}":{"get":{"summary":"Get an agent","tags":["agents"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"aid","in":"path"}],"responses":{"200":{"description":"The agent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update an agent's draft","tags":["agents"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"aid","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPatch"}}}},"responses":{"200":{"description":"The updated agent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Archive an agent","tags":["agents"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"aid","in":"path"}],"responses":{"204":{"description":"Archived."},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (e.g. duplicate slug, resource in use).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{aid}/versions":{"get":{"summary":"List an agent's published versions","tags":["agents"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"aid","in":"path"}],"responses":{"200":{"description":"The version snapshots, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentVersionListOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Publish the draft as the next version","tags":["agents"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"aid","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishIn"}}}},"responses":{"201":{"description":"The published version snapshot.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentVersionOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{aid}/rollout":{"post":{"summary":"Roll out a version to smiths","tags":["agents"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"aid","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RolloutIn"}}}},"responses":{"200":{"description":"The agent after the rollout change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/import":{"post":{"summary":"Import a smith's config into a new agent","tags":["agents"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportIn"}}}},"responses":{"201":{"description":"The new agent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (e.g. duplicate slug, resource in use).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{aid}/attach":{"post":{"summary":"Attach existing smiths to an agent","tags":["agents"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"aid","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachIn"}}}},"responses":{"200":{"description":"Which smiths were attached and their config drift.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (e.g. duplicate slug, resource in use).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/smiths":{"post":{"summary":"Create a smith","tags":["Smiths"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmithCreate"}}}},"responses":{"200":{"description":"The existing smith (re-provision by external_id).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmithOut"}}}},"201":{"description":"The created smith.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmithOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (e.g. duplicate slug, resource in use).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List smiths","tags":["Smiths"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"external_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"external_id_prefix","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"agent_id","in":"query"}],"responses":{"200":{"description":"The tenant's live smiths, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmithListOut"}}}},"400":{"description":"Malformed request (e.g. a bad pagination cursor).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/smiths/{pid}":{"get":{"summary":"Get a smith","tags":["Smiths"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"}],"responses":{"200":{"description":"The smith.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmithOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update a smith","tags":["Smiths"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmithPatch"}}}},"responses":{"200":{"description":"The updated smith.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmithOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (e.g. duplicate slug, resource in use).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Archive a smith","tags":["Smiths"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"}],"responses":{"204":{"description":"Archived."},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/smiths/{pid}/revisions":{"get":{"summary":"List a smith's config revisions","tags":["Smiths"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"}],"responses":{"200":{"description":"The smith's config revisions, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevisionListOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/smiths/{pid}/revisions/{version}/restore":{"post":{"summary":"Restore a smith config revision","tags":["Smiths"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"},{"schema":{"type":"string"},"required":true,"name":"version","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestoreIn"}}}},"responses":{"200":{"description":"The newly-appended revision.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmithRevisionOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/runs":{"get":{"summary":"List runs (tenant feed)","tags":["Runs"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"status","in":"query"},{"schema":{"type":"string"},"required":false,"name":"external_id_prefix","in":"query"},{"schema":{"type":"string"},"required":false,"name":"smith_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"agent_id","in":"query"},{"schema":{"type":"number","nullable":true},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"The tenant's runs, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunListOut"}}}},"400":{"description":"Malformed request (e.g. a bad pagination cursor).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/smiths/{pid}/runs":{"get":{"summary":"List a smith's runs","tags":["Runs"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"},{"schema":{"type":"string"},"required":false,"name":"status","in":"query"},{"schema":{"type":"number","nullable":true},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"The smith's runs, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunListOut"}}}},"400":{"description":"Malformed request (e.g. a bad pagination cursor).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/smiths/{pid}/runs/{rid}":{"get":{"summary":"Get a run","tags":["Runs"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"},{"schema":{"type":"string"},"required":true,"name":"rid","in":"path"}],"responses":{"200":{"description":"The run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/smiths/{pid}/memories":{"post":{"summary":"Batch-create memories","tags":["Memory"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryBatch"}}}},"responses":{"201":{"description":"The created memories.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryBatchOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List a smith's memories","tags":["Memory"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"},{"schema":{"type":"string"},"required":false,"name":"category","in":"query"},{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"The smith's memories, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryListOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/smiths/{pid}/memories/search":{"post":{"summary":"Search a smith's memories","tags":["Memory"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchBody"}}}},"responses":{"200":{"description":"The ranked search hits, each with a `score`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemorySearchOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/smiths/{pid}/memories/{mid}":{"get":{"summary":"Get a memory","tags":["Memory"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"},{"schema":{"type":"string"},"required":true,"name":"mid","in":"path"}],"responses":{"200":{"description":"The memory.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update a memory","tags":["Memory"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"},{"schema":{"type":"string"},"required":true,"name":"mid","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryPatch"}}}},"responses":{"200":{"description":"The updated memory.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a memory","tags":["Memory"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"},{"schema":{"type":"string"},"required":true,"name":"mid","in":"path"}],"responses":{"204":{"description":"Deleted."},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/smiths/{pid}/blocks":{"get":{"summary":"List a smith's core memory blocks","tags":["Memory"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"}],"responses":{"200":{"description":"The smith's core memory blocks, in fixed order.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockListOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/smiths/{pid}/blocks/{label}":{"patch":{"summary":"Edit a core memory block","tags":["Memory"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"},{"schema":{"type":"string"},"required":true,"name":"label","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockPatch"}}}},"responses":{"200":{"description":"The edited block.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockSingleOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tenant/mcp/{name}":{"put":{"summary":"Register or replace an MCP server","tags":["MCP"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"name","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerIn"}}}},"responses":{"200":{"description":"The registered server plus the count of tools discovered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerWriteOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"Get a registered MCP server","tags":["MCP"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"name","in":"path"}],"responses":{"200":{"description":"The MCP server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a registered MCP server","tags":["MCP"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"name","in":"path"}],"responses":{"204":{"description":"Deleted."},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tenant/mcp":{"get":{"summary":"List registered MCP servers","tags":["MCP"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"The tenant's registered MCP servers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerListOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tenant/mcp/{name}/refresh":{"post":{"summary":"Re-run tool discovery for an MCP server","tags":["MCP"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"name","in":"path"}],"responses":{"200":{"description":"The server plus the count of tools discovered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerWriteOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Live tool discovery against the MCP server failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/traces":{"get":{"summary":"List traces","tags":["Observability"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"smith_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"app_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"status","in":"query"},{"schema":{"type":"string"},"required":false,"name":"since","in":"query"}],"responses":{"200":{"description":"The tenant's traces, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceListOut"}}}},"400":{"description":"Malformed request (e.g. a bad pagination cursor).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/traces/{traceId}":{"get":{"summary":"Get a trace with its spans","tags":["Observability"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"traceId","in":"path"}],"responses":{"200":{"description":"The trace with its flat spans and nested tree.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceDetailOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/usage":{"get":{"summary":"Usage breakdown (tokens, cost, meters)","tags":["Observability"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"group_by","in":"query"},{"schema":{"type":"string"},"required":false,"name":"period","in":"query"},{"schema":{"type":"string"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string"},"required":false,"name":"to","in":"query"},{"schema":{"type":"string"},"required":false,"name":"smith_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id","in":"query"}],"responses":{"200":{"description":"The usage breakdown over the requested filters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageBreakdownOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/usage/events":{"get":{"summary":"List billable usage events","tags":["Observability"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"smith_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"meter","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"The usage-event ledger, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageEventListOut"}}}},"400":{"description":"Malformed request (e.g. a bad pagination cursor).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Record a billable usage event","tags":["Observability"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageEventIn"}}}},"responses":{"201":{"description":"The recorded usage event.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageEventOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/traces:ingest":{"post":{"summary":"Ingest externally-pushed spans","tags":["Observability"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceIngestIn"}}}},"responses":{"202":{"description":"The spans were accepted and written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceIngestOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tenant/providers":{"get":{"summary":"List OAuth client providers","tags":["Tenant"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"The tenant's configured providers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderListOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tenant/providers/{provider}":{"get":{"summary":"Get an OAuth client provider","tags":["Tenant"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"provider","in":"path"}],"responses":{"200":{"description":"The provider config.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"summary":"Configure an OAuth client provider","tags":["Tenant"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"provider","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderIn"}}}},"responses":{"200":{"description":"The provider was configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderConfiguredOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete an OAuth client provider","tags":["Tenant"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"provider","in":"path"}],"responses":{"204":{"description":"Deleted."},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tenant/models":{"get":{"summary":"List the model catalog","tags":["Tenant"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Selectable models + runnable backends.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelsListOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tenant/model_keys":{"get":{"summary":"List BYOK model keys","tags":["Tenant"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"The configured BYOK keys (presence only).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelKeyListOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tenant/model_keys/{provider}":{"put":{"summary":"Set a BYOK model key","tags":["Tenant"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"provider","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelKeyIn"}}}},"responses":{"200":{"description":"The key was configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelKeyConfiguredOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a BYOK model key","tags":["Tenant"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"provider","in":"path"}],"responses":{"204":{"description":"Deleted."},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tenant/hosted_tools":{"get":{"summary":"List the hosted-tool catalog","tags":["Tenant"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"The IC-hosted tools available to agents.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HostedToolsListOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tenant/webhooks":{"post":{"summary":"Create a webhook","tags":["Tenant"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookIn"}}}},"responses":{"201":{"description":"The created webhook (signing secret shown once).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreateOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List webhooks","tags":["Tenant"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"The tenant's webhooks, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookListOut"}}}},"400":{"description":"Malformed request (e.g. a bad pagination cursor).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tenant/webhooks/{wid}":{"patch":{"summary":"Update a webhook","tags":["Tenant"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"wid","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookPatch"}}}},"responses":{"200":{"description":"The updated webhook's id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookIdOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a webhook","tags":["Tenant"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"wid","in":"path"}],"responses":{"204":{"description":"Deleted."},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tenant/webhooks/{wid}/test":{"post":{"summary":"Fire a test webhook delivery","tags":["Tenant"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"wid","in":"path"}],"responses":{"200":{"description":"A signed test event was delivered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTestOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/events":{"get":{"summary":"Poll the event feed","tags":["Tenant"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"type","in":"query"},{"schema":{"type":"string"},"required":false,"name":"smith_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"since","in":"query"},{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"The matching events, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventListOut"}}}},"400":{"description":"Malformed request (e.g. a bad pagination cursor).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tenant/tokens":{"post":{"summary":"Mint a token","tags":["Tenant"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenIn"}}}},"responses":{"201":{"description":"The minted token (secret shown once).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MintedTokenOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List tokens","tags":["Tenant"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"The tenant's minted tokens.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenListOut"}}}},"400":{"description":"Malformed request (e.g. a bad pagination cursor).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tenant/tokens/{tid}":{"delete":{"summary":"Revoke a token","tags":["Tenant"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"tid","in":"path"}],"responses":{"204":{"description":"Revoked."},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tenant/usage":{"get":{"summary":"Aggregated token usage","tags":["Tenant"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Per-day token usage + totals.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tenant/telegram":{"put":{"summary":"Configure the tenant's Telegram bot","tags":["Telegram"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramBotIn"}}}},"responses":{"200":{"description":"The bot config after the write.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramBotOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"Get the tenant's Telegram bot status","tags":["Telegram"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"The bot config status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramBotOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Remove the tenant's Telegram bot","tags":["Telegram"],"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Removed."},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tenant/whatsapp":{"put":{"summary":"Configure the tenant's WhatsApp number","tags":["WhatsApp"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppConfigIn"}}}},"responses":{"200":{"description":"The configured number (echoes the verify token to paste into Meta).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppConfigOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"Get the tenant's WhatsApp config status","tags":["WhatsApp"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"The config status (secrets presence-only).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppConfigOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Remove the tenant's WhatsApp config","tags":["WhatsApp"],"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Removed."},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tenant/email":{"put":{"summary":"Configure the tenant's email sending","tags":["Email"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailConfigIn"}}}},"responses":{"200":{"description":"The saved config (the inbound secret is shown once).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailConfigOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"Get the tenant's email config status","tags":["Email"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"The config status (the API token is never returned).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailConfigOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Remove the tenant's email config","tags":["Email"],"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Removed."},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tenant/email/suppressions":{"get":{"summary":"List the tenant's suppressed addresses","tags":["Email"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"The block list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuppressionListOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Suppress an address","tags":["Email"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuppressionIn"}}}},"responses":{"201":{"description":"The suppressed address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuppressionOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tenant/email/suppressions/{address}":{"delete":{"summary":"Remove a suppressed address","tags":["Email"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"address","in":"path"}],"responses":{"204":{"description":"Removed."},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tenant/slack":{"put":{"summary":"Configure the tenant's Slack posture","tags":["Slack"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackAppIn"}}}},"responses":{"200":{"description":"The tenant's Slack posture after the change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackAppOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"Get the tenant's Slack posture","tags":["Slack"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"The tenant's Slack posture.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackAppOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Remove the tenant's Slack posture","tags":["Slack"],"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Removed."},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tenant/linkedin":{"put":{"summary":"Configure the tenant's LinkedIn app","tags":["LinkedIn"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkedinAppIn"}}}},"responses":{"200":{"description":"The LinkedIn app config after the write.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkedinAppOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request shape or a domain rule was violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"Get the tenant's LinkedIn app status","tags":["LinkedIn"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"The LinkedIn app config status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkedinAppOut"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Remove the tenant's LinkedIn app","tags":["LinkedIn"],"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Removed."},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the required scope or is smith-scoped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}