{"openapi":"3.0.0","info":{"title":"Ingram Cloud API","version":"1","description":"The Ingram Cloud /v1 REST API — agents, smiths, runs, memory, tools, deployments."},"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","enum":["address_in_use","address_required","admin_required","agent_exists","agent_in_use","agent_target_no_setup","agent_unpublished","auth_not_configured","auth_required","bad_inbound_secret","bad_public_key","bad_signature","bad_webhook","bad_webhook_secret","bedrock_unconfigured","broker_unavailable","budget_exceeded","budget_exists","card_required","catch_all_exists","code_already_redeemed","connect_failed","conversation_not_found","default_agent","discovery_failed","display_name_required","email_send_failed","email_unconfigured","embedding_unavailable","empty_application_id","empty_bot_token","empty_config","empty_credentials","empty_key","empty_patch","empty_token","file_already_attached","forbidden_target","handle_unavailable","idempotency_in_progress","idempotency_key_reused","insufficient_credits","insufficient_scope","internal_error","invalid_action","invalid_address","invalid_amount","invalid_approval_policy","invalid_auth_kind","invalid_client_mode","invalid_code","invalid_cursor","invalid_decision","invalid_group_by","invalid_input","invalid_kind","invalid_limit","invalid_manifest_template","invalid_meter","invalid_name","invalid_percent","invalid_period","invalid_quantity","invalid_reasoning_effort","invalid_request","invalid_response_format","invalid_return_url","invalid_scope","invalid_setup","invalid_slug","invalid_state","invalid_threshold","invalid_timezone","invalid_token_scope","invalid_tool_choice","invalid_url","invalid_variables","mcp_no_setup","minting_unavailable","missing_signature","model_key_missing","model_request_failed","name_required","no_customer","no_saved_card","not_found","nothing_to_update","organization_required","password_required","payload_too_large","permissions_required","provider_required","refresh_failed","rename_unsupported","replay_unsupported","resume_failed","run_failed","run_not_paused","schema_error","scope_id_required","secret_required","session_mismatch","session_not_found","setup_unsupported","slack_api_error","slack_app_cap_reached","slack_app_unconfigured","slack_factory_unconfigured","slack_oauth_unconfigured","smith_exists","smith_mismatch","smith_required","smith_unresolved","storage_unavailable","stripe_error","stripe_unconfigured","structured_output_failed","telegram_api_error","telegram_bot_unconfigured","tenant_token_required","too_many_inputs","tool_loop_failed","unauthenticated","unknown_catalog_entry","unknown_provider","unsupported","unsupported_api_version","unsupported_credential","unsupported_policy_rule","unsupported_tools","url_required","verification_failed","web_no_setup","whatsapp_api_error","whatsapp_subscribe_failed","whatsapp_unconfigured","whatsapp_validation_failed"]}},"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"}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","has_more"]},"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,"minimum":0,"exclusiveMinimum":true,"maximum":315360000},"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","agent","smith","customer"]},"scope_id":{"type":"string","nullable":true},"period":{"type":"string"},"limit":{"type":"number"},"currency":{"type":"string"},"action":{"type":"string","enum":["warn","block"]},"created_at":{"type":"string","nullable":true}},"required":["id","scope","period","limit","currency","action"]},"BudgetIn":{"type":"object","properties":{"scope":{"type":"string"},"scope_id":{"type":"string","nullable":true},"limit":{"type":"number"},"action":{"type":"string","default":"warn"},"period":{"type":"string","default":"monthly"}},"required":["scope","limit"]},"BudgetListOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BudgetOut"}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","has_more"]},"BudgetStatusOut":{"type":"object","properties":{"id":{"type":"string"},"scope":{"type":"string","enum":["tenant","agent","smith","customer"]},"scope_id":{"type":"string","nullable":true},"period":{"type":"string"},"limit":{"type":"number"},"currency":{"type":"string"},"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","currency","action","period_start","period_key","spent","pct","over"]},"BudgetPatch":{"type":"object","properties":{"limit":{"type":"number","nullable":true},"action":{"type":"string","nullable":true}}},"BalanceOut":{"type":"object","properties":{"currency":{"type":"string"},"balance_cents":{"type":"integer"},"stripe_customer":{"type":"boolean"}},"required":["currency","balance_cents","stripe_customer"]},"LedgerListOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/LedgerEntryOut"}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]},"LedgerEntryOut":{"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"]},"OrgUsageOut":{"type":"object","properties":{"period":{"type":"string"},"currency":{"type":"string"},"total_drawn_cents":{"type":"integer"},"total_tokens":{"type":"integer"},"projects":{"type":"array","items":{"$ref":"#/components/schemas/OrgUsageProject"}}},"required":["period","currency","total_drawn_cents","total_tokens","projects"]},"OrgUsageProject":{"type":"object","properties":{"project_id":{"type":"string"},"name":{"type":"string"},"drawn_cents":{"type":"integer"},"tokens":{"type":"integer"},"budget_limit":{"type":"number","nullable":true},"budget_action":{"type":"string","nullable":true}},"required":["project_id","name","drawn_cents","tokens","budget_limit","budget_action"]},"OrgUsageSeriesOut":{"type":"object","properties":{"currency":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"projects":{"type":"array","items":{"type":"object","properties":{"project_id":{"type":"string"},"name":{"type":"string"}},"required":["project_id","name"]}},"points":{"type":"array","items":{"$ref":"#/components/schemas/OrgUsageSeriesPoint"}}},"required":["currency","from","to","projects","points"]},"OrgUsageSeriesPoint":{"type":"object","properties":{"day":{"type":"string"},"project_id":{"type":"string"},"drawn_cents":{"type":"integer"}},"required":["day","project_id","drawn_cents"]},"CheckoutOut":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]},"CheckoutIn":{"type":"object","properties":{"amount_cents":{"type":"integer"},"return_url":{"type":"string"}},"required":["amount_cents","return_url"]},"SetupOut":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]},"SetupIn":{"type":"object","properties":{"return_url":{"type":"string"}},"required":["return_url"]},"RedeemOut":{"type":"object","properties":{"amount_cents":{"type":"integer"},"currency":{"type":"string"}},"required":["amount_cents","currency"]},"RedeemIn":{"type":"object","properties":{"code":{"type":"string"}},"required":["code"]},"ConfirmOut":{"type":"object","properties":{"credited":{"type":"boolean"},"payment_status":{"type":"string"}},"required":["credited","payment_status"]},"ConfirmIn":{"type":"object","properties":{"session_id":{"type":"string"}},"required":["session_id"]},"AutoreloadOut":{"type":"object","properties":{"enabled":{"type":"boolean"},"threshold_cents":{"type":"integer"},"amount_cents":{"type":"integer"}},"required":["enabled","threshold_cents","amount_cents"]},"ReloadOut":{"type":"object","properties":{"credited":{"type":"boolean"},"payment_status":{"type":"string"}},"required":["credited","payment_status"]},"ReloadIn":{"type":"object","properties":{"amount_cents":{"type":"integer"}}},"PortalOut":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]},"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"},"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","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},"enabled":{"type":"boolean","default":true}},"required":["cron"]},"ScheduleListOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ScheduleOut"}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","has_more"]},"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},"enabled":{"type":"boolean","nullable":true}}},"ScheduleRunNowOut":{"type":"object","properties":{"schedule_id":{"type":"string"},"delivery_id":{"type":"string"},"status":{"type":"string","enum":["queued"]}},"required":["schedule_id","delivery_id","status"]},"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"}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","has_more"]},"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":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/ConversationOut"}},"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"]},"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}}},"call_id":{"type":"string"},"name":{"type":"string"},"arguments":{"type":"string"},"output":{"type":"string"},"server_label":{"type":"string"}},"required":["id","type"]},"DeploymentCreatedOut":{"type":"object","properties":{"id":{"type":"string"},"target":{"$ref":"#/components/schemas/DeploymentTarget"},"kind":{"$ref":"#/components/schemas/DeploymentKind"},"address":{"type":"string","nullable":true},"provider":{"type":"string","nullable":true},"provider_metadata":{"type":"object","additionalProperties":{"nullable":true}},"secret_keys":{"type":"array","items":{"type":"string"}},"mcp_url":{"type":"string"},"page_url":{"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"]},"DeploymentKind":{"type":"string","enum":["whatsapp","telegram","slack","discord","sms","voice","email","mcp","web"]},"DeploymentIn":{"type":"object","properties":{"target":{"$ref":"#/components/schemas/DeploymentTarget"},"kind":{"$ref":"#/components/schemas/DeploymentKind"},"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":{"$ref":"#/components/schemas/DeploymentKind"},"address":{"type":"string","nullable":true},"provider":{"type":"string","nullable":true},"provider_metadata":{"type":"object","additionalProperties":{"nullable":true}},"secret_keys":{"type":"array","items":{"type":"string"}},"mcp_url":{"type":"string"},"page_url":{"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"},"last_activity_at":{"type":"string","nullable":true},"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"}},"vector_store_ids":{"type":"array","items":{"type":"string"}},"mcp_servers":{"type":"array","nullable":true,"items":{"type":"string"}},"auto_memory":{"type":"boolean","nullable":true},"memory_consolidation":{"type":"boolean","nullable":true},"variables":{"type":"array","items":{"$ref":"#/components/schemas/AgentVariable"}},"ui_resources":{"type":"array","items":{"$ref":"#/components/schemas/UiResource"}}},"required":["instructions","model","enabled_hosted_tools","vector_store_ids","mcp_servers","auto_memory","memory_consolidation","variables","ui_resources"]},"AgentVariable":{"type":"object","properties":{"name":{"type":"string"},"default":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"required":{"type":"boolean"}},"required":["name"]},"UiResource":{"type":"object","properties":{"name":{"type":"string"},"content_hash":{"type":"string"},"csp":{"$ref":"#/components/schemas/UiCsp"},"permissions":{"type":"object","additionalProperties":{"nullable":true}},"tool":{"$ref":"#/components/schemas/UiResourceTool"}},"required":["name","content_hash"]},"UiCsp":{"type":"object","properties":{"connectDomains":{"type":"array","items":{"type":"string"}},"resourceDomains":{"type":"array","items":{"type":"string"}},"frameDomains":{"type":"array","items":{"type":"string"}},"baseUriDomains":{"type":"array","items":{"type":"string"}}}},"UiResourceTool":{"type":"object","nullable":true,"properties":{"description":{"type":"string"},"input_schema":{"type":"object","additionalProperties":{"nullable":true}},"instruction":{"type":"string","nullable":true},"mutating":{"type":"boolean"}},"required":["description"]},"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"}},"vector_store_ids":{"type":"array","nullable":true,"items":{"type":"string"}},"mcp_servers":{"type":"array","nullable":true,"items":{"type":"string"}},"auto_memory":{"type":"boolean","nullable":true},"memory_consolidation":{"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"}},"vector_store_ids":{"type":"array","nullable":true,"items":{"type":"string"}},"mcp_servers":{"type":"array","nullable":true,"items":{"type":"string"}},"auto_memory":{"type":"boolean","nullable":true},"memory_consolidation":{"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"}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","has_more"]},"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"}},"vector_store_ids":{"type":"array","items":{"type":"string"}},"mcp_servers":{"type":"array","nullable":true,"items":{"type":"string"}},"auto_memory":{"type":"boolean","nullable":true},"memory_consolidation":{"type":"boolean","nullable":true},"variables":{"type":"array","items":{"$ref":"#/components/schemas/AgentVariable"}},"ui_resources":{"type":"array","items":{"$ref":"#/components/schemas/UiResource"}}}},"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"}}}},"UiResourceListOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/UiResource"}}},"required":["data"]},"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"}},"vector_store_ids":{"type":"array","items":{"type":"string"}},"mcp_servers":{"type":"array","nullable":true,"items":{"type":"string"}},"auto_memory":{"type":"boolean"},"memory_consolidation":{"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},"override_keys":{"type":"array","items":{"type":"string"}},"inherited":{"type":"object","nullable":true,"properties":{"model":{"type":"string"},"instructions":{"type":"string","nullable":true},"enabled_hosted_tools":{"type":"array","items":{"type":"string"}},"vector_store_ids":{"type":"array","items":{"type":"string"}},"mcp_servers":{"type":"array","nullable":true,"items":{"type":"string"}},"auto_memory":{"type":"boolean","nullable":true},"memory_consolidation":{"type":"boolean","nullable":true}},"required":["model","instructions","enabled_hosted_tools","vector_store_ids","mcp_servers","auto_memory","memory_consolidation"]},"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"}},"vector_store_ids":{"type":"array","nullable":true,"items":{"type":"string"}},"mcp_servers":{"type":"array","nullable":true,"items":{"type":"string"}},"auto_memory":{"type":"boolean","nullable":true},"memory_consolidation":{"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"}},"vector_store_ids":{"type":"array","nullable":true,"items":{"type":"string"}},"mcp_servers":{"type":"array","nullable":true,"items":{"type":"string"}},"auto_memory":{"type":"boolean","nullable":true},"memory_consolidation":{"type":"boolean","nullable":true}}},"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"]},"RevisionListOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SmithRevisionOut"}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","has_more"]},"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"}},"vector_store_ids":{"type":"array","items":{"type":"string"}},"mcp_servers":{"type":"array","nullable":true,"items":{"type":"string"}},"auto_memory":{"type":"boolean","nullable":true},"memory_consolidation":{"type":"boolean","nullable":true}}},"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"]},"FileListOut":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/FileOut"}},"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"]},"FileOut":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["file"]},"bytes":{"type":"integer"},"created_at":{"type":"integer"},"filename":{"type":"string"},"purpose":{"type":"string"},"status":{"type":"string","enum":["processed"]},"status_details":{"nullable":true}},"required":["id","object","bytes","created_at","filename","purpose","status","status_details"]},"FileDeleted":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["file"]},"deleted":{"type":"boolean","enum":[true]}},"required":["id","object","deleted"]},"VectorStoreOut":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["vector_store"]},"created_at":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"usage_bytes":{"type":"integer"},"status":{"type":"string","enum":["in_progress","completed"]},"file_counts":{"type":"object","properties":{"in_progress":{"type":"integer"},"completed":{"type":"integer"},"failed":{"type":"integer"},"cancelled":{"type":"integer"},"total":{"type":"integer"}},"required":["in_progress","completed","failed","cancelled","total"]},"last_active_at":{"type":"integer","nullable":true},"metadata":{"type":"object","additionalProperties":{"nullable":true}},"smith_id":{"type":"string"},"embedding_model":{"type":"string"}},"required":["id","object","created_at","name","description","usage_bytes","status","file_counts","last_active_at","metadata","smith_id","embedding_model"]},"VectorStoreIn":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"file_ids":{"type":"array","items":{"type":"string"},"maxItems":500},"chunking_strategy":{"$ref":"#/components/schemas/ChunkingStrategyIn"},"metadata":{"type":"object","additionalProperties":{"nullable":true}},"smith_id":{"type":"string"},"embedding_model":{"type":"string"}}},"ChunkingStrategyIn":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["auto"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["static"]},"static":{"type":"object","properties":{"max_chunk_size_tokens":{"type":"integer","minimum":100,"maximum":4096},"chunk_overlap_tokens":{"type":"integer","minimum":0}},"required":["max_chunk_size_tokens","chunk_overlap_tokens"]}},"required":["type","static"]}]},"VectorStoreListOut":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/VectorStoreOut"}},"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"]},"VectorStorePatch":{"type":"object","properties":{"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}}}},"VectorStoreDeleted":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["vector_store.deleted"]},"deleted":{"type":"boolean","enum":[true]}},"required":["id","object","deleted"]},"VectorStoreFileOut":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["vector_store.file"]},"usage_bytes":{"type":"integer"},"created_at":{"type":"integer"},"vector_store_id":{"type":"string"},"status":{"type":"string","enum":["in_progress","completed","failed","cancelled"]},"last_error":{"type":"object","nullable":true,"properties":{"code":{"type":"string","enum":["server_error","unsupported_file","no_text_layer","invalid_file"]},"message":{"type":"string"}},"required":["code","message"]},"chunking_strategy":{"$ref":"#/components/schemas/ChunkingStrategyOut"},"attributes":{"type":"object","nullable":true,"additionalProperties":{"anyOf":[{"type":"string","maxLength":512},{"type":"number"},{"type":"boolean"}]}}},"required":["id","object","usage_bytes","created_at","vector_store_id","status","last_error","chunking_strategy","attributes"]},"ChunkingStrategyOut":{"type":"object","properties":{"type":{"type":"string","enum":["static"]},"static":{"type":"object","properties":{"max_chunk_size_tokens":{"type":"integer"},"chunk_overlap_tokens":{"type":"integer"}},"required":["max_chunk_size_tokens","chunk_overlap_tokens"]}},"required":["type","static"]},"VectorStoreFileIn":{"type":"object","properties":{"file_id":{"type":"string"},"attributes":{"type":"object","nullable":true,"additionalProperties":{"anyOf":[{"type":"string","maxLength":512},{"type":"number"},{"type":"boolean"}]}},"chunking_strategy":{"$ref":"#/components/schemas/ChunkingStrategyIn"}},"required":["file_id"]},"VectorStoreFileListOut":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/VectorStoreFileOut"}},"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"]},"VectorStoreFileContentOut":{"type":"object","properties":{"object":{"type":"string","enum":["vector_store.file_content.page"]},"data":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"]}},"has_more":{"type":"boolean","enum":[false]},"next_page":{"nullable":true}},"required":["object","data","has_more","next_page"]},"VectorStoreFileUpdate":{"type":"object","properties":{"attributes":{"type":"object","nullable":true,"additionalProperties":{"anyOf":[{"type":"string","maxLength":512},{"type":"number"},{"type":"boolean"}]}}},"required":["attributes"]},"VectorStoreFileDeleted":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["vector_store.file.deleted"]},"deleted":{"type":"boolean","enum":[true]}},"required":["id","object","deleted"]},"VectorStoreFileBatchOut":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["vector_store.files_batch"]},"created_at":{"type":"integer"},"vector_store_id":{"type":"string"},"status":{"type":"string","enum":["in_progress","completed","cancelled","failed"]},"file_counts":{"type":"object","properties":{"in_progress":{"type":"integer"},"completed":{"type":"integer"},"failed":{"type":"integer"},"cancelled":{"type":"integer"},"total":{"type":"integer"}},"required":["in_progress","completed","failed","cancelled","total"]}},"required":["id","object","created_at","vector_store_id","status","file_counts"]},"VectorStoreFileBatchIn":{"type":"object","properties":{"file_ids":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":2000},"attributes":{"type":"object","nullable":true,"additionalProperties":{"anyOf":[{"type":"string","maxLength":512},{"type":"number"},{"type":"boolean"}]}},"chunking_strategy":{"$ref":"#/components/schemas/ChunkingStrategyIn"},"files":{"type":"array","items":{"type":"object","properties":{"file_id":{"type":"string"},"attributes":{"type":"object","nullable":true,"additionalProperties":{"anyOf":[{"type":"string","maxLength":512},{"type":"number"},{"type":"boolean"}]}},"chunking_strategy":{"$ref":"#/components/schemas/ChunkingStrategyIn"}},"required":["file_id"]},"minItems":1,"maxItems":2000}}},"VectorStoreSearchOut":{"type":"object","properties":{"object":{"type":"string","enum":["vector_store.search_results.page"]},"search_query":{"type":"array","items":{"type":"string"}},"data":{"type":"array","items":{"$ref":"#/components/schemas/VectorStoreSearchResult"}},"has_more":{"type":"boolean"},"next_page":{"type":"string","nullable":true}},"required":["object","search_query","data","has_more","next_page"]},"VectorStoreSearchResult":{"type":"object","properties":{"file_id":{"type":"string"},"filename":{"type":"string"},"score":{"type":"number"},"attributes":{"type":"object","nullable":true,"additionalProperties":{"anyOf":[{"type":"string","maxLength":512},{"type":"number"},{"type":"boolean"}]}},"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"]}}},"required":["file_id","filename","score","attributes","content"]},"VectorStoreSearchIn":{"type":"object","properties":{"query":{"anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1},"minItems":1}]},"max_num_results":{"type":"integer","minimum":1,"maximum":50},"filters":{"$ref":"#/components/schemas/VectorStoreFilter"},"ranking_options":{"type":"object","properties":{"score_threshold":{"type":"number","minimum":0,"maximum":1}}}},"required":["query"]},"VectorStoreFilter":{"type":"object","nullable":true,"properties":{"type":{"type":"string","enum":["eq","ne","gt","gte","lt","lte","in","nin","and","or"]},"key":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}}]},"filters":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}}},"required":["type"]},"WorkingMemoryOut":{"type":"object","properties":{"content":{"type":"string"}},"required":["content"]},"WorkingMemorySet":{"type":"object","properties":{"content":{"type":"string"}},"required":["content"]},"RecallOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RecallHit"}}},"required":["data"]},"RecallHit":{"type":"object","properties":{"thread_id":{"type":"string"},"content":{"type":"string"},"score":{"type":"number"}},"required":["thread_id","content","score"]},"RecallBody":{"type":"object","properties":{"query":{"type":"string"},"limit":{"type":"integer","default":10}},"required":["query"]},"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},"last_call_error":{"type":"string","nullable":true},"last_call_error_at":{"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","last_call_error","last_call_error_at","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"}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","has_more"]},"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},"last_call_error":{"type":"string","nullable":true},"last_call_error_at":{"type":"string","nullable":true},"created_at":{"type":"string","nullable":true}},"required":["id","name","url","auth","tools","tools_refreshed_at","status","discovery_error","last_call_error","last_call_error_at","created_at"]},"OAuthProtectedResourceMetadata":{"type":"object","properties":{"resource":{"type":"string"},"authorization_servers":{"type":"array","items":{"type":"string"}},"bearer_methods_supported":{"type":"array","items":{"type":"string"}},"scopes_supported":{"type":"array","items":{"type":"string"}}},"required":["resource","authorization_servers","bearer_methods_supported","scopes_supported"]},"OAuthServerMetadata":{"type":"object","properties":{"issuer":{"type":"string"},"authorization_endpoint":{"type":"string"},"token_endpoint":{"type":"string"},"registration_endpoint":{"type":"string"},"jwks_uri":{"type":"string"},"response_types_supported":{"type":"array","items":{"type":"string"}},"grant_types_supported":{"type":"array","items":{"type":"string"}},"code_challenge_methods_supported":{"type":"array","items":{"type":"string"}},"token_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"}},"scopes_supported":{"type":"array","items":{"type":"string"}}},"required":["issuer","authorization_endpoint","token_endpoint","registration_endpoint","jwks_uri","response_types_supported","grant_types_supported","code_challenge_methods_supported","token_endpoint_auth_methods_supported","scopes_supported"]},"Jwks":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"object","properties":{"kid":{"type":"string"},"alg":{"type":"string"}},"required":["kid","alg"],"additionalProperties":{"nullable":true}}}},"required":["keys"]},"OAuthClientRegistrationOut":{"type":"object","properties":{"client_id":{"type":"string"},"client_id_issued_at":{"type":"number"},"client_name":{"type":"string"},"redirect_uris":{"type":"array","items":{"type":"string"}},"token_endpoint_auth_method":{"type":"string"},"grant_types":{"type":"array","items":{"type":"string"}},"response_types":{"type":"array","items":{"type":"string"}}},"required":["client_id","client_id_issued_at","client_name","redirect_uris","token_endpoint_auth_method","grant_types","response_types"]},"OAuthError":{"type":"object","properties":{"error":{"type":"string"},"error_description":{"type":"string"}},"required":["error","error_description"]},"OAuthClientRegistrationIn":{"type":"object","properties":{"redirect_uris":{"type":"array","items":{"type":"string"}},"client_name":{"type":"string"}},"required":["redirect_uris"]},"OAuthTokenOut":{"type":"object","properties":{"access_token":{"type":"string"},"token_type":{"type":"string"},"expires_in":{"type":"number"},"refresh_token":{"type":"string"},"scope":{"type":"string"}},"required":["access_token","token_type","expires_in","refresh_token","scope"]},"AuthorizeRequestOut":{"type":"object","properties":{"client_name":{"type":"string"},"target_name":{"type":"string"},"tenant":{"type":"string"},"resource":{"type":"string"},"deployment_id":{"type":"string"}},"required":["client_name","target_name","tenant","resource","deployment_id"]},"AuthorizeRedirectOut":{"type":"object","properties":{"redirect_url":{"type":"string"}},"required":["redirect_url"]},"AuthorizeCompleteIn":{"type":"object","properties":{"smith_id":{"type":"string"}},"required":["smith_id"]},"TraceListOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TraceOut"}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","has_more"]},"TraceOut":{"type":"object","properties":{"id":{"type":"string"},"smith_id":{"type":"string"},"app_id":{"type":"string","nullable":true},"run_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","run_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","runtime_event"]},"TraceDetailOut":{"type":"object","properties":{"id":{"type":"string"},"smith_id":{"type":"string"},"app_id":{"type":"string","nullable":true},"run_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","run_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"},"input_tokens":{"type":"number"},"cache_read_tokens":{"type":"number"},"cache_write_tokens":{"type":"number"},"cost":{"type":"number"},"run_count":{"type":"number"}},"required":["tokens","input_tokens","cache_read_tokens","cache_write_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"},"input_tokens":{"type":"number"},"cache_read_tokens":{"type":"number"},"cache_write_tokens":{"type":"number"},"cost":{"type":"number"},"run_count":{"type":"number"}},"required":["tokens","input_tokens","cache_read_tokens","cache_write_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},"authorize_url":{"type":"string","nullable":true},"has_client_secret":{"type":"boolean"}},"required":["provider","client_id","token_uri","scopes_allowed","refresh_webhook","authorize_url","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},"authorize_url":{"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","hosted",null]}},"required":["id","provider","label","available"]},"ModelProviderOut":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"base_url":{"type":"boolean"},"hosted":{"type":"boolean"}},"required":["id","label","base_url"]},"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}}},"WebhookRotateOut":{"type":"object","properties":{"id":{"type":"string"},"secret":{"type":"string"},"previous_secret_expires_at":{"type":"string","nullable":true}},"required":["id","secret","previous_secret_expires_at"]},"WebhookRotateIn":{"type":"object","properties":{"grace_seconds":{"type":"integer","minimum":0,"maximum":604800,"default":86400}}},"WebhookTestOut":{"type":"object","properties":{"delivered":{"type":"boolean"}},"required":["delivered"]},"WebhookDeliveryListOut":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDeliveryOut"}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","has_more"]},"WebhookDeliveryOut":{"type":"object","properties":{"id":{"type":"string"},"event_id":{"type":"string"},"event_type":{"type":"string"},"url":{"type":"string"},"status":{"type":"string"},"attempts":{"type":"number"},"last_status":{"type":"number","nullable":true},"last_error":{"type":"string"},"next_attempt_at":{"type":"string","nullable":true},"delivered_at":{"type":"string","nullable":true},"created_at":{"type":"string","nullable":true}},"required":["id","event_id","event_type","url","status","attempts","last_status","last_error","next_attempt_at","delivered_at","created_at"]},"WebhookRedeliverOut":{"type":"object","properties":{"delivery_id":{"type":"string"},"delivered":{"type":"boolean"},"status":{"type":"number","nullable":true}},"required":["delivery_id","delivered","status"]},"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,"minimum":0,"exclusiveMinimum":true,"maximum":315360000},"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},"waba_id":{"type":"string","nullable":true},"webhook_url":{"type":"string"}},"required":["configured"]},"WhatsAppConfigIn":{"type":"object","properties":{"phone_number_id":{"type":"string"},"access_token":{"type":"string"},"waba_id":{"type":"string"}}},"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"}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]},"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"]},"DiscordAppOut":{"type":"object","properties":{"configured":{"type":"boolean"},"application_id":{"type":"string"},"public_key":{"type":"string"},"has_bot_token":{"type":"boolean"},"webhook_url":{"type":"string"}},"required":["configured"]},"DiscordAppIn":{"type":"object","properties":{"application_id":{"type":"string"},"public_key":{"type":"string"},"bot_token":{"type":"string"}},"required":["application_id","public_key","bot_token"]}},"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":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name","in":"query"}],"responses":{"200":{"description":"The org's live projects, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectListOut"}}}},"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/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"}}}},"404":{"description":"No such resource (tenant-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":[]}],"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 budgets, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetListOut"}}}},"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/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":{"$ref":"#/components/schemas/BalanceOut"}}}},"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":[]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","enum":["credit","debit"]},"required":false,"name":"direction","in":"query"}],"responses":{"200":{"description":"The ledger entries, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerListOut"}}}},"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/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":{"$ref":"#/components/schemas/OrgUsageOut"}}}},"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/series":{"get":{"summary":"Daily per-project draw over a rolling window","tags":["Billing"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":365},"required":false,"name":"days","in":"query"}],"responses":{"200":{"description":"Daily credits drawn per project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgUsageSeriesOut"}}}},"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":{"$ref":"#/components/schemas/CheckoutIn"}}}},"responses":{"201":{"description":"The embedded Checkout client secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutOut"}}}},"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":{"$ref":"#/components/schemas/SetupIn"}}}},"responses":{"201":{"description":"The hosted card-setup URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupOut"}}}},"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/redeem":{"post":{"summary":"Redeem a one-time credit code","tags":["Billing"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeemIn"}}}},"responses":{"200":{"description":"The amount credited to the wallet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeemOut"}}}},"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/organization/billing/confirm":{"post":{"summary":"Confirm + credit a returning Checkout Session","tags":["Billing"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmIn"}}}},"responses":{"200":{"description":"Whether the session credited the balance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmOut"}}}},"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":{"$ref":"#/components/schemas/AutoreloadOut"}}}},"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":{"$ref":"#/components/schemas/AutoreloadOut"}}}},"responses":{"200":{"description":"The saved auto-reload configuration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoreloadOut"}}}},"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":{"$ref":"#/components/schemas/ReloadIn"}}}},"responses":{"200":{"description":"Whether the off-session charge credited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReloadOut"}}}},"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"}],"responses":{"200":{"description":"The Stripe billing-portal URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalOut"}}}},"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"},{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"The smith's schedules, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleListOut"}}}},"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}/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":{"202":{"description":"The fire was enqueued onto the smith's lane.","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":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"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"}}}},"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}/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":"order","in":"query"},{"schema":{"type":"string"},"required":false,"name":"after","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"},{"schema":{"type":"string"},"required":false,"name":"after","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"},{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"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/agents/{aid}/ui":{"get":{"summary":"List an agent's UI templates","tags":["agents"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"aid","in":"path"}],"responses":{"200":{"description":"The agent's draft UI templates.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UiResourceListOut"}}}},"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/{aid}/ui/{name}":{"get":{"summary":"Retrieve a UI template","tags":["agents"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"aid","in":"path"},{"schema":{"type":"string"},"required":true,"name":"name","in":"path"}],"responses":{"200":{"description":"The UI template metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UiResource"}}}},"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 UI template","tags":["agents"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"aid","in":"path"},{"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/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}/model_keys":{"get":{"summary":"List a smith's model keys","tags":["Smiths"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"}],"responses":{"200":{"description":"The smith's 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"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/smiths/{pid}/model_keys/{provider}":{"put":{"summary":"Set a smith's model key","tags":["Smiths"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"},{"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"}}}},"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 smith's model key","tags":["Smiths"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"},{"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/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"},{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"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/files":{"get":{"summary":"List uploaded files","tags":["Files"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"purpose","in":"query"},{"schema":{"type":"string"},"required":false,"name":"after","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":10000},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["asc","desc"]},"required":false,"name":"order","in":"query"}],"responses":{"200":{"description":"The tenant's Files-API uploads.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileListOut"}}}},"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/files/{id}":{"get":{"summary":"Retrieve a file","tags":["Files"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The OpenAI File object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileOut"}}}},"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 file","tags":["Files"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Deletion acknowledged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileDeleted"}}}},"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/vector_stores":{"post":{"summary":"Create a vector store","tags":["Vector stores"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreIn"}}}},"responses":{"200":{"description":"The created vector store.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreOut"}}}},"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"}}}}}},"get":{"summary":"List vector stores","tags":["Vector stores"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["asc","desc"]},"required":false,"name":"order","in":"query"},{"schema":{"type":"string"},"required":false,"name":"after","in":"query"},{"schema":{"type":"string"},"required":false,"name":"before","in":"query"}],"responses":{"200":{"description":"The tenant's vector stores.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreListOut"}}}},"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/vector_stores/{vsId}":{"get":{"summary":"Retrieve a vector store","tags":["Vector stores"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"vsId","in":"path"}],"responses":{"200":{"description":"The vector store.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreOut"}}}},"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":"Modify a vector store","tags":["Vector stores"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"vsId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStorePatch"}}}},"responses":{"200":{"description":"The updated vector store.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreOut"}}}},"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 vector store","tags":["Vector stores"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"vsId","in":"path"}],"responses":{"200":{"description":"Deletion acknowledged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreDeleted"}}}},"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/vector_stores/{vsId}/files":{"post":{"summary":"Attach a file to a vector store","tags":["Vector stores"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"vsId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreFileIn"}}}},"responses":{"200":{"description":"The attached file (indexing).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreFileOut"}}}},"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 files in a vector store","tags":["Vector stores"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"vsId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["asc","desc"]},"required":false,"name":"order","in":"query"},{"schema":{"type":"string"},"required":false,"name":"after","in":"query"},{"schema":{"type":"string"},"required":false,"name":"before","in":"query"},{"schema":{"type":"string","enum":["in_progress","completed","failed","cancelled"]},"required":false,"name":"filter","in":"query"}],"responses":{"200":{"description":"The store's files.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreFileListOut"}}}},"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"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/vector_stores/{vsId}/files/{fileId}":{"get":{"summary":"Retrieve a vector store file","tags":["Vector stores"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"vsId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"fileId","in":"path"}],"responses":{"200":{"description":"The vector store file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreFileOut"}}}},"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 vector store file's attributes","tags":["Vector stores"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"vsId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"fileId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreFileUpdate"}}}},"responses":{"200":{"description":"The updated vector store file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreFileOut"}}}},"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":"Detach a file from a vector store","tags":["Vector stores"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"vsId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"fileId","in":"path"}],"responses":{"200":{"description":"Detachment acknowledged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreFileDeleted"}}}},"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/vector_stores/{vsId}/files/{fileId}/content":{"get":{"summary":"Retrieve a vector store file's parsed content","tags":["Vector stores"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"vsId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"fileId","in":"path"}],"responses":{"200":{"description":"The file's indexed chunks.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreFileContentOut"}}}},"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/vector_stores/{vsId}/file_batches":{"post":{"summary":"Attach a batch of files","tags":["Vector stores"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"vsId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreFileBatchIn"}}}},"responses":{"200":{"description":"The file batch (indexing).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreFileBatchOut"}}}},"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/vector_stores/{vsId}/file_batches/{batchId}":{"get":{"summary":"Retrieve a file batch","tags":["Vector stores"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"vsId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"batchId","in":"path"}],"responses":{"200":{"description":"The file batch.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreFileBatchOut"}}}},"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/vector_stores/{vsId}/file_batches/{batchId}/cancel":{"post":{"summary":"Cancel a file batch","tags":["Vector stores"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"vsId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"batchId","in":"path"}],"responses":{"200":{"description":"The cancelled batch.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreFileBatchOut"}}}},"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/vector_stores/{vsId}/file_batches/{batchId}/files":{"get":{"summary":"List files in a file batch","tags":["Vector stores"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"vsId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"batchId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["asc","desc"]},"required":false,"name":"order","in":"query"},{"schema":{"type":"string"},"required":false,"name":"after","in":"query"},{"schema":{"type":"string"},"required":false,"name":"before","in":"query"},{"schema":{"type":"string","enum":["in_progress","completed","failed","cancelled"]},"required":false,"name":"filter","in":"query"}],"responses":{"200":{"description":"The batch's files.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreFileListOut"}}}},"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"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/vector_stores/{vsId}/search":{"post":{"summary":"Search a vector store","tags":["Vector stores"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"vsId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreSearchIn"}}}},"responses":{"200":{"description":"The search results page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreSearchOut"}}}},"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"}}}},"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/smiths/{pid}/memory":{"get":{"summary":"Read a smith's working memory","tags":["Memory"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"}],"responses":{"200":{"description":"The smith's working-memory doc.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkingMemoryOut"}}}},"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":"Replace a smith's working memory","tags":["Memory"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkingMemorySet"}}}},"responses":{"200":{"description":"The updated working-memory doc.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkingMemoryOut"}}}},"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/smiths/{pid}/memory/recall":{"post":{"summary":"Recall relevant past messages","tags":["Memory"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"pid","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecallBody"}}}},"responses":{"200":{"description":"The ranked recall hits, each with a `score`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecallOut"}}}},"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":[]}],"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 registered MCP servers, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerListOut"}}}},"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/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"}}}}}}},"/.well-known/oauth-protected-resource/v1/deployments/{depId}/mcp":{"get":{"tags":["Connector OAuth"],"security":[],"summary":"Protected-resource metadata for an MCP deployment (RFC 9728)","parameters":[{"schema":{"type":"string"},"required":true,"name":"depId","in":"path"}],"responses":{"200":{"description":"Which authorization server guards this MCP endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthProtectedResourceMetadata"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/.well-known/oauth-authorization-server":{"get":{"tags":["Connector OAuth"],"security":[],"summary":"Authorization-server metadata (RFC 8414)","responses":{"200":{"description":"The AS endpoints a host needs to connect.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthServerMetadata"}}}}}}},"/.well-known/jwks.json":{"get":{"tags":["Connector OAuth"],"security":[],"summary":"The signing keys for every minted token","responses":{"200":{"description":"RS256 public keys; `kid` matches the JWT header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Jwks"}}}}}}},"/oauth/register":{"post":{"tags":["Connector OAuth"],"security":[],"summary":"Register a host as a public client (RFC 7591)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClientRegistrationIn"}}}},"responses":{"201":{"description":"The registered client.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClientRegistrationOut"}}}},"400":{"description":"`redirect_uris` was empty or held a non-https URL (http allowed on localhost).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}}}}},"/oauth/authorize":{"get":{"tags":["Connector OAuth"],"security":[],"summary":"The consent page (browser endpoint)","description":"Renders the consent page, or 302s to the tenant's own authorize_url when it has delegated consent. Not a JSON API — send the end-user's browser here.","parameters":[{"schema":{"type":"string","enum":["code"]},"required":true,"name":"response_type","in":"query"},{"schema":{"type":"string"},"required":true,"name":"client_id","in":"query"},{"schema":{"type":"string"},"required":true,"name":"redirect_uri","in":"query"},{"schema":{"type":"string","description":"The deployment's MCP URL (RFC 8707)."},"required":true,"description":"The deployment's MCP URL (RFC 8707).","name":"resource","in":"query"},{"schema":{"type":"string"},"required":true,"name":"code_challenge","in":"query"},{"schema":{"type":"string","enum":["S256"]},"required":true,"name":"code_challenge_method","in":"query"},{"schema":{"type":"string"},"required":false,"name":"state","in":"query"}],"responses":{"200":{"description":"The consent page.","content":{"text/html":{"schema":{"type":"string"}}}},"302":{"description":"To the tenant's delegated authorize page, or back to `redirect_uri` with an `error`.","headers":{"location":{"schema":{"type":"string"},"required":true}}},"400":{"description":"Unknown `client_id`, or a `redirect_uri` this client never registered.","content":{"text/html":{"schema":{"type":"string"}}}}}},"post":{"tags":["Connector OAuth"],"security":[],"summary":"Submit consent (browser endpoint)","description":"The consent form's target: the end-user pastes an existing IC token as `connect_token` to prove who they are, and we 302 back with the code.","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"response_type":{"type":"string","enum":["code"]},"client_id":{"type":"string"},"redirect_uri":{"type":"string"},"resource":{"type":"string","description":"The deployment's MCP URL (RFC 8707)."},"code_challenge":{"type":"string"},"code_challenge_method":{"type":"string","enum":["S256"]},"state":{"type":"string"},"connect_token":{"type":"string"}},"required":["response_type","client_id","redirect_uri","resource","code_challenge","code_challenge_method","connect_token"]}}}},"responses":{"302":{"description":"Back to `redirect_uri` with `code` and `state`.","headers":{"location":{"schema":{"type":"string"},"required":true}}},"400":{"description":"Unknown `client_id`, or an unregistered `redirect_uri`.","content":{"text/html":{"schema":{"type":"string"}}}},"401":{"description":"The consent page again, reporting a bad `connect_token`.","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/oauth/token":{"post":{"tags":["Connector OAuth"],"security":[],"summary":"Exchange a code, or rotate a refresh token (RFC 6749)","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"grant_type":{"type":"string","enum":["authorization_code","refresh_token"]},"client_id":{"type":"string"},"code":{"type":"string"},"redirect_uri":{"type":"string"},"code_verifier":{"type":"string"},"refresh_token":{"type":"string"}},"required":["grant_type","client_id"]}}}},"responses":{"200":{"description":"A `runs:write` smith token and a fresh rotating refresh token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthTokenOut"}}}},"400":{"description":"`invalid_grant` (unknown, used, or expired code; PKCE or `redirect_uri` mismatch) or `unsupported_grant_type`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"401":{"description":"`invalid_client` — the grant belongs to another client.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}}}}},"/v1/oauth/authorize-requests/{request_id}":{"get":{"summary":"Read a pending delegated authorize request","tags":["Tenant"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"request_id","in":"path"}],"responses":{"200":{"description":"Render data for the consent page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizeRequestOut"}}}},"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/oauth/authorize-requests/{request_id}/complete":{"post":{"summary":"Complete a delegated authorize request for a smith","tags":["Tenant"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"request_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizeCompleteIn"}}}},"responses":{"200":{"description":"Where to 302 the browser (carries the code).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizeRedirectOut"}}}},"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/oauth/authorize-requests/{request_id}/decline":{"post":{"summary":"Decline a delegated authorize request","tags":["Tenant"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"request_id","in":"path"}],"responses":{"200":{"description":"Where to 302 the browser (access_denied).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizeRedirectOut"}}}},"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/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":"run_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/runs/{rid}/trace":{"get":{"summary":"Get the trace for a run","tags":["Observability"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"rid","in":"path"}],"responses":{"200":{"description":"The run's 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 tools hosted by Ingram Cloud, 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}/rotate_secret":{"post":{"summary":"Rotate a webhook's signing secret","tags":["Tenant"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"wid","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRotateIn"}}}},"responses":{"200":{"description":"The rotated webhook (new signing secret shown once).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRotateOut"}}}},"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/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/tenant/webhooks/{wid}/deliveries":{"get":{"summary":"List a webhook's delivery attempts","tags":["Tenant"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"wid","in":"path"},{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"The webhook's deliveries, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryListOut"}}}},"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"}}}},"404":{"description":"No such resource (tenant-scoped).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tenant/webhooks/{wid}/deliveries/{did}/redeliver":{"post":{"summary":"Redeliver a webhook delivery","tags":["Tenant"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"wid","in":"path"},{"schema":{"type":"string"},"required":true,"name":"did","in":"path"}],"responses":{"200":{"description":"The redelivery outcome.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRedeliverOut"}}}},"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"}}}},"404":{"description":"No such resource (tenant-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":"Register the tenant's WhatsApp number","tags":["WhatsApp"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppConfigIn"}}}},"responses":{"200":{"description":"The registered number (IC subscribes it to the app-level webhook).","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":[]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"The block list, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuppressionListOut"}}}},"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":"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/discord":{"put":{"summary":"Configure the tenant's Discord app","tags":["Discord"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscordAppIn"}}}},"responses":{"200":{"description":"The Discord app config after the write.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscordAppOut"}}}},"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 Discord app status","tags":["Discord"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"The Discord app config status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscordAppOut"}}}},"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 Discord app","tags":["Discord"],"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"}}}}}}}}}