Files
openwork/packages/docs/openapi.json
T

1 line
721 KiB
JSON

{"openapi":"3.1.0","info":{"title":"Den API","description":"OpenAPI spec for the Den control plane API.\n\nAuthentication:\n- Use `Authorization: Bearer <session-token>` for user-authenticated routes that require a Den session.\n- Use `x-api-key: <den-api-key>` for organization API-key calls. API keys resolve to the issuing user and the organization member they were scoped to when created, so they can call ordinary user and organization routes without a separate signed-in session.\n Example: `curl https://api.openworklabs.com/v1/me -H \"x-api-key: den_...\"`.\n- Session-only flows still require a signed-in user session, including organization creation, invitation acceptance, active-organization switching, and MCP token minting.\n- Public routes like health and documentation do not require authentication.\n\nSwagger tip: use the security schemes in the Authorize dialog to set either `bearerAuth` or `denApiKey` before trying protected endpoints.","version":"dev"},"servers":[{"url":"http://api.den.local"}],"tags":[{"name":"System","description":"Service health and operational routes."},{"name":"Organizations","description":"Top-level organization creation and context routes."},{"name":"Invitations","description":"Invitation preview, acceptance, creation, and cancellation routes."},{"name":"API Keys","description":"Organization API key management routes."},{"name":"SCIM","description":"Organization SCIM connector management routes."},{"name":"SSO","description":"Organization single sign-on connector management routes."},{"name":"Members","description":"Organization member management routes."},{"name":"Roles","description":"Organization custom role management routes."},{"name":"Teams","description":"Organization team management routes."},{"name":"Templates","description":"Organization shared template routes."},{"name":"LLM Providers","description":"Organization LLM provider catalog, configuration, and access routes."},{"name":"Workers","description":"Worker lifecycle, billing, and runtime routes."},{"name":"Worker Runtime","description":"Worker runtime inspection and upgrade routes."},{"name":"Worker Activity","description":"Worker heartbeat and activity reporting routes."},{"name":"Telemetry","description":"Telemetry event ingestion and adoption analytics."},{"name":"Admin","description":"Administrative reporting routes."},{"name":"Users","description":"Current user and membership routes."},{"name":"Bootstrap","description":"Agent-first provisional workspace setup routes."}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"session-token","description":"Session token passed as `Authorization: Bearer <session-token>` for user-authenticated Den routes."},"denApiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"Organization API key passed as the `x-api-key` header. The raw key is the header value; do not prefix it with `Bearer`."}},"schemas":{"DenApiHealthResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"service":{"type":"string","const":"den-api"},"version":{"type":"string"}},"required":["ok","service","version"]},"DenApiReadinessResponse":{"type":"object","properties":{"ok":{"type":"boolean"},"service":{"type":"string","const":"den-api"},"checks":{"type":"object","properties":{"database":{"type":"string","enum":["ok","error"]}},"required":["database"]}},"required":["ok","service","checks"]},"AdminPageInfo":{"type":"object","properties":{"total":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"},"returned":{"type":"number"},"hasMore":{"type":"boolean"},"search":{"type":"string"},"durationMs":{"type":"number"}},"required":["total","limit","offset","returned","hasMore","search","durationMs"]},"AdminUsersPageResponse":{"type":"object","properties":{"users":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},"page":{"$ref":"#/components/schemas/AdminPageInfo"},"billing":{"type":"object","properties":{"loaded":{"type":"boolean"},"paidUsers":{"anyOf":[{"type":"number"},{"type":"null"}]},"unpaidUsers":{"anyOf":[{"type":"number"},{"type":"null"}]},"billingUnavailableUsers":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["loaded","paidUsers","unpaidUsers","billingUnavailableUsers"]},"generatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["users","page","billing","generatedAt"]},"InvalidRequestError":{"type":"object","properties":{"error":{"type":"string","const":"invalid_request"},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["message"],"additionalProperties":{}}}},"required":["error","details"]},"UnauthorizedError":{"type":"object","properties":{"error":{"type":"string","const":"unauthorized"}},"required":["error"]},"ForbiddenError":{"type":"object","properties":{"error":{"type":"string","enum":["forbidden","reauth"]},"reason":{"type":"string"},"message":{"type":"string"}},"required":["error"]},"AdminOrganizationsPageResponse":{"type":"object","properties":{"organizations":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},"page":{"$ref":"#/components/schemas/AdminPageInfo"},"generatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["organizations","page","generatedAt"]},"AdminSummary":{"type":"object","properties":{"totalUsers":{"type":"number"},"totalOrganizations":{"type":"number"},"verifiedUsers":{"anyOf":[{"type":"number"},{"type":"null"}]},"recentUsers7d":{"anyOf":[{"type":"number"},{"type":"null"}]},"recentUsers30d":{"anyOf":[{"type":"number"},{"type":"null"}]},"totalWorkers":{"anyOf":[{"type":"number"},{"type":"null"}]},"cloudWorkers":{"anyOf":[{"type":"number"},{"type":"null"}]},"localWorkers":{"anyOf":[{"type":"number"},{"type":"null"}]},"usersWithWorkers":{"anyOf":[{"type":"number"},{"type":"null"}]},"usersWithoutWorkers":{"anyOf":[{"type":"number"},{"type":"null"}]},"paidUsers":{"anyOf":[{"type":"number"},{"type":"null"}]},"unpaidUsers":{"anyOf":[{"type":"number"},{"type":"null"}]},"billingUnavailableUsers":{"anyOf":[{"type":"number"},{"type":"null"}]},"adminCount":{"type":"number"},"billingLoaded":{"type":"boolean"},"activeUsers1d":{"anyOf":[{"type":"number"},{"type":"null"}]},"activeUsers7d":{"anyOf":[{"type":"number"},{"type":"null"}]},"activeUsers30d":{"anyOf":[{"type":"number"},{"type":"null"}]},"realActiveUsers1d":{"anyOf":[{"type":"number"},{"type":"null"}]},"realActiveUsers7d":{"anyOf":[{"type":"number"},{"type":"null"}]},"realActiveUsers30d":{"anyOf":[{"type":"number"},{"type":"null"}]},"recurringUsers":{"anyOf":[{"type":"number"},{"type":"null"}]},"inviters":{"anyOf":[{"type":"number"},{"type":"null"}]},"medianHoursToFirstInvite":{"anyOf":[{"type":"number"},{"type":"null"}]},"activitySeries":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string"},"activeUsers":{"type":"number"},"realActiveUsers":{"type":"number"},"signups":{"type":"number"}},"required":["day","activeUsers","realActiveUsers","signups"]}}},"required":["totalUsers","totalOrganizations","verifiedUsers","recentUsers7d","recentUsers30d","totalWorkers","cloudWorkers","localWorkers","usersWithWorkers","usersWithoutWorkers","paidUsers","unpaidUsers","billingUnavailableUsers","adminCount","billingLoaded","activeUsers1d","activeUsers7d","activeUsers30d","realActiveUsers1d","realActiveUsers7d","realActiveUsers30d","recurringUsers","inviters","medianHoursToFirstInvite","activitySeries"]},"AdminMetricsResponse":{"type":"object","properties":{"summary":{"$ref":"#/components/schemas/AdminSummary"},"generatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["summary","generatedAt"]},"AdminOverviewResponse":{"type":"object","properties":{"viewer":{"type":"object","properties":{"id":{"description":"Den TypeID with 'usr_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"email":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","name"]},"admins":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},"summary":{"$ref":"#/components/schemas/AdminSummary"},"users":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},"organizations":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},"userPage":{"$ref":"#/components/schemas/AdminPageInfo"},"organizationPage":{"$ref":"#/components/schemas/AdminPageInfo"},"generatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["viewer","admins","summary","users","organizations","userPage","organizationPage","generatedAt"]},"ScimManagementForbiddenError":{"type":"object","properties":{"error":{"type":"string","const":"forbidden"},"message":{"type":"string"}},"required":["error","message"]},"ScimAuthRouteError":{"type":"object","properties":{"detail":{"type":"string"}},"required":["detail"]},"AuthLoginOptionsResponse":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"nextStep":{"anyOf":[{"type":"string","const":"sso"},{"type":"string","const":"google"},{"type":"string","const":"github"},{"type":"string","const":"password"},{"type":"string","const":"new_account"}]},"allowPublicSignup":{"type":"boolean"},"allowInvitationSignup":{"type":"boolean"},"organizationSlug":{"type":"string"},"signInPath":{"type":"string"},"signInUrl":{"type":"string","format":"uri"}},"required":["email","nextStep"]},"LoginOptionsBotVerificationFailedError":{"type":"object","properties":{"error":{"type":"string","const":"bot_verification_failed"},"message":{"type":"string"}},"required":["error","message"]},"LoginOptionsRateLimitedError":{"type":"object","properties":{"error":{"type":"string","const":"rate_limited"},"message":{"type":"string"}},"required":["error","message"]},"AuthLoginLockedError":{"type":"object","properties":{"error":{"type":"string","const":"login_locked"},"message":{"type":"string"}},"required":["error","message"]},"AuthPasswordScreeningUnavailableError":{"type":"object","properties":{"error":{"type":"string","const":"password_screening_unavailable"},"message":{"type":"string"}},"required":["error","message"]},"DesktopHandoffGrantResponse":{"type":"object","properties":{"grant":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"openworkUrl":{"type":"string","format":"uri"},"returnUrl":{"type":"string","format":"uri"}},"required":["grant","expiresAt","openworkUrl"]},"DesktopHandoffInvalidReturnUrlError":{"type":"object","properties":{"error":{"type":"string","const":"invalid_return_url"},"message":{"type":"string"}},"required":["error","message"]},"DesktopHandoffCreateBadRequest":{"anyOf":[{"$ref":"#/components/schemas/InvalidRequestError"},{"$ref":"#/components/schemas/DesktopHandoffInvalidReturnUrlError"}]},"DesktopHandoffGrantCreateBody":{"type":"object","properties":{"next":{"description":"Optional continuation hint for handoff clients.","type":"string","maxLength":128},"desktopScheme":{"description":"Optional desktop URL scheme to use when building the OpenWork deep link.","type":"string","maxLength":32},"returnUrl":{"description":"Optional HTTPS OpenWork Cloud web return URL. Accepted only for multi-organization Cloud instances after server-side origin validation.","type":"string","maxLength":2048}}},"DesktopHandoffStatusResponse":{"type":"object","properties":{"status":{"type":"string","enum":["pending","consumed","unknown"]}},"required":["status"]},"DesktopHandoffRateLimitedError":{"type":"object","properties":{"error":{"type":"string","const":"rate_limited"},"message":{"type":"string"}},"required":["error","message"]},"DesktopHandoffExchangeResponse":{"type":"object","properties":{"token":{"type":"string"},"user":{"type":"object","properties":{"id":{"description":"Den TypeID with 'usr_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","name"]},"organization":{"anyOf":[{"type":"object","properties":{"id":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"slug":{"type":"string"},"name":{"type":"string"}},"required":["id","slug","name"]},{"type":"null"}]},"connectEnabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["token","user","organization","connectEnabled"]},"DesktopHandoffGrantNotFoundError":{"type":"object","properties":{"error":{"type":"string","const":"grant_not_found"},"message":{"type":"string"}},"required":["error","message"]},"NotFoundError":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]},"CloudInstanceResponse":{"type":"object","properties":{"status":{"type":"string","enum":["provisioning","waking","ready","failed"]},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"imageVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"instanceName":{"anyOf":[{"type":"string"},{"type":"null"}]},"latestVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"failure":{"type":"object","properties":{"code":{"type":"string"},"stage":{"type":"string","enum":["provisioning","recovery","runtime"]},"reference":{"type":"string"},"occurredAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["code","stage","reference","occurredAt"]}},"required":["status","url"]},"CloudInstanceUpdateResponse":{"anyOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":true},"status":{"type":"string","const":"update_requested"}},"required":["ok","status"]},{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","enum":["already_current","flush_failed"]}},"required":["ok","error"]}]},"CloudGatewayInstanceResponse":{"type":"object","properties":{"status":{"type":"string","enum":["provisioning","waking","ready","failed"]},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"clientToken":{"anyOf":[{"type":"string"},{"type":"null"}]},"hostToken":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"failure":{"type":"object","properties":{"code":{"type":"string"},"stage":{"type":"string","enum":["provisioning","recovery","runtime"]},"reference":{"type":"string"},"occurredAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["code","stage","reference","occurredAt"]},"providerSync":{"type":"object","properties":{"status":{"type":"string","const":"degraded"},"reason":{"type":"string","const":"unsupported"}},"required":["status"]}},"required":["status","url","clientToken","hostToken","expiresAt"]},"OpenWorkWebAccessRequiredError":{"type":"object","properties":{"error":{"type":"string","const":"openwork_web_access_required"},"message":{"type":"string"}},"required":["error","message"]},"RemovedMemoryList":{"type":"object","properties":{"memories":{"type":"array","items":{"not":{}}}},"required":["memories"]},"RemovedMemorySearch":{"type":"object","properties":{"results":{"type":"array","items":{"not":{}}}},"required":["results"]},"RemovedMemoryNotFound":{"type":"object","properties":{"error":{"type":"string","const":"memory_not_found"}},"required":["error"]},"RemovedMemoryGone":{"type":"object","properties":{"error":{"type":"string","const":"deprecated"},"message":{"type":"string","const":"The Memory Bank feature has been removed. Saved memories no longer exist and new memories cannot be created."}},"required":["error","message"]},"DeprecatedSkillHubError":{"type":"object","properties":{"error":{"type":"string","const":"deprecated"},"message":{"type":"string","const":"Skill hubs are deprecated. Use plugins instead."}},"required":["error","message"]},"CurrentUserResponse":{"type":"object","properties":{"user":{"type":"object","properties":{},"additionalProperties":{}},"session":{"type":"object","properties":{},"additionalProperties":{}}},"required":["user","session"]},"CurrentUserOrganizationsResponse":{"type":"object","properties":{"orgs":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"isActive":{"type":"boolean"}},"required":["id","isActive"],"additionalProperties":{}}},"activeOrgId":{"anyOf":[{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},{"type":"null"}]},"activeOrgSlug":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["orgs","activeOrgId","activeOrgSlug"]},"SendDownloadLinkResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"]},"SendDownloadLinkRateLimitError":{"type":"object","properties":{"error":{"type":"string","const":"rate_limited"},"message":{"type":"string"}},"required":["error","message"]},"SendDownloadLinkEmailFailedError":{"type":"object","properties":{"error":{"type":"string","const":"download_link_email_failed"},"reason":{"type":"string","enum":["email_not_configured","resend_rejected","resend_network","nodemailer_rejected"]},"message":{"type":"string"}},"required":["error","reason","message"]},"UpdateCurrentUserProfileResponse":{"type":"object","properties":{"user":{"type":"object","properties":{},"additionalProperties":{}}},"required":["user"]},"ActiveOrganizationResponse":{"type":"object","properties":{"activeOrgId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"activeOrgSlug":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["activeOrgId","activeOrgSlug"]},"CurrentUserDesktopConfigResponse":{"type":"object","properties":{"allowCustomProviders":{"type":"boolean"},"allowZenModel":{"type":"boolean"},"allowMultipleWorkspaces":{"type":"boolean"},"allowControlSettings":{"type":"boolean"},"allowManageExtensions":{"type":"boolean"},"allowBuiltInExtensions":{"type":"boolean"},"allowAlphaUpdates":{"type":"boolean"},"showWelcomePage":{"type":"boolean"},"allowedDesktopVersions":{"type":"array","items":{"type":"string","minLength":1,"maxLength":32}},"brandAppName":{"type":"string","minLength":1,"maxLength":64},"brandLogoUrl":{"type":"string","maxLength":2048,"format":"uri"},"brandIconUrl":{"type":"string","maxLength":2048,"format":"uri"},"brandAccentColor":{"type":"string","enum":["blue","crimson","cyan","gold","grass","green","indigo","iris","jade","lime","mint","orange","pink","plum","purple","red","ruby","sky","teal","tomato","violet","yellow"]},"automationsEnabled":{"type":"boolean"},"dashboardEnabled":{"type":"boolean"},"connectEnabled":{"type":"boolean"},"onboardingPrompts":{"minItems":2,"maxItems":3,"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},"onboardingPromptDescriptions":{"minItems":2,"maxItems":3,"type":"array","items":{"type":"string","maxLength":120}}}},"OrganizationResponse":{"type":"object","properties":{"organization":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{}},{"type":"null"}]}},"required":["organization"]},"SingleOrgModeError":{"type":"object","properties":{"error":{"type":"string","const":"single_org_mode"},"message":{"type":"string"}},"required":["error","message"]},"InvitationPreviewResponse":{"type":"object","properties":{"invitation":{"type":"object","properties":{"id":{"description":"Den TypeID with 'inv_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"type":"string"},"status":{"type":"string","enum":["pending","accepted","canceled","expired"]},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","email","role","status","expiresAt","createdAt"]},"organization":{"type":"object","properties":{"id":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"name":{"type":"string"},"slug":{"type":"string"},"allowedEmailDomains":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"branding":{"type":"object","properties":{"appName":{"type":"string"},"logoUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"iconUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["appName","logoUrl","iconUrl"]}},"required":["id","name","slug","allowedEmailDomains","branding"]}},"required":["invitation","organization"]},"InvitationAcceptedResponse":{"type":"object","properties":{"accepted":{"type":"boolean","const":true},"organizationId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"organizationSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"invitationId":{"description":"Den TypeID with 'inv_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30}},"required":["accepted","organizationId","organizationSlug","invitationId"]},"AccountEmailDomainNotAllowedError":{"type":"object","properties":{"error":{"type":"string","const":"account_email_domain_not_allowed"},"message":{"type":"string"},"emailDomain":{"anyOf":[{"type":"string"},{"type":"null"}]},"allowedEmailDomains":{"type":"array","items":{"type":"string"}}},"required":["error","message","emailDomain","allowedEmailDomains"]},"ScimDeprovisionedError":{"type":"object","properties":{"error":{"type":"string","const":"scim_deprovisioned"},"message":{"type":"string"}},"required":["error","message"]},"MembershipRemovedError":{"type":"object","properties":{"error":{"type":"string","const":"membership_removed"},"message":{"type":"string"}},"required":["error","message"]},"InvalidEmailDomainError":{"type":"object","properties":{"error":{"type":"string","const":"invalid_email_domain"},"message":{"type":"string"},"invalidDomains":{"type":"array","items":{"type":"string"}}},"required":["error","message","invalidDomains"]},"InvalidBrandIconError":{"type":"object","properties":{"error":{"type":"string","const":"invalid_brand_icon"},"reason":{"type":"string"},"message":{"type":"string"}},"required":["error","reason","message"]},"UpdateOrganizationBadRequest":{"anyOf":[{"$ref":"#/components/schemas/InvalidRequestError"},{"$ref":"#/components/schemas/InvalidEmailDomainError"},{"$ref":"#/components/schemas/InvalidBrandIconError"}]},"EnterprisePlanRequiredError":{"type":"object","properties":{"error":{"type":"string","const":"enterprise_plan_required"},"feature":{"type":"string"},"message":{"type":"string"}},"required":["error","feature","message"]},"SingleOrgSsoStatusResponse":{"type":"object","properties":{"configured":{"type":"boolean"},"organizationSlug":{"type":"string"},"signInPath":{"type":"string"},"signInUrl":{"type":"string","format":"uri"}},"required":["configured","organizationSlug","signInPath","signInUrl"]},"ResolveOrganizationSsoByEmailResponse":{"anyOf":[{"type":"object","properties":{"requireSso":{"type":"boolean","const":true},"method":{"type":"string","const":"sso"},"organizationSlug":{"type":"string"},"signInPath":{"type":"string"},"signInUrl":{"type":"string","format":"uri"}},"required":["requireSso","method","organizationSlug","signInPath","signInUrl"]},{"type":"object","properties":{"requireSso":{"type":"boolean","const":false},"method":{"anyOf":[{"type":"string","const":"google"},{"type":"string","const":"password"},{"type":"string","const":"signup"}]}},"required":["requireSso","method"]}]},"BotVerificationFailedError":{"type":"object","properties":{"error":{"type":"string","const":"bot_verification_failed"},"message":{"type":"string"}},"required":["error","message"]},"RateLimitedError":{"type":"object","properties":{"error":{"type":"string","const":"rate_limited"},"message":{"type":"string"}},"required":["error","message"]},"OrganizationOwner":{"type":"object","properties":{"memberId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29},"userId":{"description":"Den TypeID with 'usr_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["memberId","userId","name","email"]},"OrganizationContextResponse":{"type":"object","properties":{"organization":{"type":"object","properties":{"owner":{"anyOf":[{"$ref":"#/components/schemas/OrganizationOwner"},{"type":"null"}]}},"additionalProperties":{}},"currentMember":{"type":"object","properties":{},"additionalProperties":{}},"currentMemberTeams":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}},"required":["organization","currentMember","currentMemberTeams"],"additionalProperties":{}},"DeleteOrganizationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"organization":{"type":"object","properties":{"id":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"name":{"type":"string"}},"required":["id","name"]}},"required":["ok","organization"]},"OrganizationApiKeyOwner":{"type":"object","properties":{"userId":{"description":"Den TypeID with 'usr_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"memberId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29},"name":{"type":"string"},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["userId","memberId","name","email","image"]},"OrganizationApiKey":{"type":"object","properties":{"id":{"type":"string"},"configId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"start":{"anyOf":[{"type":"string"},{"type":"null"}]},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"rateLimitEnabled":{"type":"boolean"},"rateLimitMax":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"rateLimitTimeWindow":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"lastRequest":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"owner":{"$ref":"#/components/schemas/OrganizationApiKeyOwner"}},"required":["id","configId","name","start","prefix","enabled","rateLimitEnabled","rateLimitMax","rateLimitTimeWindow","lastRequest","expiresAt","createdAt","updatedAt","owner"]},"OrganizationApiKeyListResponse":{"type":"object","properties":{"apiKeys":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationApiKey"}}},"required":["apiKeys"]},"OrganizationApiKeyForbiddenError":{"type":"object","properties":{"error":{"type":"string","enum":["forbidden","reauth"]},"reason":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},"OrganizationNotFoundError":{"type":"object","properties":{"error":{"type":"string","const":"organization_not_found"}},"required":["error"]},"CreatedOrganizationApiKey":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"start":{"anyOf":[{"type":"string"},{"type":"null"}]},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"rateLimitEnabled":{"type":"boolean"},"rateLimitMax":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"rateLimitTimeWindow":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","start","prefix","enabled","rateLimitEnabled","rateLimitMax","rateLimitTimeWindow","expiresAt","createdAt","updatedAt"]},"CreateOrganizationApiKeyResponse":{"type":"object","properties":{"apiKey":{"$ref":"#/components/schemas/CreatedOrganizationApiKey"},"key":{"type":"string","minLength":1}},"required":["apiKey","key"]},"CreateOrganizationApiKeyRequest":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":64}},"required":["name"]},"OrganizationApiKeyNotFoundError":{"type":"object","properties":{"error":{"type":"string","const":"api_key_not_found"}},"required":["error"]},"OrgStripeBillingResponse":{"type":"object","properties":{},"additionalProperties":{}},"OpenWorkWebUnavailableError":{"type":"object","properties":{"error":{"type":"string","const":"openwork_web_not_available"},"message":{"type":"string"}},"required":["error","message"]},"OrgStripeCheckoutResponse":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]},"OrgStripePortalResponse":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]},"OrgStripeCheckoutSyncResponse":{"type":"object","properties":{"synced":{"type":"boolean"}},"required":["synced"]},"ManagedBrandAssetUploadResponse":{"type":"object","properties":{"assets":{"type":"object","properties":{"logo":{"type":"object","properties":{"kind":{"type":"string","enum":["logo","icon"]},"version":{"type":"string","pattern":"^[a-f0-9]{64}$"},"extension":{"type":"string","enum":["png","jpg"]},"contentType":{"type":"string","enum":["image/png","image/jpeg"]},"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"byteLength":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"originalName":{"type":"string"},"uploadedAt":{"type":"string"}},"required":["kind","version","extension","contentType","url","width","height","byteLength","originalName","uploadedAt"]},"icon":{"type":"object","properties":{"kind":{"type":"string","enum":["logo","icon"]},"version":{"type":"string","pattern":"^[a-f0-9]{64}$"},"extension":{"type":"string","enum":["png","jpg"]},"contentType":{"type":"string","enum":["image/png","image/jpeg"]},"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"byteLength":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"originalName":{"type":"string"},"uploadedAt":{"type":"string"}},"required":["kind","version","extension","contentType","url","width","height","byteLength","originalName","uploadedAt"]}}}},"required":["assets"]},"InvalidManagedBrandAssetError":{"type":"object","properties":{"error":{"type":"string","const":"invalid_brand_asset"},"kind":{"anyOf":[{"type":"string","enum":["logo","icon"]},{"type":"null"}]},"reason":{"type":"string"},"message":{"type":"string"}},"required":["error","kind","reason","message"]},"WorkflowRunListResponse":{"type":"object","properties":{"runs":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Den TypeID with 'wfr_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"source":{"type":"string"},"status":{"type":"string","enum":["succeeded","failed"]},"errorKind":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"toolCallCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"toolCalls":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}},{"type":"null"}]},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"finishedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"orgMembershipId":{"anyOf":[{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29},{"type":"null"}]}},"required":["id","source","status","errorKind","errorMessage","toolCallCount","toolCalls","durationMs","startedAt","finishedAt","createdAt","orgMembershipId"]}}},"required":["runs"]},"DashboardElement":{"type":"object","properties":{"serverName":{"type":"string","minLength":1,"maxLength":255},"connectionId":{"type":"string","minLength":1,"maxLength":160},"toolName":{"type":"string","minLength":1,"maxLength":256},"projectedToolName":{"type":"string","minLength":1,"maxLength":256},"resourceUri":{"type":"string","minLength":1,"maxLength":2048},"title":{"type":"string","minLength":1,"maxLength":255},"launchArguments":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"requiresApproval":{"type":"boolean"},"organizationAutoLaunch":{"type":"boolean"}},"required":["serverName","toolName","projectedToolName","resourceUri","title"]},"Dashboard":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"elements":{"type":"array","items":{"$ref":"#/components/schemas/DashboardElement"}},"createdByOrgMembershipId":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","organizationId","name","elements","createdByOrgMembershipId","createdAt","updatedAt"]},"DashboardListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Dashboard"}}},"required":["items"]},"DashboardResponse":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/Dashboard"}},"required":["item"]},"DashboardAccessGrant":{"type":"object","properties":{"id":{"type":"string"},"orgMembershipId":{"anyOf":[{"type":"string"},{"type":"null"}]},"teamId":{"anyOf":[{"type":"string"},{"type":"null"}]},"orgWide":{"type":"boolean"},"role":{"type":"string","enum":["viewer","editor","manager"]},"createdByOrgMembershipId":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"removedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["id","orgMembershipId","teamId","orgWide","role","createdByOrgMembershipId","createdAt","removedAt"]},"DashboardAccessListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/DashboardAccessGrant"}}},"required":["items"]},"DashboardAccessResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"$ref":"#/components/schemas/DashboardAccessGrant"}},"required":["ok","item"]},"MeDashboard":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"elements":{"type":"array","items":{"$ref":"#/components/schemas/DashboardElement"}},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","elements","updatedAt"]},"MeDashboardListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/MeDashboard"}}},"required":["items"]},"DesktopPolicyListResponse":{"type":"object","properties":{"definitions":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},"desktopPolicies":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}},"required":["definitions","desktopPolicies"]},"DesktopPolicyResponse":{"type":"object","properties":{"desktopPolicy":{"type":"object","properties":{},"additionalProperties":{}}},"required":["desktopPolicy"]},"DenDesktopPolicyDocumentWrite":{"type":"object","properties":{"allowCustomProviders":{"type":"boolean"},"allowZenModel":{"type":"boolean"},"allowMultipleWorkspaces":{"type":"boolean"},"allowControlSettings":{"type":"boolean"},"allowManageExtensions":{"type":"boolean"},"allowBuiltInExtensions":{"type":"boolean"},"allowAlphaUpdates":{"type":"boolean"},"showWelcomePage":{"type":"boolean"},"onboardingPrompts":{"anyOf":[{"minItems":2,"maxItems":3,"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},{"type":"null"}]},"onboardingPromptDescriptions":{"anyOf":[{"minItems":2,"maxItems":3,"type":"array","items":{"type":"string","maxLength":120}},{"type":"null"}]}}},"InferenceStatus":{"type":"object","properties":{"enabled":{"type":"boolean"},"tier":{"type":"string","enum":["tier1","tier2"]},"memberCount":{"type":"number"},"proxyBaseUrl":{"type":"string"},"upstreamProviderConfigured":{"type":"boolean"},"subscribed":{"type":"boolean"},"buckets":{"type":"array","items":{"type":"object","properties":{"windowType":{"type":"string","enum":["five_hour","weekly","monthly"]},"windowStartAt":{"type":"string"},"windowEndAt":{"type":"string"},"limitAmount":{"type":"number"},"usedAmount":{"type":"number"}},"required":["windowType","windowStartAt","windowEndAt","limitAmount","usedAmount"]}}},"required":["enabled","tier","memberCount","proxyBaseUrl","upstreamProviderConfigured","buckets"]},"InferenceStatusResponse":{"type":"object","properties":{"inference":{"$ref":"#/components/schemas/InferenceStatus"}},"required":["inference"]},"InferenceProviderMissingError":{"type":"object","properties":{"error":{"type":"string","const":"openrouter_management_api_key_missing"},"message":{"type":"string"}},"required":["error","message"]},"OrganizationScimConnection":{"type":"object","properties":{"id":{"type":"string"},"providerId":{"type":"string"},"organizationId":{"type":"string"},"groupMappingMode":{"type":"string","enum":["metadata_only","create_teams"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","providerId","organizationId","groupMappingMode","createdAt","updatedAt"]},"OrganizationScimHealth":{"type":"object","properties":{"unresolvedFailureCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastFailureAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"lastFailureAction":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastFailureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"nextRetryAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"lastSuccessfulSyncAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["unresolvedFailureCount","lastFailureAt","lastFailureAction","lastFailureMessage","nextRetryAt","lastSuccessfulSyncAt"]},"OrganizationScimConnectionResponse":{"type":"object","properties":{"baseUrl":{"type":"string","format":"uri"},"ssoReady":{"type":"boolean"},"connection":{"anyOf":[{"$ref":"#/components/schemas/OrganizationScimConnection"},{"type":"null"}]},"health":{"$ref":"#/components/schemas/OrganizationScimHealth"}},"required":["baseUrl","ssoReady","connection","health"]},"ScimInvalidRequestError":{"type":"object","properties":{"error":{"type":"string","const":"invalid_request"},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["message"],"additionalProperties":{}}}},"required":["error","details"]},"ScimUnauthorizedError":{"type":"object","properties":{"error":{"type":"string","const":"unauthorized"}},"required":["error"]},"ScimForbiddenError":{"type":"object","properties":{"error":{"type":"string","enum":["forbidden","reauth"]},"reason":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},"ScimOrganizationNotFoundError":{"type":"object","properties":{"error":{"type":"string","const":"organization_not_found"}},"required":["error"]},"RotateOrganizationScimTokenResponse":{"type":"object","properties":{"baseUrl":{"type":"string","format":"uri"},"ssoReady":{"type":"boolean","const":true},"connection":{"$ref":"#/components/schemas/OrganizationScimConnection"},"scimToken":{"type":"string","minLength":1},"health":{"$ref":"#/components/schemas/OrganizationScimHealth"}},"required":["baseUrl","ssoReady","connection","scimToken","health"]},"ScimSsoRequiredError":{"type":"object","properties":{"error":{"type":"string","const":"sso_required"},"message":{"type":"string"}},"required":["error","message"]},"OrganizationScimReconciliationResponse":{"type":"object","properties":{"checked":{"type":"integer","minimum":0,"maximum":9007199254740991},"repaired":{"type":"integer","minimum":0,"maximum":9007199254740991},"failures":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["checked","repaired","failures"]},"OrganizationOidcSsoConfig":{"type":"object","properties":{"clientId":{"anyOf":[{"type":"string"},{"type":"null"}]},"scopes":{"type":"array","items":{"type":"string"}},"skipDiscovery":{"type":"boolean"},"authorizationEndpoint":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"tokenEndpoint":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"jwksEndpoint":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"userInfoEndpoint":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"tokenEndpointAuthentication":{"anyOf":[{"type":"string","enum":["client_secret_basic","client_secret_post"]},{"type":"null"}]}},"required":["clientId","scopes","skipDiscovery","authorizationEndpoint","tokenEndpoint","jwksEndpoint","userInfoEndpoint","tokenEndpointAuthentication"]},"OrganizationSamlSsoConfig":{"type":"object","properties":{"entryPoint":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"audience":{"anyOf":[{"type":"string"},{"type":"null"}]},"wantAssertionsSigned":{"type":"boolean"}},"required":["entryPoint","audience","wantAssertionsSigned"]},"OrganizationSsoConnection":{"type":"object","properties":{"id":{"type":"string"},"providerId":{"type":"string"},"kind":{"type":"string","enum":["oidc","saml"]},"issuer":{"type":"string","format":"uri"},"domain":{"type":"string"},"status":{"type":"string"},"signInPath":{"type":"string"},"signInUrl":{"type":"string","format":"uri"},"redirectUrl":{"type":"string","format":"uri"},"acsUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"metadataUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"domainVerified":{"type":"boolean"},"domainVerificationHost":{"type":"string"},"domainVerificationDnsName":{"type":"string"},"oidc":{"anyOf":[{"$ref":"#/components/schemas/OrganizationOidcSsoConfig"},{"type":"null"}]},"saml":{"anyOf":[{"$ref":"#/components/schemas/OrganizationSamlSsoConfig"},{"type":"null"}]},"lastTestedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","providerId","kind","issuer","domain","status","signInPath","signInUrl","redirectUrl","acsUrl","metadataUrl","domainVerified","domainVerificationHost","domainVerificationDnsName","oidc","saml","lastTestedAt","lastError","createdAt","updatedAt"]},"OrganizationSsoConnectionResponse":{"type":"object","properties":{"connection":{"anyOf":[{"$ref":"#/components/schemas/OrganizationSsoConnection"},{"type":"null"}]},"domainVerificationToken":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["connection"]},"SsoInvalidRequestError":{"type":"object","properties":{"error":{"type":"string","const":"invalid_request"},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["message"],"additionalProperties":{}}}},"required":["error","details"]},"SsoUnauthorizedError":{"type":"object","properties":{"error":{"type":"string","const":"unauthorized"}},"required":["error"]},"SsoForbiddenError":{"type":"object","properties":{"error":{"type":"string","enum":["forbidden","reauth"]},"reason":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},"SsoOrganizationNotFoundError":{"type":"object","properties":{"error":{"type":"string","const":"organization_not_found"}},"required":["error"]},"OrganizationSsoDomainVerificationResponse":{"type":"object","properties":{"domainVerificationToken":{"type":"string","minLength":1}},"required":["domainVerificationToken"]},"InvitationResponse":{"type":"object","properties":{"invitationId":{"description":"Den TypeID with 'inv_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"inviteToken":{"type":"string"}},"required":["invitationId","email","role","expiresAt","inviteToken"]},"InvitePaymentRequiredError":{"type":"object","properties":{"error":{"type":"string","const":"payment_required"},"reason":{"type":"string","const":"seat_subscription_required"},"subscriptionType":{"type":"string","const":"seat"},"currentCount":{"type":"number"},"freeSeatCount":{"type":"number"},"message":{"type":"string"}},"required":["error","reason","subscriptionType","currentCount","freeSeatCount","message"]},"InviteEmailDomainNotAllowedError":{"type":"object","properties":{"error":{"type":"string","const":"invite_email_domain_not_allowed"},"message":{"type":"string"},"emailDomain":{"anyOf":[{"type":"string"},{"type":"null"}]},"allowedEmailDomains":{"type":"array","items":{"type":"string"}}},"required":["error","message","emailDomain","allowedEmailDomains"]},"InvitationEmailFailedError":{"type":"object","properties":{"error":{"type":"string","const":"invitation_email_failed"},"reason":{"type":"string","enum":["email_not_configured","resend_rejected","resend_network","nodemailer_rejected"]},"message":{"type":"string"},"invitationId":{"description":"Den TypeID with 'inv_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30}},"required":["error","reason","message","invitationId"]},"SuccessResponse":{"type":"object","properties":{"success":{"type":"boolean","const":true}},"required":["success"]},"InvitationNotPendingError":{"type":"object","properties":{"error":{"type":"string","const":"invitation_not_pending"},"message":{"type":"string"},"status":{"type":"string"}},"required":["error","message","status"]},"CreateInstallLinkResponse":{"type":"object","properties":{"token":{"type":"string"},"installPageUrl":{"type":"string","format":"uri"}},"required":["token","installPageUrl"]},"CapabilityDisabledError":{"type":"object","properties":{"error":{"type":"string","const":"capability_disabled"},"capability":{"type":"string","enum":["installLinks","mcpConnections","cloud"]}},"required":["error","capability"]},"CreateInstallLinkRequest":{"type":"object","properties":{"rotate":{"default":false,"type":"boolean"}}},"AuthenticatedInstallConfig":{"type":"object","properties":{"appName":{"default":"OpenWork","type":"string","minLength":1,"maxLength":64},"clientName":{"type":"string","minLength":1},"webUrl":{"type":"string","format":"uri"},"apiUrl":{"type":"string","format":"uri"},"requireSignin":{"type":"boolean"},"logoUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"iconUrl":{"default":null,"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"desktopVersion":{"type":"string","minLength":1},"distribution":{"type":"string","enum":["cloud","enterprise"]}},"required":["clientName","webUrl","apiUrl","requireSignin","logoUrl","desktopVersion","distribution"]},"InstallExperienceConfig":{"type":"object","properties":{"appName":{"default":"OpenWork","type":"string","minLength":1,"maxLength":64},"clientName":{"type":"string","minLength":1},"webUrl":{"type":"string","format":"uri"},"apiUrl":{"type":"string","format":"uri"},"requireSignin":{"type":"boolean"},"logoUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"iconUrl":{"default":null,"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"connectUrl":{"type":"string","minLength":1},"connectExpiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"activationUrl":{"type":"string","format":"uri"},"activationExpiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"desktopVersion":{"type":"string","minLength":1},"distribution":{"type":"string","enum":["cloud","enterprise"]}},"required":["clientName","webUrl","apiUrl","requireSignin","logoUrl","connectUrl","connectExpiresAt","activationUrl","activationExpiresAt","desktopVersion","distribution"]},"InstallLinkNotFoundError":{"type":"object","properties":{"error":{"type":"string","const":"install_link_not_found"}},"required":["error"]},"ConnectLinkClaims":{"type":"object","properties":{"iss":{"type":"string","format":"uri"},"aud":{"type":"string","const":"openwork-desktop-connect"},"iat":{"type":"integer","minimum":0,"maximum":9007199254740991},"exp":{"type":"integer","minimum":0,"maximum":9007199254740991},"jti":{"type":"string","minLength":8},"v":{"type":"number","const":1},"org":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128}},"required":["name"]},"brand":{"type":"object","properties":{"appName":{"type":"string","minLength":1,"maxLength":64},"logoUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"iconUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["appName","logoUrl","iconUrl"]},"den":{"type":"object","properties":{"baseUrl":{"type":"string","format":"uri"},"apiBaseUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["baseUrl"]},"requireSignin":{"type":"boolean"}},"required":["iss","aud","iat","exp","jti","v","org","brand","den","requireSignin"]},"DesktopConnectGrantStatusResponse":{"type":"object","properties":{"status":{"type":"string","enum":["pending","connected"]},"claims":{"$ref":"#/components/schemas/ConnectLinkClaims"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["status","claims","expiresAt"]},"DesktopConnectGrantFailure":{"type":"object","properties":{"error":{"type":"string","enum":["connect_grant_invalid","connect_grant_expired","connect_grant_replayed"]}},"required":["error"]},"DesktopConnectGrantResponse":{"type":"object","properties":{"claims":{"$ref":"#/components/schemas/ConnectLinkClaims"}},"required":["claims"]},"LlmProviderTestConnectionResponse":{"type":"object","properties":{"result":{"type":"object","properties":{"ok":{"type":"boolean"},"vendor":{"type":"string","enum":["azure","openai-compatible"]},"normalizedApi":{"anyOf":[{"type":"string"},{"type":"null"}]},"attempted":{"type":"array","items":{"type":"string"}},"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"hint":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["ok","vendor","normalizedApi","attempted","models","hint","status"]},"verifications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["ok","adjusted","failed"]},"npm":{"type":"string","enum":["@ai-sdk/openai-compatible","@ai-sdk/openai"]},"message":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","status","npm","message"]}}},"required":["result"]},"LlmProviderCatalogListResponse":{"type":"object","properties":{"providers":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}},"required":["providers"]},"ProviderCatalogUnavailableError":{"type":"object","properties":{"error":{"type":"string","const":"provider_catalog_unavailable"},"message":{"type":"string"}},"required":["error","message"]},"LlmProviderCatalogResponse":{"type":"object","properties":{"provider":{"type":"object","properties":{},"additionalProperties":{}}},"required":["provider"]},"LlmProviderListResponse":{"type":"object","properties":{"llmProviders":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}},"required":["llmProviders"]},"LlmProviderResponse":{"type":"object","properties":{"llmProvider":{"type":"object","properties":{"memberCredential":{"type":"object","properties":{"state":{"type":"string","enum":["missing","active","blocked","stale","error"]}},"required":["state"]}},"additionalProperties":{}}},"required":["llmProvider"]},"LlmProviderMemberCredentialSummary":{"type":"object","properties":{"state":{"type":"string","enum":["active","blocked","stale","error"]},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["state","version","updatedAt"]},"LlmProviderNotPerMemberError":{"type":"object","properties":{"error":{"type":"string","const":"not_per_member"}},"required":["error"]},"LlmProviderCredentialBlockedError":{"type":"object","properties":{"error":{"type":"string","const":"credential_blocked"}},"required":["error"]},"LlmProviderMemberCredentialDeleteResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"]},"LlmProviderMemberCredentialListResponse":{"type":"object","properties":{"memberCredentials":{"type":"array","items":{"type":"object","properties":{"orgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29},"state":{"type":"string","enum":["missing","active","blocked","stale","error"]},"externalPrincipalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalCredentialId":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["orgMembershipId","state","externalPrincipalId","externalCredentialId","version","updatedAt"]}}},"required":["memberCredentials"]},"LlmProviderCredentialVersionConflictError":{"type":"object","properties":{"error":{"type":"string","const":"version_conflict"}},"required":["error"]},"ConflictError":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]},"OAuthClientConfigResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"providerId":{"type":"string"},"clientId":{"type":"string"},"features":{"type":"array","items":{"type":"string"}},"tenantId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ok","providerId","clientId","features","tenantId"]},"UnknownOAuthProviderError":{"type":"object","properties":{"error":{"type":"string","const":"unknown_oauth_provider"},"message":{"type":"string"}},"required":["error","message"]},"OAuthClientConfigDetailResponse":{"type":"object","properties":{"providerId":{"type":"string"},"configured":{"type":"boolean"},"clientId":{"anyOf":[{"type":"string"},{"type":"null"}]},"features":{"type":"array","items":{"type":"string"}},"scopes":{"type":"array","items":{"type":"string"}},"redirectUri":{"type":"string"},"tenantId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["providerId","configured","clientId","features","scopes","redirectUri","tenantId"]},"OAuthConnectStartResponse":{"type":"object","properties":{"authorizeUrl":{"type":"string"}},"required":["authorizeUrl"]},"OAuthClientNotConfiguredError":{"type":"object","properties":{"error":{"type":"string","const":"client_not_configured"},"message":{"type":"string"}},"required":["error","message"]},"NativeProviderConnectStartResponse":{"type":"object","properties":{"status":{"type":"string","enum":["connected","needs_auth"]},"authorizeUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","authorizeUrl"]},"OAuthProviderStatusResponse":{"type":"object","properties":{"providerId":{"type":"string"},"connected":{"type":"boolean"},"externalAccountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"scopes":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["providerId","connected","externalAccountId","scopes"]},"GoogleWorkspaceDriveFileSummary":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"mimeType":{"type":"string"},"modifiedTime":{"type":"string"},"webViewLink":{"type":"string"},"size":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","mimeType","modifiedTime","webViewLink","size"]},"GoogleWorkspaceUploadDriveFileResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"file":{"$ref":"#/components/schemas/GoogleWorkspaceDriveFileSummary"}},"required":["ok","file"]},"GoogleWorkspaceNeedsConnectionError":{"type":"object","properties":{"error":{"type":"string","const":"needs_connection"},"message":{"type":"string"}},"required":["error","message"]},"GoogleWorkspaceUpstreamError":{"type":"object","properties":{"error":{"type":"string","const":"google_api_error"},"message":{"type":"string"}},"required":["error","message"]},"GoogleWorkspaceDraftResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"draftId":{"type":"string"},"messageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"draftUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Gmail URL for the ready-to-send draft. Always share draftUrl with the user so they can open the draft in Gmail for review and send."},"threadUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Gmail URL for the conversation thread when this draft is a threaded reply."},"to":{"type":"string"},"subject":{"type":"string"},"threadId":{"anyOf":[{"type":"string"},{"type":"null"}]},"quotedHistoryIncluded":{"type":"boolean","description":"True when quoted conversation history was included by the server or already present in the request body."},"attachments":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"mimeType":{"type":"string"},"size":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["filename","mimeType","size"]}}},"required":["ok","draftId","messageId","draftUrl","threadUrl","to","subject","threadId","quotedHistoryIncluded"]},"GoogleWorkspaceGmailMessageSummary":{"type":"object","properties":{"id":{"type":"string"},"threadId":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"bcc":{"type":"string"},"subject":{"type":"string"},"date":{"type":"string"},"snippet":{"type":"string"}},"required":["id","threadId","from","to","bcc","subject","date","snippet"]},"GoogleWorkspaceGmailMessagesResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"messages":{"type":"array","items":{"$ref":"#/components/schemas/GoogleWorkspaceGmailMessageSummary"}}},"required":["ok","messages"]},"GoogleWorkspaceGmailAttachment":{"type":"object","properties":{"attachmentId":{"type":"string"},"filename":{"type":"string"},"mimeType":{"type":"string"},"size":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["attachmentId","filename","mimeType","size"]},"GoogleWorkspaceGmailMessage":{"type":"object","properties":{"id":{"type":"string"},"threadId":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"bcc":{"type":"string"},"subject":{"type":"string"},"date":{"type":"string"},"snippet":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/GoogleWorkspaceGmailAttachment"}}},"required":["id","threadId","from","to","bcc","subject","date","snippet","body","attachments"]},"GoogleWorkspaceGmailMessageResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"message":{"$ref":"#/components/schemas/GoogleWorkspaceGmailMessage"}},"required":["ok","message"]},"GoogleWorkspaceGmailAttachmentResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"messageId":{"type":"string"},"attachmentId":{"type":"string"},"size":{"type":"number","description":"Attachment size in bytes."},"dataBase64":{"type":"string","description":"Standard base64-encoded attachment bytes; decode locally to reconstruct the file."}},"required":["ok","messageId","attachmentId","size","dataBase64"]},"GoogleWorkspaceCalendarEvent":{"type":"object","properties":{"id":{"type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"location":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"},"status":{"type":"string"},"htmlLink":{"type":"string"},"attendees":{"type":"array","items":{"type":"string"}},"meetLink":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","summary","description","location","start","end","status","htmlLink","attendees","meetLink"]},"GoogleWorkspaceCalendarEventsResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"events":{"type":"array","items":{"$ref":"#/components/schemas/GoogleWorkspaceCalendarEvent"}}},"required":["ok","events"]},"GoogleWorkspaceCreateCalendarEventResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"eventId":{"type":"string"},"htmlLink":{"type":"string"},"summary":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"},"meetLink":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ok","eventId","htmlLink","summary","start","end","meetLink"]},"GoogleWorkspaceCreateCalendarEventBody":{"type":"object","properties":{"summary":{"type":"string","minLength":1,"maxLength":1000,"description":"Event title."},"description":{"description":"Optional event description.","type":"string","maxLength":20000},"location":{"description":"Optional event location.","type":"string","maxLength":1000},"start":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Event start date-time."},"end":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Event end date-time."},"timeZone":{"description":"Optional IANA time zone for start and end.","type":"string","minLength":1,"maxLength":128},"attendees":{"description":"Optional attendee email addresses.","maxItems":100,"type":"array","items":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"createMeetLink":{"description":"Set true to create a Google Meet conferencing link for this event; the response returns meetLink when Google creates it.","type":"boolean"}},"required":["summary","start","end"]},"GoogleWorkspaceUpdateCalendarEventResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"eventId":{"type":"string"},"htmlLink":{"type":"string"},"summary":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"},"meetLink":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ok","eventId","htmlLink","summary","start","end","meetLink"]},"GoogleWorkspaceUpdateCalendarEventBody":{"type":"object","properties":{"createMeetLink":{"type":"boolean","const":true,"description":"Set true to add a Google Meet conferencing link to this existing event."}},"required":["createMeetLink"]},"GoogleWorkspaceDriveFilesResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"files":{"type":"array","items":{"$ref":"#/components/schemas/GoogleWorkspaceDriveFileSummary"}}},"required":["ok","files"]},"GoogleWorkspaceDriveFileResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"file":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"mimeType":{"type":"string"},"modifiedTime":{"type":"string"},"webViewLink":{"type":"string"},"size":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"contentBase64":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Standard base64-encoded file bytes for binary files; decode locally. Same encoding as the gmail-attachment capability's dataBase64 — it can be passed directly to the Drive upload capability's dataBase64 field."},"encoding":{"type":"string","enum":["text","base64","none"]},"truncated":{"type":"boolean"},"contentUnavailableReason":{"anyOf":[{"type":"string","enum":["file_too_large"]},{"type":"null"}]}},"required":["id","name","mimeType","modifiedTime","webViewLink","size","content","contentBase64","encoding","truncated","contentUnavailableReason"]}},"required":["ok","file"]},"GoogleWorkspaceShareDriveFileResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"fileId":{"type":"string"},"permissionId":{"type":"string"},"type":{"type":"string"},"role":{"type":"string"}},"required":["ok","fileId","permissionId","type","role"]},"GoogleWorkspaceShareDriveFileBody":{"type":"object","properties":{"type":{"type":"string","enum":["user","domain"],"description":"Use type=user to share with one person, or type=domain to share with the entire organization."},"emailAddress":{"description":"Required when type=user; pass the person's email address, for example raghav@openworklabs.com.","type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"domain":{"description":"Required when type=domain; pass the organization's Google Workspace domain, for example openworklabs.com.","type":"string","minLength":1,"maxLength":255},"role":{"default":"reader","description":"Drive permission role to grant.","type":"string","enum":["reader","commenter","writer"]},"sendNotificationEmail":{"default":true,"description":"Whether Google should email the recipient about the new access.","type":"boolean"}},"required":["type"],"additionalProperties":false},"GoogleWorkspaceMissingThreadIdError":{"type":"object","properties":{"error":{"type":"string","const":"missing_thread_id"},"message":{"type":"string"}},"required":["error","message"]},"Microsoft365EmailAddress":{"type":"object","properties":{"name":{"type":"string"},"address":{"type":"string"}},"required":["name","address"]},"Microsoft365MailMessageSummary":{"type":"object","properties":{"id":{"type":"string"},"conversationId":{"type":"string"},"subject":{"type":"string"},"receivedDateTime":{"type":"string"},"preview":{"type":"string"},"from":{"anyOf":[{"$ref":"#/components/schemas/Microsoft365EmailAddress"},{"type":"null"}]},"to":{"type":"array","items":{"$ref":"#/components/schemas/Microsoft365EmailAddress"}},"webLink":{"type":"string"},"hasAttachments":{"type":"boolean"}},"required":["id","conversationId","subject","receivedDateTime","preview","from","to","webLink","hasAttachments"]},"Microsoft365MailMessagesResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"messages":{"type":"array","items":{"$ref":"#/components/schemas/Microsoft365MailMessageSummary"}}},"required":["ok","messages"]},"Microsoft365NeedsConnectionError":{"type":"object","properties":{"error":{"type":"string","const":"needs_connection"},"message":{"type":"string"}},"required":["error","message"]},"Microsoft365GraphError":{"type":"object","properties":{"error":{"type":"string","const":"microsoft_graph_error"},"message":{"type":"string"}},"required":["error","message"]},"Microsoft365MailMessage":{"type":"object","properties":{"id":{"type":"string"},"conversationId":{"type":"string"},"subject":{"type":"string"},"receivedDateTime":{"type":"string"},"preview":{"type":"string"},"from":{"anyOf":[{"$ref":"#/components/schemas/Microsoft365EmailAddress"},{"type":"null"}]},"to":{"type":"array","items":{"$ref":"#/components/schemas/Microsoft365EmailAddress"}},"webLink":{"type":"string"},"hasAttachments":{"type":"boolean"},"cc":{"type":"array","items":{"$ref":"#/components/schemas/Microsoft365EmailAddress"}},"body":{"type":"string"},"bodyContentType":{"type":"string"},"bodyTruncated":{"type":"boolean"}},"required":["id","conversationId","subject","receivedDateTime","preview","from","to","webLink","hasAttachments","cc","body","bodyContentType","bodyTruncated"]},"Microsoft365MailMessageResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"message":{"$ref":"#/components/schemas/Microsoft365MailMessage"}},"required":["ok","message"]},"Microsoft365CalendarEvent":{"type":"object","properties":{"id":{"type":"string"},"subject":{"type":"string"},"preview":{"type":"string"},"start":{"type":"string"},"startTimeZone":{"type":"string"},"end":{"type":"string"},"endTimeZone":{"type":"string"},"isAllDay":{"type":"boolean"},"location":{"type":"string"},"organizer":{"anyOf":[{"$ref":"#/components/schemas/Microsoft365EmailAddress"},{"type":"null"}]},"attendees":{"type":"array","items":{"$ref":"#/components/schemas/Microsoft365EmailAddress"}},"webLink":{"type":"string"},"onlineMeetingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","subject","preview","start","startTimeZone","end","endTimeZone","isAllDay","location","organizer","attendees","webLink","onlineMeetingUrl"]},"Microsoft365CalendarEventsResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"events":{"type":"array","items":{"$ref":"#/components/schemas/Microsoft365CalendarEvent"}}},"required":["ok","events"]},"Microsoft365DriveItem":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"size":{"anyOf":[{"type":"number"},{"type":"null"}]},"modifiedTime":{"type":"string"},"webUrl":{"type":"string"},"mimeType":{"type":"string"},"kind":{"type":"string","enum":["file","folder","unknown"]}},"required":["id","name","size","modifiedTime","webUrl","mimeType","kind"]},"Microsoft365DriveFilesResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"files":{"type":"array","items":{"$ref":"#/components/schemas/Microsoft365DriveItem"}}},"required":["ok","files"]},"Microsoft365DriveFileResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"file":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"size":{"anyOf":[{"type":"number"},{"type":"null"}]},"modifiedTime":{"type":"string"},"webUrl":{"type":"string"},"mimeType":{"type":"string"},"kind":{"type":"string","enum":["file","folder","unknown"]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"contentBase64":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Standard base64-encoded file bytes for binary files; decode locally."},"encoding":{"type":"string","enum":["text","base64","none"]},"contentType":{"anyOf":[{"type":"string"},{"type":"null"}]},"truncated":{"type":"boolean"},"contentUnavailableReason":{"anyOf":[{"type":"string","enum":["folder","file_too_large"]},{"type":"null"}]}},"required":["id","name","size","modifiedTime","webUrl","mimeType","kind","content","contentBase64","encoding","contentType","truncated","contentUnavailableReason"]}},"required":["ok","file"]},"Microsoft365MailDraftResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"draft":{"$ref":"#/components/schemas/Microsoft365MailMessage"}},"required":["ok","draft"]},"Microsoft365MailDraftBody":{"type":"object","properties":{"to":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"cc":{"maxItems":50,"type":"array","items":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"bcc":{"maxItems":50,"type":"array","items":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"subject":{"type":"string","minLength":1,"maxLength":998},"body":{"type":"string","maxLength":200000}},"required":["to","subject","body"]},"Microsoft365CalendarEventResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"event":{"$ref":"#/components/schemas/Microsoft365CalendarEvent"}},"required":["ok","event"]},"Microsoft365CalendarEventBody":{"type":"object","properties":{"subject":{"type":"string","minLength":1,"maxLength":255},"body":{"type":"string","maxLength":20000},"start":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"end":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"timeZone":{"default":"UTC","type":"string","minLength":1,"maxLength":100},"location":{"type":"string","maxLength":255},"attendees":{"maxItems":100,"type":"array","items":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}}},"required":["subject","start","end"]},"Microsoft365DriveFileWriteResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"file":{"$ref":"#/components/schemas/Microsoft365DriveItem"}},"required":["ok","file"]},"Microsoft365DriveFileWriteBody":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":512},"content":{"type":"string","maxLength":200000}},"required":["path","content"]},"Microsoft365TeamsChat":{"type":"object","properties":{"id":{"type":"string"},"topic":{"type":"string"},"chatType":{"type":"string"},"webUrl":{"type":"string"},"lastUpdatedDateTime":{"type":"string"}},"required":["id","topic","chatType","webUrl","lastUpdatedDateTime"]},"Microsoft365TeamsChatsResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"chats":{"type":"array","items":{"$ref":"#/components/schemas/Microsoft365TeamsChat"}}},"required":["ok","chats"]},"Microsoft365TeamsMessage":{"type":"object","properties":{"id":{"type":"string"},"createdDateTime":{"type":"string"},"content":{"type":"string"},"from":{"anyOf":[{"$ref":"#/components/schemas/Microsoft365EmailAddress"},{"type":"null"}]},"webUrl":{"type":"string"}},"required":["id","createdDateTime","content","from","webUrl"]},"Microsoft365TeamsMessagesResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"messages":{"type":"array","items":{"$ref":"#/components/schemas/Microsoft365TeamsMessage"}}},"required":["ok","messages"]},"Microsoft365TeamsMessageResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"message":{"$ref":"#/components/schemas/Microsoft365TeamsMessage"}},"required":["ok","message"]},"Microsoft365TeamsMessageBody":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":20000}},"required":["content"]},"ExternalMcpClientMetadata":{"type":"object","properties":{"client_id":{"type":"string"},"client_name":{"type":"string","const":"OpenWork"},"application_type":{"type":"string","const":"web"},"redirect_uris":{"minItems":1,"maxItems":1,"type":"array","items":{"type":"string"}},"grant_types":{"type":"array","prefixItems":[{"type":"string","const":"authorization_code"},{"type":"string","const":"refresh_token"}]},"response_types":{"type":"array","prefixItems":[{"type":"string","const":"code"}]},"token_endpoint_auth_method":{"type":"string","const":"none"}},"required":["client_id","client_name","application_type","redirect_uris","grant_types","response_types","token_endpoint_auth_method"]},"ExternalMcpRequirementsDiscovery":{"type":"object","properties":{"status":{"type":"string","enum":["ready","manual_action_required","unsupported","unreachable"]},"server":{"type":"object","properties":{"url":{"type":"string"},"protocolVersion":{"type":"string"},"initialize":{"type":"string","enum":["succeeded","authentication_required","failed"]}},"required":["url","initialize"]},"authentication":{"type":"object","properties":{"kind":{"type":"string","enum":["none","oauth","manual_bearer","unknown"]},"resource":{"type":"string"},"protectedResourceMetadataUrl":{"type":"string"},"authorizationServers":{"type":"array","items":{"type":"object","properties":{"issuer":{"type":"string"},"authorizationEndpoint":{"type":"string"},"tokenEndpoint":{"type":"string"},"registrationEndpoint":{"type":"string"},"clientIdMetadataDocumentSupported":{"type":"boolean"},"scopesSupported":{"type":"array","items":{"type":"string"}},"grantTypesSupported":{"type":"array","items":{"type":"string"}},"codeChallengeMethodsSupported":{"type":"array","items":{"type":"string"}},"tokenEndpointAuthMethodsSupported":{"type":"array","items":{"type":"string"}}},"required":["issuer","clientIdMetadataDocumentSupported"]}},"requiredScopes":{"type":"array","items":{"type":"string"}},"recommendedScopes":{"type":"array","items":{"type":"string"}},"refreshSupport":{"type":"string","enum":["supported","not_advertised","unknown"]},"availableRegistrationMethods":{"type":"array","items":{"type":"string","enum":["pre_registered","client_metadata","dynamic"]}},"recommendedRegistrationMethod":{"type":"string","enum":["client_metadata","dynamic","pre_registered"]}},"required":["kind","authorizationServers","requiredScopes","recommendedScopes","refreshSupport","availableRegistrationMethods","recommendedRegistrationMethod"]},"tools":{"type":"object","properties":{"visibility":{"type":"string","enum":["available_without_auth","requires_auth","unavailable"]},"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"readOnlyHint":{"type":"boolean"},"destructiveHint":{"type":"boolean"},"openWorldHint":{"type":"boolean"}},"required":["name"]}}},"required":["visibility"]},"manualRequirements":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"reason":{"type":"string"},"required":{"type":"boolean"}},"required":["code","label","reason","required"]}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}}},"required":["status","server","authentication","tools","manualRequirements","warnings"]},"ExternalMcpRequirementsDiscoveryFailedError":{"type":"object","properties":{"error":{"type":"string","const":"requirements_discovery_failed"},"message":{"type":"string"}},"required":["error","message"]},"ExternalMcpRequirementsDiscoveryInput":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"}},"required":["url"]},"ExternalMcpIssuerReviewResponse":{"type":"object","properties":{"currentIssuer":{"anyOf":[{"type":"string"},{"type":"null"}]},"advertisedIssuers":{"type":"array","items":{"type":"string"}},"reviewRequired":{"type":"boolean"},"issuerChanged":{"type":"boolean"},"reconnectionRequired":{"type":"boolean"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["currentIssuer","advertisedIssuers","reviewRequired"]},"ExternalMcpConnectionNotFoundError":{"type":"object","properties":{"error":{"type":"string","const":"connection_not_found"},"message":{"type":"string"}},"required":["error","message"]},"ExternalMcpConnectionConflictError":{"type":"object","properties":{"error":{"type":"string","const":"connection_conflict"},"message":{"type":"string"}},"required":["error","message"]},"ExternalMcpIssuerReviewInput":{"oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"preview"}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"confirm"},"expectedUpdatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"authorizationServerIssuer":{"type":"string","format":"uri"}},"required":["action","expectedUpdatedAt","authorizationServerIssuer"]}]},"ExternalMcpPresetResponse":{"type":"object","properties":{"presetId":{"type":"string"},"displayName":{"type":"string"},"description":{"type":"string"},"url":{"type":"string"},"authType":{"type":"string","enum":["oauth","apikey","none"]},"requiresOAuthClient":{"type":"boolean"},"authorizationServerIssuer":{"type":"string","format":"uri"},"defaultOAuthScopes":{"type":"array","items":{"type":"string"}}},"required":["presetId","displayName","description","url","authType"]},"ExternalMcpPresetListResponse":{"type":"object","properties":{"presets":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMcpPresetResponse"}}},"required":["presets"]},"ExternalMcpResolveResult":{"type":"object","properties":{"resolution":{"type":"string","enum":["preset","discovered","not_found"]},"attempted":{"type":"array","items":{"type":"string"}},"reason":{"type":"string"},"preset":{"$ref":"#/components/schemas/ExternalMcpPresetResponse"},"match":{"type":"object","properties":{"url":{"type":"string"},"suggestedName":{"type":"string"},"discovery":{"$ref":"#/components/schemas/ExternalMcpRequirementsDiscovery"}},"required":["url","suggestedName","discovery"]}},"required":["resolution","attempted"]},"ExternalMcpResolveInput":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":200}},"required":["query"]},"ExternalMcpConnectionRequiredBy":{"type":"object","properties":{"pluginId":{"type":"string"},"name":{"type":"string"}},"required":["pluginId","name"]},"ExternalMcpConnectionAccessSummary":{"type":"object","properties":{"orgWide":{"type":"boolean"},"memberIds":{"type":"array","items":{"type":"string"}},"teamIds":{"type":"array","items":{"type":"string"}}},"required":["orgWide","memberIds","teamIds"]},"ExternalMcpConnectionResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"authType":{"type":"string","enum":["oauth","apikey","none"]},"credentialMode":{"type":"string","enum":["shared","per_member"]},"connected":{"type":"boolean"},"connectedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"connectedForMe":{"type":"boolean"},"needsReconnect":{"type":"boolean"},"credentialHealth":{"type":"string","enum":["unknown","ready","reconnect_required"]},"credentialHealthReason":{"anyOf":[{"type":"string","enum":["authorization_rejected","credential_expired","post_authorization_validation_failed"]},{"type":"null"}]},"credentialHealthCheckedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"issuerReviewRequired":{"type":"boolean"},"reconnectActionOwner":{"anyOf":[{"type":"string","enum":["member","organization_admin"]},{"type":"null"}]},"missingFeatures":{"type":"array","items":{"type":"string"}},"externalAccountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"grantedScopes":{"type":"array","items":{"type":"string"}},"tenantId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredBy":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMcpConnectionRequiredBy"}},"identityManagedBy":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMcpConnectionRequiredBy"}},"requiredAuthType":{"anyOf":[{"type":"string","enum":["oauth","apikey","none"]},{"type":"null"}]},"authPolicyConfirmed":{"type":"boolean"},"authTypeMismatch":{"type":"boolean"},"oauthClientConfigured":{"type":"boolean"},"oauthClientRequired":{"type":"boolean"},"setupRequired":{"type":"boolean"},"access":{"anyOf":[{"$ref":"#/components/schemas/ExternalMcpConnectionAccessSummary"},{"type":"null"}]},"oauthClientId":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthCallbackUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthSharedCallbackUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthClientMetadataUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthCallbackMode":{"anyOf":[{"type":"string","enum":["shared-v1","isolated-v1","legacy-v1"]},{"type":"null"}]},"oauthRegistrationSource":{"anyOf":[{"type":"string","enum":["pre-registered","client-metadata","dynamic"]},{"type":"null"}]},"authorizationServerIssuer":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestedScopes":{"type":"array","items":{"type":"string"}}},"required":["id","name","url","authType","credentialMode","connected","connectedAt","connectedForMe","requiredBy","access"]},"ExternalMcpConnectionListResponse":{"type":"object","properties":{"connections":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMcpConnectionResponse"}}},"required":["connections"]},"ExternalMcpConnectionToolPolicy":{"type":"object","properties":{"allDisabled":{"type":"boolean"},"disabledTools":{"type":"array","items":{"type":"string"}},"updatedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["allDisabled","disabledTools","updatedBy","updatedAt"]},"ExternalMcpConnectionToolPolicyResponse":{"type":"object","properties":{"policy":{"$ref":"#/components/schemas/ExternalMcpConnectionToolPolicy"}},"required":["policy"]},"ExternalMcpConnectionToolPolicyInput":{"type":"object","properties":{"allDisabled":{"type":"boolean"},"disabledTools":{"maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}}},"required":["allDisabled","disabledTools"]},"ExternalMcpConnectionToolAnnotations":{"type":"object","properties":{"title":{"type":"string"},"readOnlyHint":{"type":"boolean"},"destructiveHint":{"type":"boolean"},"idempotentHint":{"type":"boolean"},"openWorldHint":{"type":"boolean"}}},"ExternalMcpConnectionTool":{"type":"object","properties":{"name":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"inputSchema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"outputSchema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"annotations":{"$ref":"#/components/schemas/ExternalMcpConnectionToolAnnotations"}},"required":["name","inputSchema"]},"ExternalMcpConnectionToolListResponse":{"type":"object","properties":{"tools":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMcpConnectionTool"}},"policy":{"$ref":"#/components/schemas/ExternalMcpConnectionToolPolicy"}},"required":["tools","policy"]},"ExternalMcpConnectionNotReadyError":{"type":"object","properties":{"error":{"type":"string","const":"connection_not_ready"},"message":{"type":"string"}},"required":["error","message"]},"ExternalMcpDiagnostic":{"type":"object","properties":{"referenceId":{"type":"string"},"phase":{"type":"string","enum":["CONFIGURATION","NETWORK_DNS","NETWORK_TCP","NETWORK_TLS","HTTP_ROUTING","AUTH_RESOURCE_DISCOVERY","AUTH_ISSUER_DISCOVERY","AUTH_CLIENT_REGISTRATION","AUTH_USER_OR_WORKLOAD","AUTH_TOKEN_ACQUISITION","AUTH_RESOURCE_VALIDATION","MCP_TRANSPORT","MCP_VERSION","MCP_INITIALIZE","MCP_INITIALIZED","MCP_TOOL_DISCOVERY","MCP_TOOL_EXECUTION","PROVIDER_AUTHORIZATION","PROVIDER_EXECUTION","CONTINUITY_REFRESH","CONTINUITY_SESSION","SHUTDOWN"]},"category":{"type":"string"},"code":{"type":"string"},"highestPassed":{"type":"string","enum":["configured","reachable","authorized","protocol_ready","catalog_ready","operation_ready"]},"retryable":{"type":"boolean"},"actionOwner":{"type":"string","enum":["openwork","network_admin","provider_admin","organization_admin","member"]},"operatorAction":{"type":"string"},"message":{"type":"string"},"httpStatus":{"type":"integer","minimum":100,"maximum":599},"operationPhase":{"type":"string","enum":["CONFIGURATION","NETWORK_DNS","NETWORK_TCP","NETWORK_TLS","HTTP_ROUTING","AUTH_RESOURCE_DISCOVERY","AUTH_ISSUER_DISCOVERY","AUTH_CLIENT_REGISTRATION","AUTH_USER_OR_WORKLOAD","AUTH_TOKEN_ACQUISITION","AUTH_RESOURCE_VALIDATION","MCP_TRANSPORT","MCP_VERSION","MCP_INITIALIZE","MCP_INITIALIZED","MCP_TOOL_DISCOVERY","MCP_TOOL_EXECUTION","PROVIDER_AUTHORIZATION","PROVIDER_EXECUTION","CONTINUITY_REFRESH","CONTINUITY_SESSION","SHUTDOWN"]},"outbound":{"type":"object","properties":{"origin":{"type":"string"},"pathHash":{"type":"string"}},"required":["origin","pathHash"]},"providerRequestId":{"type":"string"},"providerStatus":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"providerCode":{"type":"string"},"payloadBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"jsonRpcCode":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"connectUrl":{"type":"string","format":"uri"}},"required":["referenceId","phase","category","code","highestPassed","retryable","actionOwner","operatorAction","message"]},"ExternalMcpConnectionToolListFailedError":{"type":"object","properties":{"error":{"type":"string","const":"tool_catalog_failed"},"message":{"type":"string"},"diagnostic":{"$ref":"#/components/schemas/ExternalMcpDiagnostic"}},"required":["error","message","diagnostic"]},"ExternalMcpConnectionMcpApp":{"type":"object","properties":{"serverName":{"type":"string"},"connectionId":{"type":"string"},"toolName":{"type":"string"},"projectedToolName":{"type":"string"},"resourceUri":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiresInput":{"type":"boolean"},"requiresApproval":{"type":"boolean"}},"required":["serverName","connectionId","toolName","projectedToolName","resourceUri","title","description","requiresInput","requiresApproval"]},"ExternalMcpConnectionMcpAppListResponse":{"type":"object","properties":{"apps":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMcpConnectionMcpApp"}}},"required":["apps"]},"ExternalMcpConnectionToolInspectionHeader":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"},"redacted":{"type":"boolean"}},"required":["name","value","redacted"]},"ExternalMcpConnectionToolInspectionBody":{"type":"object","properties":{"text":{"type":"string"},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"truncated":{"type":"boolean"},"unavailable":{"type":"boolean"}},"required":["text","bytes","truncated"]},"ExternalMcpConnectionToolInspectionRequest":{"type":"object","properties":{"method":{"type":"string"},"url":{"type":"string"},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"headers":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMcpConnectionToolInspectionHeader"}},"body":{"$ref":"#/components/schemas/ExternalMcpConnectionToolInspectionBody"}},"required":["method","url","startedAt","headers","body"]},"ExternalMcpConnectionToolInspectionResponse":{"type":"object","properties":{"status":{"type":"integer","minimum":100,"maximum":599},"statusText":{"type":"string"},"durationMs":{"type":"number","minimum":0},"headers":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMcpConnectionToolInspectionHeader"}},"body":{"$ref":"#/components/schemas/ExternalMcpConnectionToolInspectionBody"}},"required":["status","statusText","durationMs","headers","body"]},"ExternalMcpConnectionToolInspectionDiagnosis":{"type":"object","properties":{"status":{"type":"string","enum":["succeeded","failed"]},"layer":{"type":"string","enum":["openwork","network","mcp_connection","remote_http","mcp_tool"]},"summary":{"type":"string"}},"required":["status","layer","summary"]},"ExternalMcpConnectionToolInspection":{"type":"object","properties":{"request":{"$ref":"#/components/schemas/ExternalMcpConnectionToolInspectionRequest"},"response":{"$ref":"#/components/schemas/ExternalMcpConnectionToolInspectionResponse"},"diagnosis":{"$ref":"#/components/schemas/ExternalMcpConnectionToolInspectionDiagnosis"}},"required":["diagnosis"]},"ExternalMcpConnectionToolRunResponse":{"type":"object","properties":{"referenceId":{"type":"string"},"durationMs":{"type":"number","minimum":0},"result":{},"inspection":{"$ref":"#/components/schemas/ExternalMcpConnectionToolInspection"}},"required":["referenceId","durationMs","result","inspection"]},"ExternalMcpConnectionToolPolicyBlockedError":{"type":"object","properties":{"error":{"type":"string","const":"policy_blocked"},"message":{"type":"string"},"disabledBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"disabledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["error","message","disabledBy","disabledAt"]},"ExternalMcpConnectionToolRunForbiddenError":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/ExternalMcpConnectionToolPolicyBlockedError"}]},"ExternalMcpConnectionToolRequestTooLargeError":{"type":"object","properties":{"error":{"type":"string","const":"payload_too_large"},"message":{"type":"string"}},"required":["error","message"]},"ExternalMcpConnectionToolRunFailedError":{"type":"object","properties":{"error":{"type":"string","const":"tool_execution_failed"},"message":{"type":"string"},"diagnostic":{"$ref":"#/components/schemas/ExternalMcpDiagnostic"},"inspection":{"$ref":"#/components/schemas/ExternalMcpConnectionToolInspection"}},"required":["error","message","diagnostic","inspection"]},"ExternalMcpConnectionToolRunInput":{"type":"object","properties":{"toolName":{"type":"string","minLength":1,"maxLength":255},"arguments":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["toolName","arguments"]},"ExternalMcpConnectionCreatedResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"authType":{"type":"string","enum":["oauth","apikey","none"]},"credentialMode":{"type":"string","enum":["shared","per_member"]},"connected":{"type":"boolean"},"connectedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"connectedForMe":{"type":"boolean"},"needsReconnect":{"type":"boolean"},"credentialHealth":{"type":"string","enum":["unknown","ready","reconnect_required"]},"credentialHealthReason":{"anyOf":[{"type":"string","enum":["authorization_rejected","credential_expired","post_authorization_validation_failed"]},{"type":"null"}]},"credentialHealthCheckedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"issuerReviewRequired":{"type":"boolean"},"reconnectActionOwner":{"anyOf":[{"type":"string","enum":["member","organization_admin"]},{"type":"null"}]},"missingFeatures":{"type":"array","items":{"type":"string"}},"externalAccountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"grantedScopes":{"type":"array","items":{"type":"string"}},"tenantId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredBy":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMcpConnectionRequiredBy"}},"identityManagedBy":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMcpConnectionRequiredBy"}},"requiredAuthType":{"anyOf":[{"type":"string","enum":["oauth","apikey","none"]},{"type":"null"}]},"authPolicyConfirmed":{"type":"boolean"},"authTypeMismatch":{"type":"boolean"},"oauthClientConfigured":{"type":"boolean"},"oauthClientRequired":{"type":"boolean"},"setupRequired":{"type":"boolean"},"access":{"anyOf":[{"$ref":"#/components/schemas/ExternalMcpConnectionAccessSummary"},{"type":"null"}]},"oauthClientId":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthCallbackUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthSharedCallbackUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthClientMetadataUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthCallbackMode":{"anyOf":[{"type":"string","enum":["shared-v1","isolated-v1","legacy-v1"]},{"type":"null"}]},"oauthRegistrationSource":{"anyOf":[{"type":"string","enum":["pre-registered","client-metadata","dynamic"]},{"type":"null"}]},"authorizationServerIssuer":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestedScopes":{"type":"array","items":{"type":"string"}},"links":{"type":"object","properties":{"yourConnections":{"type":"string"},"oauthCallback":{"type":"string"}},"required":["yourConnections","oauthCallback"]}},"required":["id","name","url","authType","credentialMode","connected","connectedAt","connectedForMe","requiredBy","access","links"]},"ExternalMcpConnectionValidationFailedError":{"type":"object","properties":{"error":{"type":"string","const":"connection_validation_failed"},"message":{"type":"string"},"diagnostic":{"$ref":"#/components/schemas/ExternalMcpDiagnostic"}},"required":["error","message","diagnostic"]},"ExternalMcpConnectionAccessInput":{"type":"object","properties":{"orgWide":{"default":false,"type":"boolean"},"memberIds":{"default":[],"maxItems":200,"type":"array","items":{"type":"string","minLength":1}},"teamIds":{"default":[],"maxItems":200,"type":"array","items":{"type":"string","minLength":1}}}},"ExternalMcpConnectionUpdatedResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"authType":{"type":"string","enum":["oauth","apikey","none"]},"credentialMode":{"type":"string","enum":["shared","per_member"]},"connected":{"type":"boolean"},"connectedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"connectedForMe":{"type":"boolean"},"needsReconnect":{"type":"boolean"},"credentialHealth":{"type":"string","enum":["unknown","ready","reconnect_required"]},"credentialHealthReason":{"anyOf":[{"type":"string","enum":["authorization_rejected","credential_expired","post_authorization_validation_failed"]},{"type":"null"}]},"credentialHealthCheckedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"issuerReviewRequired":{"type":"boolean"},"reconnectActionOwner":{"anyOf":[{"type":"string","enum":["member","organization_admin"]},{"type":"null"}]},"missingFeatures":{"type":"array","items":{"type":"string"}},"externalAccountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"grantedScopes":{"type":"array","items":{"type":"string"}},"tenantId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredBy":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMcpConnectionRequiredBy"}},"identityManagedBy":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMcpConnectionRequiredBy"}},"requiredAuthType":{"anyOf":[{"type":"string","enum":["oauth","apikey","none"]},{"type":"null"}]},"authPolicyConfirmed":{"type":"boolean"},"authTypeMismatch":{"type":"boolean"},"oauthClientConfigured":{"type":"boolean"},"oauthClientRequired":{"type":"boolean"},"setupRequired":{"type":"boolean"},"access":{"anyOf":[{"$ref":"#/components/schemas/ExternalMcpConnectionAccessSummary"},{"type":"null"}]},"oauthClientId":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthCallbackUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthSharedCallbackUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthClientMetadataUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthCallbackMode":{"anyOf":[{"type":"string","enum":["shared-v1","isolated-v1","legacy-v1"]},{"type":"null"}]},"oauthRegistrationSource":{"anyOf":[{"type":"string","enum":["pre-registered","client-metadata","dynamic"]},{"type":"null"}]},"authorizationServerIssuer":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestedScopes":{"type":"array","items":{"type":"string"}},"identityChanged":{"type":"boolean"},"reconnectionRequired":{"type":"boolean"}},"required":["id","name","url","authType","credentialMode","connected","connectedAt","updatedAt","connectedForMe","requiredBy","identityManagedBy","access","identityChanged","reconnectionRequired"]},"ExternalMcpConnectionMarketplaceManagedError":{"type":"object","properties":{"error":{"type":"string","const":"marketplace_managed"},"message":{"type":"string"}},"required":["error","message"]},"ExternalMcpConnectionUpdateConflictError":{"anyOf":[{"$ref":"#/components/schemas/ExternalMcpConnectionConflictError"},{"$ref":"#/components/schemas/ExternalMcpConnectionMarketplaceManagedError"}]},"ExternalMcpConnectStartResponse":{"type":"object","properties":{"status":{"type":"string","enum":["connected","needs_auth"]},"authorizeUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","authorizeUrl"]},"ExternalMcpOAuthConfigurationRequiredError":{"type":"object","properties":{"error":{"type":"string","const":"mcp_oauth_configuration_required"},"message":{"type":"string"},"callbackUrl":{"type":"string"},"clientMetadataUrl":{"type":"string"},"manualRequirements":{"type":"array","items":{"type":"string"}}},"required":["error","message","callbackUrl","clientMetadataUrl","manualRequirements"]},"ExternalMcpOAuthIssuerMismatchError":{"type":"object","properties":{"error":{"type":"string","const":"mcp_oauth_issuer_mismatch"},"message":{"type":"string"}},"required":["error","message"]},"ExternalMcpConnectStartConflictError":{"anyOf":[{"$ref":"#/components/schemas/ExternalMcpOAuthConfigurationRequiredError"},{"$ref":"#/components/schemas/ExternalMcpOAuthIssuerMismatchError"}]},"ExternalMcpConnectStartFailedError":{"type":"object","properties":{"error":{"type":"string","const":"oauth_handshake_failed"},"message":{"type":"string"},"diagnostic":{"$ref":"#/components/schemas/ExternalMcpDiagnostic"}},"required":["error","message","diagnostic"]},"PluginArchGithubInstallStartResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"redirectUrl":{"type":"string","format":"uri"},"state":{"type":"string","minLength":1}},"required":["redirectUrl","state"]}},"required":["ok","item"]},"PluginArchConnectorAccount":{"type":"object","properties":{"id":{"description":"Den TypeID with 'cac_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"organizationId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"connectorType":{"type":"string","enum":["github"]},"remoteId":{"type":"string","minLength":1,"maxLength":255},"externalAccountRef":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"displayName":{"type":"string","minLength":1,"maxLength":255},"status":{"type":"string","enum":["active","inactive","disconnected","error"]},"createdByName":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"createdByOrgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"metadata":{"type":"object","properties":{},"additionalProperties":{}}},"required":["id","organizationId","connectorType","remoteId","externalAccountRef","displayName","status","createdByOrgMembershipId","createdAt","updatedAt"]},"PluginArchGithubRepository":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"fullName":{"type":"string","minLength":1},"defaultBranch":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"hasPluginManifest":{"type":"boolean"},"manifestKind":{"anyOf":[{"type":"string","enum":["agent-plugin","marketplace","plugin"]},{"type":"null"}]},"marketplacePluginCount":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"private":{"type":"boolean"}},"required":["id","fullName","defaultBranch","private"]},"PluginArchGithubInstallCompleteResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"connectorAccount":{"$ref":"#/components/schemas/PluginArchConnectorAccount"},"repositories":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchGithubRepository"}}},"required":["connectorAccount","repositories"]}},"required":["ok","item"]},"PluginArchConfigObjectVersion":{"type":"object","properties":{"id":{"description":"Den TypeID with 'cov_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"configObjectId":{"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"schemaVersion":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"normalizedPayloadJson":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{}},{"type":"null"}]},"rawSourceText":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdVia":{"type":"string","enum":["cloud","import","connector","system"]},"createdByOrgMembershipId":{"anyOf":[{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29},{"type":"null"}]},"connectorSyncEventId":{"anyOf":[{"description":"Den TypeID with 'cse_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},{"type":"null"}]},"sourceRevisionRef":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"isDeletedVersion":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","configObjectId","schemaVersion","normalizedPayloadJson","rawSourceText","createdVia","createdByOrgMembershipId","connectorSyncEventId","sourceRevisionRef","isDeletedVersion","createdAt"]},"PluginArchConfigObject":{"type":"object","properties":{"id":{"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"organizationId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"objectType":{"type":"string","enum":["skill","agent","command","tool","mcp","hook","context","custom","script","workflow","app"]},"sourceMode":{"type":"string","enum":["cloud","import","connector"]},"title":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"searchText":{"anyOf":[{"type":"string","minLength":1,"maxLength":65535},{"type":"null"}]},"currentFileName":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"currentFileExtension":{"anyOf":[{"type":"string","minLength":1,"maxLength":32},{"type":"null"}]},"currentRelativePath":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive","deleted","archived","ingestion_error"]},"createdByOrgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29},"connectorInstanceId":{"anyOf":[{"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"deletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"latestVersion":{"anyOf":[{"$ref":"#/components/schemas/PluginArchConfigObjectVersion"},{"type":"null"}]}},"required":["id","organizationId","objectType","sourceMode","title","description","searchText","currentFileName","currentFileExtension","currentRelativePath","status","createdByOrgMembershipId","connectorInstanceId","createdAt","updatedAt","deletedAt","latestVersion"]},"PluginArchConfigObjectListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchConfigObject"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchConfigObjectMutationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"$ref":"#/components/schemas/PluginArchConfigObject"}},"required":["ok","item"]},"PluginArchConfigObjectDetailResponse":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/PluginArchConfigObject"}},"required":["item"]},"PluginArchConfigObjectVersionListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchConfigObjectVersion"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchConfigObjectVersionDetailResponse":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/PluginArchConfigObjectVersion"}},"required":["item"]},"PluginArchPluginMembership":{"type":"object","properties":{"id":{"description":"Den TypeID with 'pco_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"pluginId":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"configObjectId":{"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"membershipSource":{"type":"string","enum":["manual","connector","api","system"]},"connectorMappingId":{"anyOf":[{"description":"Den TypeID with 'cmp_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},{"type":"null"}]},"createdByOrgMembershipId":{"anyOf":[{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"removedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"configObject":{"$ref":"#/components/schemas/PluginArchConfigObject"}},"required":["id","pluginId","configObjectId","membershipSource","connectorMappingId","createdByOrgMembershipId","createdAt","removedAt"]},"PluginArchPluginMembershipListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchPluginMembership"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchPluginMembershipMutationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"$ref":"#/components/schemas/PluginArchPluginMembership"}},"required":["ok","item"]},"PluginArchAccessGrant":{"type":"object","properties":{"id":{"anyOf":[{"description":"Den TypeID with 'coa_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},{"description":"Den TypeID with 'pag_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},{"description":"Den TypeID with 'mag_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},{"description":"Den TypeID with 'cia_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30}]},"orgMembershipId":{"anyOf":[{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29},{"type":"null"}]},"teamId":{"anyOf":[{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},{"type":"null"}]},"orgWide":{"type":"boolean"},"role":{"type":"string","enum":["viewer","editor","manager"]},"createdByOrgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"removedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["id","orgMembershipId","teamId","orgWide","role","createdByOrgMembershipId","createdAt","removedAt"]},"PluginArchAccessGrantListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchAccessGrant"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchAccessGrantMutationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"$ref":"#/components/schemas/PluginArchAccessGrant"}},"required":["ok","item"]},"OpenWorkExtensionManifest":{"type":"object","properties":{"schemaVersion":{"type":"number","const":1},"id":{"type":"string","minLength":1,"maxLength":255},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","minLength":1,"maxLength":2048},"source":{"type":"object","properties":{"format":{"type":"string","enum":["agent-plugin","openwork-builtin","openwork-extension-manifest","claude-plugin","opencode-plugin","mcp-directory","manual"]},"trusted":{"type":"boolean"},"origin":{"type":"string","enum":["builtin","den","workspace","local"]},"reference":{"type":"string","minLength":1,"maxLength":512}},"required":["format","trusted"]},"resources":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},"contributions":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},"setup":{"type":"object","properties":{},"additionalProperties":{}},"lifecycle":{"type":"object","properties":{},"additionalProperties":{}}},"required":["schemaVersion","id","name","description","source","resources"],"additionalProperties":{}},"PluginArchExtensionProjection":{"type":"object","properties":{"id":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"sourceFormat":{"type":"string","enum":["agent-plugin","openwork-builtin","openwork-extension-manifest","claude-plugin","opencode-plugin","mcp-directory","manual"]},"manifest":{"anyOf":[{"$ref":"#/components/schemas/OpenWorkExtensionManifest"},{"type":"null"}]}},"required":["id","name","description","sourceFormat","manifest"]},"PluginArchPlugin":{"type":"object","properties":{"id":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"organizationId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"sourceRepositoryUrl":{"anyOf":[{"type":"string","minLength":1,"maxLength":1024},{"type":"null"}]},"sourceFormat":{"anyOf":[{"type":"string","enum":["agent-plugin","openwork-builtin","openwork-extension-manifest","claude-plugin","opencode-plugin","mcp-directory","manual"]},{"type":"null"}]},"sourceSchemaVersion":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive","deleted","archived"]},"createdByOrgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"deletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"memberCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"marketplaces":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":255}},"required":["id","name"]}},"extension":{"anyOf":[{"$ref":"#/components/schemas/PluginArchExtensionProjection"},{"type":"null"}]}},"required":["id","organizationId","name","description","sourceRepositoryUrl","sourceFormat","sourceSchemaVersion","status","createdByOrgMembershipId","createdAt","updatedAt","deletedAt"]},"PluginArchPluginListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchPlugin"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchPluginMutationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"$ref":"#/components/schemas/PluginArchPlugin"}},"required":["ok","item"]},"PluginArchPluginDetailResponse":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/PluginArchPlugin"}},"required":["item"]},"PluginArchPluginMcpRequirementConfigureResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"binding":{"type":"object","properties":{"id":{"description":"Den TypeID with 'pmr_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"configObjectId":{"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"externalMcpConnectionId":{"type":"string"},"pluginId":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"serverName":{"type":"string"}},"required":["id","configObjectId","externalMcpConnectionId","pluginId","serverName"]},"connection":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"authType":{"type":"string","enum":["oauth","apikey","none"]},"credentialMode":{"type":"string","enum":["shared","per_member"]},"connected":{"type":"boolean"},"connectedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["id","name","url","authType","credentialMode","connected","connectedAt"]},"links":{"type":"object","properties":{"yourConnections":{"type":"string"}},"required":["yourConnections"]}},"required":["binding","connection","links"]}},"required":["ok","item"]},"GithubPluginMcpImportServer":{"type":"object","properties":{"authType":{"anyOf":[{"type":"string","const":"oauth"},{"type":"null"}]},"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"pluginKey":{"type":"string"},"pluginName":{"type":"string"},"serverKey":{"type":"string"},"skippedReason":{"anyOf":[{"type":"string","enum":["headers_unsupported","invalid_config","invalid_url","local_unsupported","missing_url","unsupported_auth"]},{"type":"null"}]},"sourceSchemaVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourcePath":{"type":"string"},"supported":{"type":"boolean"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["authType","connectionId","name","pluginKey","pluginName","serverKey","skippedReason","sourceSchemaVersion","sourcePath","supported","url"]},"GithubPluginMcpImportPlan":{"type":"object","properties":{"branch":{"type":"string"},"classification":{"type":"string","enum":["agent_plugin_repo","claude_marketplace_repo","claude_multi_plugin_repo","claude_single_plugin_repo","folder_inferred_repo","unsupported"]},"marketplace":{"anyOf":[{"type":"object","properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"owner":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["description","name","owner","version"]},{"type":"null"}]},"plugins":{"type":"array","items":{"type":"object","properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"},"mcpCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"name":{"type":"string"},"skillCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["description","key","mcpCount","name","skillCount"]}},"repositoryFullName":{"type":"string"},"rootPath":{"type":"string"},"servers":{"type":"array","items":{"$ref":"#/components/schemas/GithubPluginMcpImportServer"}},"skills":{"type":"array","items":{"type":"object","properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"pluginKey":{"type":"string"},"pluginName":{"type":"string"},"skillKey":{"type":"string"},"skippedReason":{"anyOf":[{"type":"string","enum":["invalid_skill"]},{"type":"null"}]},"sourceSchemaVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourcePath":{"type":"string"},"supported":{"type":"boolean"}},"required":["description","name","pluginKey","pluginName","skillKey","skippedReason","sourceSchemaVersion","sourcePath","supported"]}},"sourceSchemaVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceRevisionRef":{"type":"string"},"warnings":{"type":"array","items":{"type":"string"}}},"required":["branch","classification","marketplace","plugins","repositoryFullName","rootPath","servers","skills","sourceSchemaVersion","sourceRevisionRef","warnings"]},"GithubPluginMcpImportPreviewResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"$ref":"#/components/schemas/GithubPluginMcpImportPlan"}},"required":["ok","item"]},"GithubPluginMcpImportResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"imported":{"type":"array","items":{"type":"object","properties":{"connectionId":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}},"required":["connectionId","name","url"]}},"importedSkills":{"type":"array","items":{"type":"object","properties":{"configObjectId":{"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"name":{"type":"string"},"sourcePath":{"type":"string"}},"required":["configObjectId","name","sourcePath"]}},"marketplaceId":{"anyOf":[{"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},{"type":"null"}]},"plugin":{"$ref":"#/components/schemas/PluginArchPlugin"},"skipped":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"reason":{"type":"string","enum":["headers_unsupported","invalid_config","invalid_url","local_unsupported","missing_url","unsupported_auth"]}},"required":["name","reason"]}},"skippedSkills":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"reason":{"type":"string","enum":["invalid_skill"]},"sourcePath":{"type":"string"}},"required":["name","reason","sourcePath"]}}},"required":["imported","importedSkills","marketplaceId","plugin","skipped","skippedSkills"]}},"required":["ok","item"]},"PluginArchMePluginAccess":{"type":"object","properties":{"plugin":{"type":"object","properties":{"id":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"componentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"sourceRepositoryUrl":{"anyOf":[{"type":"string","minLength":1,"maxLength":1024},{"type":"null"}]}},"required":["id","name","description","componentCount","sourceRepositoryUrl"]},"edges":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"mine"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"person"},"sharedBy":{"anyOf":[{"type":"object","properties":{"orgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29},"name":{"type":"string","minLength":1,"maxLength":255}},"required":["orgMembershipId","name"]},{"type":"null"}]},"grantedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["kind","sharedBy","grantedAt"]},{"type":"object","properties":{"kind":{"type":"string","const":"team"},"team":{"type":"object","properties":{"id":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":255}},"required":["id","name"]}},"required":["kind","team"]},{"type":"object","properties":{"kind":{"type":"string","const":"org_wide"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"catalog"},"marketplace":{"type":"object","properties":{"id":{"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":255}},"required":["id","name"]}},"required":["kind","marketplace"]}]}},"role":{"type":"string","enum":["viewer","editor","manager"]}},"required":["plugin","edges","role"]},"PluginArchLibraryItem":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"plugin"},"id":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"componentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"componentKinds":{"type":"array","items":{"type":"string"}},"sourceRepositoryUrl":{"anyOf":[{"type":"string","minLength":1,"maxLength":1024},{"type":"null"}]},"edges":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"mine"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"person"},"sharedBy":{"anyOf":[{"type":"object","properties":{"orgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29},"name":{"type":"string","minLength":1,"maxLength":255}},"required":["orgMembershipId","name"]},{"type":"null"}]},"grantedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["kind","sharedBy","grantedAt"]},{"type":"object","properties":{"kind":{"type":"string","const":"team"},"team":{"type":"object","properties":{"id":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":255}},"required":["id","name"]}},"required":["kind","team"]},{"type":"object","properties":{"kind":{"type":"string","const":"org_wide"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"catalog"},"marketplace":{"type":"object","properties":{"id":{"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":255}},"required":["id","name"]}},"required":["kind","marketplace"]}]}},"role":{"type":"string","enum":["viewer","editor","manager"]}},"required":["type","id","name","description","componentCount","componentKinds","sourceRepositoryUrl","edges","role"]},{"type":"object","properties":{"type":{"type":"string","const":"app"},"id":{"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"pluginId":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"sourceUrl":{"type":"string","maxLength":2048,"format":"uri"},"status":{"type":"string","enum":["active","retired"]},"activeVersionId":{"anyOf":[{"description":"Den TypeID with 'cov_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},{"type":"null"}]},"state":{"type":"string","const":"ready"},"edges":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"mine"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"person"},"sharedBy":{"anyOf":[{"type":"object","properties":{"orgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29},"name":{"type":"string","minLength":1,"maxLength":255}},"required":["orgMembershipId","name"]},{"type":"null"}]},"grantedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["kind","sharedBy","grantedAt"]},{"type":"object","properties":{"kind":{"type":"string","const":"team"},"team":{"type":"object","properties":{"id":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":255}},"required":["id","name"]}},"required":["kind","team"]},{"type":"object","properties":{"kind":{"type":"string","const":"org_wide"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"catalog"},"marketplace":{"type":"object","properties":{"id":{"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":255}},"required":["id","name"]}},"required":["kind","marketplace"]}]}},"role":{"type":"string","enum":["viewer","editor","manager"]}},"required":["type","id","pluginId","name","description","sourceUrl","status","activeVersionId","state","edges","role"]},{"type":"object","properties":{"type":{"type":"string","const":"connection"},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"url":{"type":"string"},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"transport":{"type":"string","enum":["mcp","native"]},"provider":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"state":{"type":"string","enum":["connected","needs_signin","needs_admin_setup","available"]},"connectedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"edges":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"mine"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"person"},"sharedBy":{"anyOf":[{"type":"object","properties":{"orgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29},"name":{"type":"string","minLength":1,"maxLength":255}},"required":["orgMembershipId","name"]},{"type":"null"}]},"grantedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["kind","sharedBy","grantedAt"]},{"type":"object","properties":{"kind":{"type":"string","const":"team"},"team":{"type":"object","properties":{"id":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":255}},"required":["id","name"]}},"required":["kind","team"]},{"type":"object","properties":{"kind":{"type":"string","const":"org_wide"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"catalog"},"marketplace":{"type":"object","properties":{"id":{"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":255}},"required":["id","name"]}},"required":["kind","marketplace"]}]}}},"required":["type","id","name","url","description","transport","provider","state","connectedAt","edges"]},{"type":"object","properties":{"type":{"type":"string","const":"workflow"},"id":{"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"plugin":{"anyOf":[{"type":"object","properties":{"id":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":255}},"required":["id","name"]},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"role":{"type":"string","enum":["viewer","editor","manager"]},"edges":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"mine"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"person"},"sharedBy":{"anyOf":[{"type":"object","properties":{"orgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29},"name":{"type":"string","minLength":1,"maxLength":255}},"required":["orgMembershipId","name"]},{"type":"null"}]},"grantedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["kind","sharedBy","grantedAt"]},{"type":"object","properties":{"kind":{"type":"string","const":"team"},"team":{"type":"object","properties":{"id":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":255}},"required":["id","name"]}},"required":["kind","team"]},{"type":"object","properties":{"kind":{"type":"string","const":"org_wide"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"catalog"},"marketplace":{"type":"object","properties":{"id":{"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":255}},"required":["id","name"]}},"required":["kind","marketplace"]}]}},"state":{"type":"string","enum":["ready","needs_signin","needs_admin_setup"]},"resultState":{"type":"string","enum":["never_run","fresh","stale","needs_attention"]},"latestSuccessfulAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"viewState":{"type":"string","enum":["default","custom_active","build_failed","retired"]},"activeViewTitle":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"automationCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["created","installed_template"]},"templateName":{"type":"string","minLength":1,"maxLength":255},"templateVersion":{"type":"string","minLength":1,"maxLength":100}},"required":["kind"]}},"required":["type","id","plugin","name","description","role","edges","state","resultState","latestSuccessfulAt","viewState","activeViewTitle","automationCount","source"]}]},"PluginArchMeLibraryListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchLibraryItem"}}},"required":["items"]},"PluginArchTeamPluginAccess":{"type":"object","properties":{"plugin":{"type":"object","properties":{"id":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":255},"componentCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","name","componentCount"]},"edge":{"type":"string","enum":["direct_team","via_catalog","org_wide"]},"marketplace":{"anyOf":[{"type":"object","properties":{"id":{"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":255}},"required":["id","name"]},{"type":"null"}]},"role":{"type":"string","enum":["viewer","editor","manager"]},"grantedBy":{"anyOf":[{"type":"object","properties":{"orgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29},"name":{"type":"string","minLength":1,"maxLength":255}},"required":["orgMembershipId","name"]},{"type":"null"}]},"grantedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"grantId":{"anyOf":[{"description":"Den TypeID with 'pag_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},{"type":"null"}]}},"required":["plugin","edge","marketplace","role","grantedBy","grantedAt","grantId"]},"PluginArchMarketplace":{"type":"object","properties":{"id":{"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"organizationId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"logoUrl":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive","deleted","archived"]},"createdByOrgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"deletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"pluginCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","organizationId","name","description","logoUrl","status","createdByOrgMembershipId","createdAt","updatedAt","deletedAt"]},"PluginArchMarketplaceListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchMarketplace"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchMarketplaceMutationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"$ref":"#/components/schemas/PluginArchMarketplace"}},"required":["ok","item"]},"PluginArchMarketplaceDetailResponse":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/PluginArchMarketplace"}},"required":["item"]},"PluginArchMarketplaceConflictError":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]},"PluginArchMarketplacePluginMembership":{"type":"object","properties":{"id":{"description":"Den TypeID with 'mkp_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"marketplaceId":{"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"pluginId":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"membershipSource":{"type":"string","enum":["manual","connector","api","system"]},"createdByOrgMembershipId":{"anyOf":[{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"removedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"plugin":{"$ref":"#/components/schemas/PluginArchPlugin"}},"required":["id","marketplaceId","pluginId","membershipSource","createdByOrgMembershipId","createdAt","removedAt"]},"PluginArchMarketplacePluginListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchMarketplacePluginMembership"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchPluginCloudReadiness":{"type":"object","properties":{"state":{"type":"string","enum":["ready","needs_signin","needs_admin_setup","desktop_only","not_synced"]},"hasInstructional":{"type":"boolean"},"connections":{"type":"array","items":{"type":"object","properties":{"authType":{"type":"string","enum":["oauth","apikey","none"]},"authTypeMismatch":{"type":"boolean"},"configObjectId":{"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"serverName":{"type":"string"},"url":{"type":"string"},"credentialMode":{"type":"string","enum":["shared","per_member"]},"connectedForMe":{"type":"boolean"},"oauthClientConfigured":{"type":"boolean"},"oauthClientRequired":{"type":"boolean"},"requiredAuthType":{"type":"string","enum":["oauth","apikey","none"]}},"required":["configObjectId","id","name","serverName","url"]}}},"required":["state","hasInstructional","connections"]},"PluginArchMarketplaceResolvedResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"marketplace":{"type":"object","properties":{"id":{"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"organizationId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"logoUrl":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive","deleted","archived"]},"createdByOrgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"deletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"pluginCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"canDelete":{"type":"boolean"}},"required":["id","organizationId","name","description","logoUrl","status","createdByOrgMembershipId","createdAt","updatedAt","deletedAt","canDelete"]},"plugins":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"organizationId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"sourceRepositoryUrl":{"anyOf":[{"type":"string","minLength":1,"maxLength":1024},{"type":"null"}]},"sourceFormat":{"anyOf":[{"type":"string","enum":["agent-plugin","openwork-builtin","openwork-extension-manifest","claude-plugin","opencode-plugin","mcp-directory","manual"]},{"type":"null"}]},"sourceSchemaVersion":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive","deleted","archived"]},"createdByOrgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"deletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"memberCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"marketplaces":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":255}},"required":["id","name"]}},"extension":{"anyOf":[{"$ref":"#/components/schemas/PluginArchExtensionProjection"},{"type":"null"}]},"componentCounts":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991}},"cloudReadiness":{"$ref":"#/components/schemas/PluginArchPluginCloudReadiness"}},"required":["id","organizationId","name","description","sourceRepositoryUrl","sourceFormat","sourceSchemaVersion","status","createdByOrgMembershipId","createdAt","updatedAt","deletedAt"]}},"source":{"anyOf":[{"type":"object","properties":{"connectorAccountId":{"description":"Den TypeID with 'cac_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"connectorInstanceId":{"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"accountLogin":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"repositoryFullName":{"type":"string","minLength":1},"branch":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["connectorAccountId","connectorInstanceId","accountLogin","repositoryFullName","branch"]},{"type":"null"}]}},"required":["marketplace","plugins","source"]}},"required":["ok","item"]},"PluginArchMarketplacePluginMutationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"$ref":"#/components/schemas/PluginArchMarketplacePluginMembership"}},"required":["ok","item"]},"PluginArchConnectorAccountListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchConnectorAccount"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchConnectorAccountMutationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"$ref":"#/components/schemas/PluginArchConnectorAccount"}},"required":["ok","item"]},"PluginArchConnectorAccountDetailResponse":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/PluginArchConnectorAccount"}},"required":["item"]},"PluginArchConnectorAccountDisconnectResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"deletedConfigObjectCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"deletedConnectorInstanceCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"deletedConnectorMappingCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"disconnectedAccountId":{"description":"Den TypeID with 'cac_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["deletedConfigObjectCount","deletedConnectorInstanceCount","deletedConnectorMappingCount","disconnectedAccountId","reason"]}},"required":["ok","item"]},"PluginArchConnectorInstance":{"type":"object","properties":{"id":{"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"organizationId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"connectorAccountId":{"description":"Den TypeID with 'cac_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"connectorType":{"type":"string","enum":["github"]},"remoteId":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":255},"status":{"type":"string","enum":["active","disabled","archived","error"]},"instanceConfigJson":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{}},{"type":"null"}]},"lastSyncedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastSyncStatus":{"anyOf":[{"type":"string","enum":["pending","queued","running","completed","failed","partial","ignored"]},{"type":"null"}]},"lastSyncCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"createdByOrgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","organizationId","connectorAccountId","connectorType","remoteId","name","status","instanceConfigJson","lastSyncedAt","lastSyncStatus","lastSyncCursor","createdByOrgMembershipId","createdAt","updatedAt"]},"PluginArchConnectorInstanceListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchConnectorInstance"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchConnectorInstanceMutationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"$ref":"#/components/schemas/PluginArchConnectorInstance"}},"required":["ok","item"]},"PluginArchConnectorInstanceDetailResponse":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/PluginArchConnectorInstance"}},"required":["item"]},"PluginArchConnectorInstanceConfiguredPlugin":{"type":"object","properties":{"id":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"organizationId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"sourceRepositoryUrl":{"anyOf":[{"type":"string","minLength":1,"maxLength":1024},{"type":"null"}]},"sourceFormat":{"anyOf":[{"type":"string","enum":["agent-plugin","openwork-builtin","openwork-extension-manifest","claude-plugin","opencode-plugin","mcp-directory","manual"]},{"type":"null"}]},"sourceSchemaVersion":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive","deleted","archived"]},"createdByOrgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"deletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"memberCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"marketplaces":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":255}},"required":["id","name"]}},"extension":{"anyOf":[{"$ref":"#/components/schemas/PluginArchExtensionProjection"},{"type":"null"}]},"componentCounts":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991}},"rootPath":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","name","description","sourceRepositoryUrl","sourceFormat","sourceSchemaVersion","status","createdByOrgMembershipId","createdAt","updatedAt","deletedAt","rootPath"]},"PluginArchConnectorInstanceConfigurationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"autoImportNewPlugins":{"type":"boolean"},"configuredPlugins":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchConnectorInstanceConfiguredPlugin"}},"connectorInstance":{"$ref":"#/components/schemas/PluginArchConnectorInstance"},"importedConfigObjectCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"mappingCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["autoImportNewPlugins","configuredPlugins","connectorInstance","importedConfigObjectCount","mappingCount"]}},"required":["ok","item"]},"PluginArchConnectorInstanceRemoveResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"deletedConfigObjectCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"deletedConnectorMappingCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"removedConnectorInstanceId":{"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30}},"required":["deletedConfigObjectCount","deletedConnectorMappingCount","removedConnectorInstanceId"]}},"required":["ok","item"]},"PluginArchConnectorInstanceSyncNowResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"enqueuedCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["enqueuedCount"]}},"required":["ok","item"]},"PluginArchConnectorTarget":{"type":"object","properties":{"id":{"description":"Den TypeID with 'ctg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"connectorInstanceId":{"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"connectorType":{"type":"string","enum":["github"]},"remoteId":{"type":"string","minLength":1,"maxLength":255},"targetKind":{"type":"string","enum":["repository_branch"]},"externalTargetRef":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"targetConfigJson":{"type":"object","properties":{},"additionalProperties":{}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","connectorInstanceId","connectorType","remoteId","targetKind","externalTargetRef","targetConfigJson","createdAt","updatedAt"]},"PluginArchGithubDiscoveredPlugin":{"type":"object","properties":{"key":{"type":"string","minLength":1},"sourceKind":{"type":"string","enum":["agent_plugin_manifest","marketplace_entry","plugin_manifest","standalone_claude","folder_inference"]},"sourceSchemaVersion":{"anyOf":[{"type":"string","enum":["1.0.0","1.1.0"]},{"type":"null"}]},"rootPath":{"type":"string"},"displayName":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"selectedByDefault":{"type":"boolean"},"supported":{"type":"boolean"},"manifestPath":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"warnings":{"type":"array","items":{"type":"string","minLength":1}},"componentKinds":{"type":"array","items":{"type":"string","enum":["skill","command","agent","hook","mcp_server","lsp_server","monitor","settings"]}},"componentPaths":{"type":"object","properties":{"agents":{"type":"array","items":{"type":"string","minLength":1}},"commands":{"type":"array","items":{"type":"string","minLength":1}},"hooks":{"type":"array","items":{"type":"string","minLength":1}},"lspServers":{"type":"array","items":{"type":"string","minLength":1}},"mcpServers":{"type":"array","items":{"type":"string","minLength":1}},"monitors":{"type":"array","items":{"type":"string","minLength":1}},"settings":{"type":"array","items":{"type":"string","minLength":1}},"skills":{"type":"array","items":{"type":"string","minLength":1}}},"required":["agents","commands","hooks","lspServers","mcpServers","monitors","settings","skills"]},"metadata":{"type":"object","properties":{},"additionalProperties":{}}},"required":["key","sourceKind","sourceSchemaVersion","rootPath","displayName","description","selectedByDefault","supported","manifestPath","warnings","componentKinds","componentPaths","metadata"]},"PluginArchGithubDiscoveryStep":{"type":"object","properties":{"id":{"type":"string","enum":["read_repository_structure","check_marketplace_manifest","check_plugin_manifests","prepare_discovered_plugins"]},"label":{"type":"string","minLength":1},"status":{"type":"string","enum":["completed","running","warning"]}},"required":["id","label","status"]},"PluginArchGithubDiscoveryTreeSummary":{"type":"object","properties":{"scannedEntryCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["git-tree-recursive"]},"truncated":{"type":"boolean"}},"required":["scannedEntryCount","strategy","truncated"]},"PluginArchGithubConnectorDiscoveryResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"autoImportNewPlugins":{"type":"boolean"},"classification":{"type":"string","enum":["agent_plugin_repo","claude_marketplace_repo","claude_multi_plugin_repo","claude_single_plugin_repo","folder_inferred_repo","unsupported"]},"connectorInstance":{"$ref":"#/components/schemas/PluginArchConnectorInstance"},"connectorTarget":{"$ref":"#/components/schemas/PluginArchConnectorTarget"},"discoveredPlugins":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchGithubDiscoveredPlugin"}},"repositoryFullName":{"type":"string","minLength":1},"sourceRevisionRef":{"type":"string","minLength":1},"steps":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchGithubDiscoveryStep"}},"treeSummary":{"$ref":"#/components/schemas/PluginArchGithubDiscoveryTreeSummary"},"warnings":{"type":"array","items":{"type":"string","minLength":1}}},"required":["autoImportNewPlugins","classification","connectorInstance","connectorTarget","discoveredPlugins","repositoryFullName","sourceRevisionRef","steps","treeSummary","warnings"]}},"required":["ok","item"]},"PluginArchGithubDiscoveryTreeEntry":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["blob","tree"]},"path":{"type":"string","minLength":1},"sha":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"size":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","kind","path","sha","size"]},"PluginArchGithubDiscoveryTreeResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchGithubDiscoveryTreeEntry"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchConnectorMapping":{"type":"object","properties":{"id":{"description":"Den TypeID with 'cmp_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"connectorInstanceId":{"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"connectorTargetId":{"description":"Den TypeID with 'ctg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"connectorType":{"type":"string","enum":["github"]},"remoteId":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"mappingKind":{"type":"string","enum":["path","api","custom"]},"selector":{"type":"string","minLength":1,"maxLength":255},"objectType":{"type":"string","enum":["skill","agent","command","tool","mcp","hook","context","custom","script","workflow","app"]},"pluginId":{"anyOf":[{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},{"type":"null"}]},"autoAddToPlugin":{"type":"boolean"},"mappingConfigJson":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{}},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","connectorInstanceId","connectorTargetId","connectorType","remoteId","mappingKind","selector","objectType","pluginId","autoAddToPlugin","mappingConfigJson","createdAt","updatedAt"]},"PluginArchGithubDiscoveryApplyResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"autoImportNewPlugins":{"type":"boolean"},"createdMarketplace":{"anyOf":[{"$ref":"#/components/schemas/PluginArchMarketplace"},{"type":"null"}]},"connectorInstance":{"$ref":"#/components/schemas/PluginArchConnectorInstance"},"connectorTarget":{"$ref":"#/components/schemas/PluginArchConnectorTarget"},"createdPlugins":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchPlugin"}},"createdMappings":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchConnectorMapping"}},"materializedConfigObjects":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchConfigObject"}},"sourceRevisionRef":{"type":"string","minLength":1}},"required":["autoImportNewPlugins","connectorInstance","connectorTarget","createdPlugins","createdMappings","materializedConfigObjects","sourceRevisionRef"]}},"required":["ok","item"]},"PluginArchConnectorTargetListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchConnectorTarget"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchConnectorTargetMutationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"$ref":"#/components/schemas/PluginArchConnectorTarget"}},"required":["ok","item"]},"PluginArchConnectorTargetDetailResponse":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/PluginArchConnectorTarget"}},"required":["item"]},"PluginArchConnectorSyncAsyncResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"queued":{"type":"boolean","const":true},"job":{"type":"object","properties":{"id":{"description":"Den TypeID with 'cse_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30}},"required":["id"]}},"required":["ok","queued","job"]},"PluginArchConnectorMappingListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchConnectorMapping"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchConnectorMappingMutationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"$ref":"#/components/schemas/PluginArchConnectorMapping"}},"required":["ok","item"]},"PluginArchConnectorSyncSummary":{"type":"object","properties":{"createdCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"deletedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"skippedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"failedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"failures":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}},"additionalProperties":{}},"PluginArchConnectorSyncEvent":{"type":"object","properties":{"id":{"description":"Den TypeID with 'cse_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"attemptCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"connectorInstanceId":{"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"connectorTargetId":{"anyOf":[{"description":"Den TypeID with 'ctg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},{"type":"null"}]},"connectorType":{"type":"string","enum":["github"]},"remoteId":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"eventType":{"type":"string","enum":["push","installation","installation_repositories","repository","manual_resync"]},"externalEventRef":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"sourceRevisionRef":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"nextAttemptAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"status":{"type":"string","enum":["pending","queued","running","completed","failed","partial","ignored"]},"summaryJson":{"anyOf":[{"$ref":"#/components/schemas/PluginArchConnectorSyncSummary"},{"type":"null"}]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"completedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["id","attemptCount","connectorInstanceId","connectorTargetId","connectorType","remoteId","eventType","externalEventRef","sourceRevisionRef","nextAttemptAt","status","summaryJson","startedAt","completedAt"]},"PluginArchConnectorSyncEventListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchConnectorSyncEvent"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchConnectorSyncEventDetailResponse":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/PluginArchConnectorSyncEvent"}},"required":["item"]},"PluginArchGithubSetupResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"connectorAccount":{"$ref":"#/components/schemas/PluginArchConnectorAccount"},"connectorInstance":{"$ref":"#/components/schemas/PluginArchConnectorInstance"},"connectorTarget":{"$ref":"#/components/schemas/PluginArchConnectorTarget"}},"required":["connectorAccount","connectorInstance","connectorTarget"]}},"required":["ok","item"]},"PluginArchGithubRepositoryListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchGithubRepository"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchGithubValidateTargetResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"branchExists":{"type":"boolean"},"defaultBranch":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"repositoryAccessible":{"type":"boolean"}},"required":["branchExists","defaultBranch","repositoryAccessible"]}},"required":["ok","item"]},"AssignedMarketplaceCapabilitiesResponse":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"configObjectId":{"type":"string"},"marketplaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"objectType":{"type":"string"},"pluginId":{"type":"string"}},"required":["configObjectId","marketplaceId","objectType","pluginId"]}}},"required":["items"]},"ResourceSnapshotResponse":{"type":"object","properties":{"organizationId":{"type":"string"},"orgMemberId":{"type":"string"},"teamIds":{"type":"array","items":{"type":"string"}},"resources":{"type":"object","properties":{"llmProviders":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"marketplaces":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"lastUpdatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"plugins":{"type":"array","items":{"type":"object","properties":{"pluginId":{"type":"string"},"lastUpdatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"configItems":{"type":"array","items":{"type":"object","properties":{"configItemId":{"type":"string"},"lastUpdatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["configItemId","lastUpdatedAt"]}}},"required":["pluginId","lastUpdatedAt","configItems"]}}},"required":["lastUpdatedAt","plugins"]}}},"required":["llmProviders","marketplaces"]}},"required":["organizationId","orgMemberId","teamIds","resources"]},"TeamResponse":{"type":"object","properties":{"team":{"type":"object","properties":{"id":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"organizationId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"memberIds":{"type":"array","items":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29}},"managedByScim":{"type":"boolean"}},"required":["id","organizationId","name","createdAt","updatedAt","memberIds","managedByScim"]}},"required":["team"]},"DenAppVersionResponse":{"type":"object","properties":{"minAppVersion":{"type":"string"},"latestAppVersion":{"type":"string","minLength":1},"publishedDesktopVersions":{"type":"array","items":{"type":"string","minLength":1}},"webUrl":{"type":"string","minLength":1}},"required":["minAppVersion","latestAppVersion","publishedDesktopVersions"]},"PluginArchGithubWebhookIgnoredResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"accepted":{"type":"boolean","const":false},"reason":{"type":"string","minLength":1}},"required":["ok","accepted","reason"]},"PluginArchGithubWebhookAcceptedResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"accepted":{"type":"boolean","const":true},"event":{"type":"string","enum":["push","installation","installation_repositories","repository"]},"deliveryId":{"type":"string","minLength":1},"queued":{"type":"boolean"}},"required":["ok","accepted","event","deliveryId","queued"]},"PluginArchGithubWebhookUnauthorizedResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","const":"invalid signature"}},"required":["ok","error"]},"StripeWebhookResponse":{"type":"object","properties":{"received":{"type":"boolean","const":true},"type":{"type":"string"}},"required":["received","type"]},"WorkerHeartbeatResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"workerId":{"type":"string"},"isActiveRecently":{"type":"boolean"},"openSessionCount":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"lastHeartbeatAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"lastActiveAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["ok","workerId","isActiveRecently","openSessionCount","lastHeartbeatAt","lastActiveAt"]},"WorkerBillingRetiredError":{"type":"object","properties":{"error":{"type":"string","const":"worker_billing_retired"},"message":{"type":"string"}},"required":["error","message"]},"WorkerInstance":{"anyOf":[{"type":"object","properties":{"provider":{"type":"string"},"region":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["provider","region","url","status","createdAt","updatedAt"]},{"type":"null"}]},"WorkerListResponse":{"type":"object","properties":{"workers":{"type":"array","items":{"type":"object","properties":{"instance":{"$ref":"#/components/schemas/WorkerInstance"},"id":{"description":"Den TypeID with 'wrk_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"orgId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"createdByUserId":{"anyOf":[{"description":"Den TypeID with 'usr_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},{"type":"null"}]},"isMine":{"type":"boolean"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"destination":{"type":"string"},"status":{"type":"string"},"imageVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspacePath":{"anyOf":[{"type":"string"},{"type":"null"}]},"sandboxBackend":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastHeartbeatAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"lastActiveAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["instance","id","orgId","createdByUserId","isMine","name","description","destination","status","imageVersion","workspacePath","sandboxBackend","lastHeartbeatAt","lastActiveAt","createdAt","updatedAt"]}}},"required":["workers"]},"Worker":{"type":"object","properties":{"id":{"description":"Den TypeID with 'wrk_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"orgId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"createdByUserId":{"anyOf":[{"description":"Den TypeID with 'usr_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},{"type":"null"}]},"isMine":{"type":"boolean"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"destination":{"type":"string"},"status":{"type":"string"},"imageVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspacePath":{"anyOf":[{"type":"string"},{"type":"null"}]},"sandboxBackend":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastHeartbeatAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"lastActiveAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","orgId","createdByUserId","isMine","name","description","destination","status","imageVersion","workspacePath","sandboxBackend","lastHeartbeatAt","lastActiveAt","createdAt","updatedAt"]},"WorkerCreateResponse":{"type":"object","properties":{"worker":{"$ref":"#/components/schemas/Worker"},"tokens":{"type":"object","properties":{"owner":{"type":"string"},"host":{"type":"string"},"client":{"type":"string"}},"required":["owner","host","client"]},"instance":{"$ref":"#/components/schemas/WorkerInstance"},"launch":{"type":"object","properties":{"mode":{"type":"string"},"pollAfterMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["mode","pollAfterMs"]}},"required":["worker","tokens","instance","launch"]},"OrganizationUnavailableError":{"type":"object","properties":{"error":{"type":"string","const":"organization_unavailable"}},"required":["error"]},"WorkspacePathRequiredError":{"type":"object","properties":{"error":{"type":"string","const":"workspace_path_required"}},"required":["error"]},"WorkerUserEmailRequiredError":{"type":"object","properties":{"error":{"type":"string","const":"user_email_required"}},"required":["error"]},"WorkerPaymentRequiredError":{"type":"object","properties":{"error":{"type":"string","const":"cloud_worker_billing_unavailable"},"message":{"type":"string"}},"required":["error","message"]},"WorkerOrgLimitReachedError":{"type":"object","properties":{"error":{"type":"string","const":"org_limit_reached"},"limitType":{"type":"string","const":"workers"},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"message":{"type":"string"}},"required":["error","limitType","limit","currentCount","message"]},"WorkerResponse":{"type":"object","properties":{"worker":{"$ref":"#/components/schemas/Worker"},"instance":{"$ref":"#/components/schemas/WorkerInstance"}},"required":["worker","instance"]},"WorkerUpdateResponse":{"type":"object","properties":{"worker":{"$ref":"#/components/schemas/Worker"}},"required":["worker"]},"WorkerTokensResponse":{"type":"object","properties":{"tokens":{"type":"object","properties":{"owner":{"type":"string"},"host":{"type":"string"},"client":{"type":"string"}},"required":["owner","host","client"]},"connect":{"anyOf":[{"type":"object","properties":{"openworkUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["openworkUrl","workspaceId"]},{"type":"null"}]},"directPreview":{"anyOf":[{"type":"object","properties":{"version":{"type":"number","const":1},"openworkUrl":{"type":"string"},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["version","openworkUrl","workspaceId","expiresAt"]},{"type":"null"}]}},"required":["tokens","connect"]},"WorkerConnectionError":{"anyOf":[{"type":"object","properties":{"error":{"type":"string","const":"worker_tokens_unavailable"},"message":{"type":"string"}},"required":["error","message"]},{"type":"object","properties":{"error":{"type":"string","const":"worker_runtime_unavailable"},"message":{"type":"string"}},"required":["error","message"]}]},"WorkerRuntimeResponse":{"type":"object","properties":{},"additionalProperties":{}},"McpTokenResponse":{"type":"object","properties":{"token":{"type":"string"},"appHostToken":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"appHostExpiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"organizationId":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"resource":{"type":"string"}},"required":["token","appHostToken","expiresAt","appHostExpiresAt","organizationId","scopes","resource"]},"McpTokenOrganizationRequiredError":{"type":"object","properties":{"error":{"type":"string","const":"organization_required"},"message":{"type":"string"}},"required":["error","message"]},"TelemetryDimensionListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"},"label":{"type":"string"},"sessionCount":{"type":"number"},"lastSeenAt":{"type":"string"}},"required":["type","value","label","sessionCount","lastSeenAt"]}}},"required":["items"]},"TelemetryAdoptionResponse":{"type":"object","properties":{"members":{"type":"number"},"pendingInvites":{"type":"number"},"activeMembers7d":{"type":"number"},"activeMembers30d":{"type":"number"},"weeklyTrend":{"type":"array","items":{"type":"number"}}},"required":["members","pendingInvites","activeMembers7d","activeMembers30d","weeklyTrend"]},"TelemetryAnalyticsResponse":{"type":"object","properties":{"members":{"type":"number"},"pendingInvites":{"type":"number"},"activeMembers7d":{"type":"number"},"activeMembers30d":{"type":"number"},"sessions7d":{"type":"number"},"sessions30d":{"type":"number"},"tasksCompleted7d":{"type":"number"},"tasksFailed7d":{"type":"number"},"tasksCompleted30d":{"type":"number"},"tasksFailed30d":{"type":"number"},"avgTaskDurationMs30d":{"anyOf":[{"type":"number"},{"type":"null"}]},"weekly":{"type":"array","items":{"type":"object","properties":{"weekStart":{"type":"string"},"activeMembers":{"type":"number"},"sessions":{"type":"number"},"tasksCompleted":{"type":"number"},"tasksFailed":{"type":"number"}},"required":["weekStart","activeMembers","sessions","tasksCompleted","tasksFailed"]}},"models":{"type":"object","properties":{"usage30d":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"sessions":{"type":"number"}},"required":["id","label","sessions"]}},"selection30d":{"type":"object","properties":{"default":{"type":"number"},"manual":{"type":"number"}},"required":["default","manual"]}},"required":["usage30d","selection30d"]}},"required":["members","pendingInvites","activeMembers7d","activeMembers30d","sessions7d","sessions30d","tasksCompleted7d","tasksFailed7d","tasksCompleted30d","tasksFailed30d","avgTaskDurationMs30d","weekly","models"]},"OpenApiDocument":{"type":"object","properties":{"openapi":{"type":"string"},"info":{"type":"object","properties":{"title":{"type":"string"},"version":{"type":"string"}},"required":["title","version"],"additionalProperties":{}},"paths":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"components":{"type":"object","properties":{},"additionalProperties":{}}},"required":["openapi","info","paths"],"additionalProperties":{}}}},"paths":{"/health":{"get":{"operationId":"getHealth","tags":["System"],"summary":"Check den-api health","description":"Returns a lightweight health payload for den-api.","responses":{"200":{"description":"den-api is reachable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DenApiHealthResponse"}}}}}}},"/ready":{"get":{"operationId":"getReady","tags":["System"],"summary":"Check den-api readiness","description":"Verifies den-api can reach its database dependency.","responses":{"200":{"description":"den-api is ready to serve traffic.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DenApiReadinessResponse"}}}},"503":{"description":"den-api is not ready to serve traffic.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DenApiReadinessResponse"}}}}}}},"/v1/admin/admins":{"post":{"operationId":"postV1AdminAdmins","responses":{"200":{"description":"OK"}}}},"/v1/admin/admins/{adminId}":{"delete":{"operationId":"deleteV1AdminAdminsByAdminId","parameters":[{"schema":{"type":"string"},"in":"path","name":"adminId","required":true}],"responses":{"200":{"description":"OK"}}}},"/v1/admin/users/{userId}/inference-usage":{"get":{"operationId":"getV1AdminUsersByUserIdInferenceUsage","parameters":[{"schema":{"type":"string"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"OK"}}}},"/v1/admin/users/{userId}/inference-usage/reset":{"post":{"operationId":"postV1AdminUsersByUserIdInferenceUsageReset","parameters":[{"schema":{"type":"string"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"OK"}}}},"/v1/admin/users/{userId}":{"delete":{"operationId":"deleteV1AdminUsersByUserId","parameters":[{"schema":{"type":"string"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"OK"}}}},"/v1/admin/organizations/{organizationId}/plan":{"patch":{"operationId":"patchV1AdminOrganizationsByOrganizationIdPlan","parameters":[{"schema":{"type":"string"},"in":"path","name":"organizationId","required":true}],"responses":{"200":{"description":"OK"}}}},"/v1/admin/organizations/{organizationId}/free-seats":{"patch":{"operationId":"patchV1AdminOrganizationsByOrganizationIdFreeSeats","parameters":[{"schema":{"type":"string"},"in":"path","name":"organizationId","required":true}],"responses":{"200":{"description":"OK"}}}},"/v1/admin/organizations/{organizationId}/capabilities":{"get":{"operationId":"getV1AdminOrganizationsByOrganizationIdCapabilities","parameters":[{"schema":{"type":"string"},"in":"path","name":"organizationId","required":true}],"responses":{"200":{"description":"OK"}}},"put":{"operationId":"putV1AdminOrganizationsByOrganizationIdCapabilities","parameters":[{"schema":{"type":"string"},"in":"path","name":"organizationId","required":true}],"responses":{"200":{"description":"OK"}}}},"/v1/admin/users":{"get":{"operationId":"getV1AdminUsers","tags":["Admin"],"summary":"Get a bounded admin user page","description":"Returns one bounded page of users plus required pagination metadata. Search runs across the global user set and optional billing enrichment stays page-scoped.","responses":{"200":{"description":"Admin user page returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUsersPageResponse"}}}},"400":{"description":"The admin user page query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The authenticated user is not an admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}},"parameters":[{"in":"query","name":"includeBilling","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"string"}},{"in":"query","name":"offset","schema":{"type":"string"}},{"in":"query","name":"search","schema":{"type":"string"}}]}},"/v1/admin/organizations":{"get":{"operationId":"getV1AdminOrganizations","tags":["Admin"],"summary":"Get a bounded admin organization page","description":"Returns one bounded page of organizations plus required pagination metadata. Search runs across the global organization set without changing the global overview totals.","responses":{"200":{"description":"Admin organization page returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOrganizationsPageResponse"}}}},"400":{"description":"The admin organization page query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The authenticated user is not an admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}},"parameters":[{"in":"query","name":"includeBilling","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"string"}},{"in":"query","name":"offset","schema":{"type":"string"}},{"in":"query","name":"search","schema":{"type":"string"}}]}},"/v1/admin/metrics":{"get":{"operationId":"getV1AdminMetrics","tags":["Admin"],"summary":"Load deferred admin analytics","description":"Calculates analytics that are intentionally deferred from the initial admin page: verified users, worker totals, activity, recurrence, invites, and chart series.","responses":{"200":{"description":"Deferred admin analytics returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminMetricsResponse"}}}},"401":{"description":"The caller must be authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The authenticated user is not an admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}}},"/v1/admin/overview":{"get":{"operationId":"getV1AdminOverview","tags":["Admin"],"summary":"Get admin overview","description":"Returns the initial admin overview with bounded user data, global totals, and required pagination metadata. Expensive analytics are loaded separately from /v1/admin/metrics.","responses":{"200":{"description":"Administrative overview returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOverviewResponse"}}}},"400":{"description":"The admin overview query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be an authenticated admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The authenticated user is not an admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}},"parameters":[{"in":"query","name":"includeBilling","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"string"}},{"in":"query","name":"offset","schema":{"type":"string"}},{"in":"query","name":"search","schema":{"type":"string"}}]}},"/api/auth/scim/v2/Schemas":{"get":{"operationId":"getApiAuthScimV2Schemas","responses":{"200":{"description":"OK"}}}},"/api/auth/scim/v2/ResourceTypes/Group":{"get":{"operationId":"getApiAuthScimV2ResourceTypesGroup","responses":{"200":{"description":"OK"}}}},"/api/auth/scim/v2/ResourceTypes":{"get":{"operationId":"getApiAuthScimV2ResourceTypes","responses":{"200":{"description":"OK"}}}},"/api/auth/scim/v2/Groups":{"get":{"operationId":"getApiAuthScimV2Groups","responses":{"200":{"description":"OK"}}},"post":{"operationId":"postApiAuthScimV2Groups","responses":{"200":{"description":"OK"}}}},"/api/auth/scim/v2/Groups/{groupId}":{"get":{"operationId":"getApiAuthScimV2GroupsByGroupId","parameters":[{"schema":{"type":"string"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"OK"}}},"put":{"operationId":"putApiAuthScimV2GroupsByGroupId","parameters":[{"schema":{"type":"string"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"OK"}}},"patch":{"operationId":"patchApiAuthScimV2GroupsByGroupId","parameters":[{"schema":{"type":"string"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"OK"}}},"delete":{"operationId":"deleteApiAuthScimV2GroupsByGroupId","parameters":[{"schema":{"type":"string"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"OK"}}}},"/api/auth/scim/v2/Users/{userId}":{"put":{"operationId":"putApiAuthScimV2UsersByUserId","parameters":[{"schema":{"type":"string"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"OK"}}},"patch":{"operationId":"patchApiAuthScimV2UsersByUserId","parameters":[{"schema":{"type":"string"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"OK"}}}},"/api/auth/scim/v2/Users":{"post":{"operationId":"postApiAuthScimV2Users","responses":{"200":{"description":"OK"}}}},"/api/auth/.well-known/oauth-authorization-server":{"get":{"operationId":"getApiAuthWellKnownOauthAuthorizationServer","responses":{"200":{"description":"OK"}}}},"/api/auth/.well-known/openid-configuration":{"get":{"operationId":"getApiAuthWellKnownOpenidConfiguration","responses":{"200":{"description":"OK"}}}},"/.well-known/oauth-authorization-server/api/auth":{"get":{"operationId":"getWellKnownOauthAuthorizationServerApiAuth","responses":{"200":{"description":"OK"}}}},"/.well-known/openid-configuration/api/auth":{"get":{"operationId":"getWellKnownOpenidConfigurationApiAuth","responses":{"200":{"description":"OK"}}}},"/.well-known/oauth-authorization-server":{"get":{"operationId":"getWellKnownOauthAuthorizationServer","responses":{"200":{"description":"OK"}}}},"/.well-known/openid-configuration":{"get":{"operationId":"getWellKnownOpenidConfiguration","responses":{"200":{"description":"OK"}}}},"/register":{"post":{"operationId":"postRegister","responses":{"200":{"description":"OK"}}}},"/api/auth/oauth2/register":{"post":{"operationId":"postApiAuthOauth2Register","responses":{"200":{"description":"OK"}}}},"/api/auth/oauth2/authorize":{"get":{"operationId":"getApiAuthOauth2Authorize","responses":{"200":{"description":"OK"}}}},"/v1/auth/bootstrap/status":{"get":{"operationId":"getV1AuthBootstrapStatus","tags":["Authentication"],"summary":"Check initial administrator bootstrap availability","description":"Returns whether the private-deployment initial-administrator setup flow is available without exposing configured administrator emails.","responses":{"200":{"description":"Bootstrap status returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["available","complete","unavailable"]}},"required":["status"]}}}}}}},"/v1/auth/bootstrap/verify":{"post":{"operationId":"postV1AuthBootstrapVerify","tags":["Authentication"],"summary":"Verify an initial administrator setup code","description":"Validates a configured administrator email and one-time operator code, then returns a short-lived setup grant for Better Auth account creation.","responses":{"200":{"description":"Bootstrap grant issued successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"grant":{"type":"string"},"expiresAt":{"type":"string"}},"required":["grant","expiresAt"]}}}},"403":{"description":"Bootstrap verification failed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","const":"bootstrap_verification_failed"},"message":{"type":"string"}},"required":["error","message"]}}}},"409":{"description":"Bootstrap is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","const":"bootstrap_unavailable"},"message":{"type":"string"}},"required":["error","message"]}}}}}}},"/v1/auth/login-options":{"get":{"operationId":"getV1AuthLoginOptions","tags":["Authentication"],"summary":"Resolve deterministic login option","description":"Returns the deterministic next authentication step for an email address. SSO is preferred before Google, password, GitHub compatibility, and new account creation.","responses":{"200":{"description":"Login option resolved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthLoginOptionsResponse"}}}},"400":{"description":"The login option query parameters were invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","const":"invalid_request"}},"required":["error"]}}}},"403":{"description":"Bot verification failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginOptionsBotVerificationFailedError"}}}},"429":{"description":"Too many login option attempts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginOptionsRateLimitedError"}}}}},"parameters":[{"in":"query","name":"email","schema":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"required":true},{"in":"query","name":"invite","schema":{"type":"string","minLength":1}}]}},"/v1/bootstrap/workspace":{"post":{"operationId":"postV1BootstrapWorkspace","tags":["Bootstrap"],"summary":"Create a provisional workspace for agent-first setup","description":"Creates a provisional workspace, setup member, starter skill, and short-lived claim links without requiring an email account first.","responses":{"200":{"description":"Workspace bootstrap completed.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"organization":{"type":"object","properties":{"id":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"name":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","const":"provisional"}},"required":["id","name","slug","status"]},"setup":{"type":"object","properties":{"id":{"description":"Den TypeID with 'wbt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"expiresAt":{"type":"string"}},"required":["id","expiresAt"]},"skill":{"type":"object","properties":{"id":{"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"title":{"type":"string"},"output":{"type":"string","const":"OPENWORK_BOOTSTRAP_SKILL_TRIGGERED"}},"required":["id","title","output"]},"claimLinks":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Den TypeID with 'wcl_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"role":{"type":"string"},"token":{"type":"string"},"url":{"type":"string"},"expiresAt":{"type":"string"}},"required":["id","role","token","url","expiresAt"]}}},"required":["ok","organization","setup","skill","claimLinks"]}}}},"400":{"description":"The bootstrap request body was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceName":{"type":"string","minLength":2,"maxLength":120},"skillName":{"default":"First OpenWork Skill","type":"string","minLength":1,"maxLength":120},"devicePublicKey":{"type":"string","minLength":16,"maxLength":4096},"claimRoles":{"default":["owner"],"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["owner","admin","member"]}},"ownerEmail":{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"teammateEmails":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}}},"required":["workspaceName"]}}}}}},"/v1/bootstrap/claims/accept":{"post":{"operationId":"postV1BootstrapClaimsAccept","tags":["Bootstrap"],"summary":"Claim a provisional workspace","description":"Lets a signed-in human claim ownership or membership of a provisional agent-created workspace.","responses":{"200":{"description":"Workspace claim accepted.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"organization":{"type":"object","properties":{"id":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"name":{"type":"string"},"slug":{"type":"string"},"role":{"type":"string"}},"required":["id","name","slug","role"]}},"required":["ok","organization"]}}}},"400":{"description":"The claim request body was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to claim a workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller cannot accept this claim.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The claim token was missing, expired, or already used.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":24,"maxLength":255}},"required":["token"]}}}}}},"/v1/cloud/instance":{"get":{"operationId":"getV1CloudInstance","tags":["Cloud"],"summary":"Get the active organization's Cloud instance","description":"Starts the active organization's OpenWork Cloud browser instance when needed and returns its browser URL once ready.","responses":{"200":{"description":"Cloud instance status returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloudInstanceResponse"}}}},"401":{"description":"The caller must be signed in to open Cloud.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"Cloud is not available for this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/cloud/instance/retry":{"post":{"operationId":"postV1CloudInstanceRetry","tags":["Cloud"],"summary":"Retry the active organization's Cloud instance","description":"Bypasses the passive recovery cooldown and makes one explicit attempt to recover the caller's failed Cloud instance.","responses":{"200":{"description":"Cloud instance recovery was requested.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloudInstanceResponse"}}}},"401":{"description":"The caller must be signed in to retry Cloud.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"Cloud is not available for this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/cloud/instance/update":{"post":{"operationId":"postV1CloudInstanceUpdate","tags":["Cloud"],"summary":"Request an update for the active organization's Cloud instance","description":"Flushes a running Cloud workspace checkpoint and stops the sandbox so the next resolve can recycle it onto the latest snapshot.","responses":{"200":{"description":"Cloud instance update request handled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloudInstanceUpdateResponse"}}}},"401":{"description":"The caller must be signed in to update Cloud.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"Cloud is not available for this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/cloud/gateway/resolve":{"get":{"operationId":"getV1CloudGatewayResolve","tags":["Cloud"],"summary":"Resolve the caller's Cloud instance for the browser gateway","description":"Starts or wakes the caller's own OpenWork Cloud browser instance when needed and returns the collaborator token only to the trusted gateway.","responses":{"200":{"description":"Cloud instance status returned successfully for the gateway.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloudGatewayInstanceResponse"}}}},"401":{"description":"The caller must be signed in to open Cloud.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"OpenWork Web access is not active for the organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenWorkWebAccessRequiredError"}}}},"404":{"description":"Cloud is not available for this organization or gateway.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/memory":{"get":{"operationId":"getV1Memory","tags":["Deprecated"],"deprecated":true,"summary":"List saved memories (removed feature)","description":"The Memory Bank feature has been removed. Always returns an empty list so published desktop builds render their normal empty state.","responses":{"200":{"description":"No memories exist; the feature has been removed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemovedMemoryList"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}},"post":{"operationId":"postV1Memory","tags":["Deprecated"],"deprecated":true,"summary":"Save a memory (removed feature)","description":"The Memory Bank feature has been removed. Saving is refused outright so no caller can believe a memory was persisted.","responses":{"410":{"description":"The Memory Bank feature has been removed. Saved memories no longer exist and new memories cannot be created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemovedMemoryGone"}}}}}}},"/v1/memory/search":{"get":{"operationId":"getV1MemorySearch","tags":["Deprecated"],"deprecated":true,"summary":"Search saved memories (removed feature)","description":"The Memory Bank feature has been removed. Always returns an empty result set, matching the old route's behavior when nothing matched.","responses":{"200":{"description":"No memories exist; the feature has been removed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemovedMemorySearch"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}}},"/v1/memory/{id}":{"delete":{"operationId":"deleteV1MemoryById","tags":["Deprecated"],"deprecated":true,"summary":"Delete a saved memory (removed feature)","description":"The Memory Bank feature has been removed, so every memory id is already gone. Desktop callers treat this 404 as a successful, idempotent delete.","responses":{"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The memory does not exist; the feature has been removed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemovedMemoryNotFound"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/skill-hubs":{"post":{"operationId":"postV1SkillHubs","tags":["Deprecated"],"deprecated":true,"summary":"Create skill hub","description":"Create skill hub. Skill hubs are deprecated; use plugins instead.","responses":{"410":{"description":"Skill hubs are deprecated. Use plugins instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeprecatedSkillHubError"}}}}}},"get":{"operationId":"getV1SkillHubs","tags":["Deprecated"],"deprecated":true,"summary":"List skill hubs","description":"List skill hubs. Skill hubs are deprecated; use plugins instead.","responses":{"410":{"description":"Skill hubs are deprecated. Use plugins instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeprecatedSkillHubError"}}}}}}},"/v1/skill-hubs/{skillHubId}":{"patch":{"operationId":"patchV1SkillHubsBySkillHubId","tags":["Deprecated"],"deprecated":true,"summary":"Update skill hub","description":"Update skill hub. Skill hubs are deprecated; use plugins instead.","responses":{"410":{"description":"Skill hubs are deprecated. Use plugins instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeprecatedSkillHubError"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"skillHubId","required":true}]},"delete":{"operationId":"deleteV1SkillHubsBySkillHubId","tags":["Deprecated"],"deprecated":true,"summary":"Delete skill hub","description":"Delete skill hub. Skill hubs are deprecated; use plugins instead.","responses":{"410":{"description":"Skill hubs are deprecated. Use plugins instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeprecatedSkillHubError"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"skillHubId","required":true}]}},"/v1/skill-hubs/{skillHubId}/skills":{"post":{"operationId":"postV1SkillHubsBySkillHubIdSkills","tags":["Deprecated"],"deprecated":true,"summary":"Add skill to skill hub","description":"Add skill to skill hub. Skill hubs are deprecated; use plugins instead.","responses":{"410":{"description":"Skill hubs are deprecated. Use plugins instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeprecatedSkillHubError"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"skillHubId","required":true}]}},"/v1/skill-hubs/{skillHubId}/skills/{skillId}":{"delete":{"operationId":"deleteV1SkillHubsBySkillHubIdSkillsBySkillId","tags":["Deprecated"],"deprecated":true,"summary":"Remove skill from skill hub","description":"Remove skill from skill hub. Skill hubs are deprecated; use plugins instead.","responses":{"410":{"description":"Skill hubs are deprecated. Use plugins instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeprecatedSkillHubError"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"skillHubId","required":true},{"schema":{"type":"string"},"in":"path","name":"skillId","required":true}]}},"/v1/skill-hubs/{skillHubId}/access":{"post":{"operationId":"postV1SkillHubsBySkillHubIdAccess","tags":["Deprecated"],"deprecated":true,"summary":"Grant skill hub access","description":"Grant skill hub access. Skill hubs are deprecated; use plugins instead.","responses":{"410":{"description":"Skill hubs are deprecated. Use plugins instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeprecatedSkillHubError"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"skillHubId","required":true}]}},"/v1/skill-hubs/{skillHubId}/access/{accessId}":{"delete":{"operationId":"deleteV1SkillHubsBySkillHubIdAccessByAccessId","tags":["Deprecated"],"deprecated":true,"summary":"Remove skill hub access","description":"Remove skill hub access. Skill hubs are deprecated; use plugins instead.","responses":{"410":{"description":"Skill hubs are deprecated. Use plugins instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeprecatedSkillHubError"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"skillHubId","required":true},{"schema":{"type":"string"},"in":"path","name":"accessId","required":true}]}},"/v1/dev/emails":{"get":{"operationId":"getV1DevEmails","responses":{"200":{"description":"OK"}}}},"/v1/dev/emails/last":{"get":{"operationId":"getV1DevEmailsLast","responses":{"200":{"description":"OK"}}}},"/v1/me":{"get":{"operationId":"getV1Me","tags":["Users"],"summary":"Get current user","description":"Returns the currently authenticated user and active session details for the caller.","responses":{"200":{"description":"Current user and session returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentUserResponse"}}}},"401":{"description":"The caller must be signed in to read profile data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}}},"/v1/me/orgs":{"get":{"operationId":"getV1MeOrgs","tags":["Users"],"summary":"List current user's organizations","description":"Lists the organizations visible to the current user and marks which organization is currently active.","responses":{"200":{"description":"Current user organizations returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentUserOrganizationsResponse"}}}}}}},"/v1/me/send-download-link":{"post":{"operationId":"postV1MeSendDownloadLink","tags":["Users"],"summary":"Send current user the OpenWork desktop download link","description":"Emails the authenticated user a link to download the OpenWork desktop app.","responses":{"200":{"description":"Download link email sent successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendDownloadLinkResponse"}}}},"400":{"description":"The signed-in account is missing an email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to request a download link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"429":{"description":"The user has requested too many download links recently.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendDownloadLinkRateLimitError"}}}},"502":{"description":"The download link email provider rejected or failed to deliver the email.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendDownloadLinkEmailFailedError"}}}}}}},"/v1/me/profile":{"patch":{"operationId":"patchV1MeProfile","tags":["Users"],"summary":"Update current user profile","description":"Updates the signed-in user's display name.","responses":{"200":{"description":"Current user profile updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCurrentUserProfileResponse"}}}},"400":{"description":"The profile update request body was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update profile data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"firstName":{"type":"string","maxLength":120},"lastName":{"type":"string","maxLength":120}},"required":["firstName","lastName"]}}}}}},"/v1/me/desktop-config":{"get":{"operationId":"getV1MeDesktopConfig","tags":["Users"],"summary":"Get current user's desktop config","description":"Returns the authenticated desktop app restrictions for the caller's active organization.","responses":{"200":{"description":"Current user desktop config returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentUserDesktopConfigResponse"}}}},"401":{"description":"The caller must be signed in to read desktop config.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}}},"/v1/automation-runners/token":{"post":{"operationId":"mintAutomationRunnerToken","tags":["Automations"],"x-mcp":false,"summary":"Connect this desktop as an Automation runner","description":"Mints a time-limited runner-only credential for the desktop SSE connection and HTTP runner APIs.","responses":{"200":{"description":"Runner credential minted.","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":32,"maxLength":512},"expiresAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"eventsPath":{"type":"string","const":"/v1/automation-runners/events"}},"required":["token","expiresAt","eventsPath"]}}}},"409":{"description":"Runner identity conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"runnerId":{"type":"string","minLength":8,"maxLength":160},"protocolVersion":{"type":"number","const":1},"supportedExecutionTargets":{"minItems":1,"maxItems":1,"type":"array","items":{"type":"string","const":"desktop"}},"capabilities":{"default":[],"maxItems":2,"type":"array","items":{"type":"string","enum":["model_attention_v1","remote_session_v1"]}},"appVersion":{"type":"string","minLength":1,"maxLength":80},"platform":{"type":"string","enum":["darwin","win32","linux"]},"concurrency":{"type":"integer","minimum":1,"maximum":4}},"required":["runnerId","protocolVersion","supportedExecutionTargets","appVersion","platform","concurrency"]}}}}}},"/v1/automation-runners/presence":{"get":{"operationId":"getAutomationDesktopRunnerPresence","tags":["Automations"],"x-mcp":false,"summary":"Report whether a desktop runner is connected","description":"Desktop Automations only run while one of the owner's desktops is connected. Management surfaces read this to warn before an occurrence is due rather than after it was missed.","responses":{"200":{"description":"Desktop runner presence.","content":{"application/json":{"schema":{"type":"object","properties":{"connected":{"type":"boolean"},"lastSeenAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["connected","lastSeenAt"]}}}}}}},"/v1/automation-runners/events":{"get":{"operationId":"getV1AutomationRunnersEvents","responses":{"200":{"description":"OK"}}}},"/v1/automation-runner/work":{"get":{"operationId":"getV1AutomationRunnerWork","responses":{"200":{"description":"OK"}}}},"/v1/remote-session-commands/{id}/claim":{"post":{"operationId":"postV1RemoteSessionCommandsByIdClaim","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"maxLength":160},"required":true}],"responses":{"200":{"description":"OK"}}}},"/v1/remote-session-commands/{id}/complete":{"post":{"operationId":"postV1RemoteSessionCommandsByIdComplete","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"maxLength":160},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"delivered"},"sessionId":{"type":"string","minLength":1,"maxLength":240},"workspaceId":{"type":"string","minLength":1,"maxLength":240},"resultSummary":{"type":"string","maxLength":4096},"error":{"not":{}}},"required":["status","sessionId","workspaceId"]},{"type":"object","properties":{"status":{"type":"string","const":"failed"},"sessionId":{"not":{}},"workspaceId":{"not":{}},"resultSummary":{"type":"string","maxLength":4096},"error":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":60},"message":{"type":"string","minLength":1,"maxLength":2000}},"required":["code","message"]}},"required":["status","error"]}]}}}},"responses":{"200":{"description":"OK"}}}},"/v1/automation-runs/{id}/claim":{"post":{"operationId":"postV1AutomationRunsByIdClaim","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"maxLength":160},"required":true}],"responses":{"200":{"description":"OK"}}}},"/v1/automation-runs/{id}/heartbeat":{"post":{"operationId":"postV1AutomationRunsByIdHeartbeat","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"maxLength":160},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["attempt"]}}}},"responses":{"200":{"description":"OK"}}}},"/v1/automation-runs/{id}/events":{"post":{"operationId":"postV1AutomationRunsByIdEvents","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"maxLength":160},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"sequence":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["user","assistant","capability_search","capability_execution","usage","warning","terminal"]},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["attempt","sequence","type","payload","createdAt"]}}}},"responses":{"200":{"description":"OK"}}}},"/v1/automation-runs/{id}/complete":{"post":{"operationId":"postV1AutomationRunsByIdComplete","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"maxLength":160},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["succeeded","failed","cancelled"]},"sessionId":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"null"}]},"workspaceId":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"null"}]},"resultSummary":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"usage":{"type":"object","properties":{"inputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"outputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["inputTokens","outputTokens","costMicros"]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["owner_membership_lost","model_access_lost","provider_unavailable","connect_access_unavailable","execution_runtime_unavailable","execution_failed","execution_timed_out","runner_unavailable","cancelled","lease_lost","internal_error"]},"message":{"type":"string","minLength":1,"maxLength":2000},"retryable":{"type":"boolean"}},"required":["code","message","retryable"]},{"type":"null"}]}},"required":["attempt","status","sessionId","workspaceId","resultSummary","usage","error"]}}}},"responses":{"200":{"description":"OK"}}}},"/v1/automations":{"get":{"operationId":"listAutomations","tags":["Automations"],"x-mcp":true,"summary":"List Automations","description":"Den schedules Automations and keeps durable run history. Automations created by Desktop run on the owner's connected desktop; Automations created by Web run in OpenWork Cloud. If no desktop runner is connected when a desktop occurrence is due, that occurrence is recorded as missed. Creation makes an Automation active immediately and uses the owner's current OpenWork Connect integrations. Deactivation stops future runs but does not cancel a run already in progress.","responses":{"200":{"description":"Automations returned.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"automation":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"organizationId":{"type":"string","minLength":1,"maxLength":160},"ownerMemberId":{"type":"string","minLength":1,"maxLength":160},"name":{"type":"string","minLength":1,"maxLength":120},"state":{"type":"string","enum":["active","inactive","needs_attention","archived"]},"currentRevisionId":{"type":"string","minLength":1,"maxLength":160},"nextDueAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"latestRunAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"latestSuccessfulRunId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"latestSuccessfulResult":{},"needsAttentionReason":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["owner_membership_lost","model_access_lost","provider_unavailable","connect_access_unavailable","execution_runtime_unavailable"]},"message":{"type":"string","minLength":1,"maxLength":2000},"occurredAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["code","message","occurredAt"]},{"type":"null"}]},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"archivedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","organizationId","ownerMemberId","name","state","currentRevisionId","nextDueAt","latestRunAt","needsAttentionReason","createdAt","updatedAt","archivedAt"]},"revision":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"automationId":{"type":"string","minLength":1,"maxLength":160},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"instructions":{"type":"string","minLength":1,"maxLength":100000},"schedule":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"once"},"timezone":{"type":"string","minLength":1,"maxLength":120},"at":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","timezone","at"]},{"type":"object","properties":{"kind":{"type":"string","const":"daily"},"timezone":{"type":"string","minLength":1,"maxLength":120},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59}},"required":["kind","timezone","hour","minute"]},{"type":"object","properties":{"kind":{"type":"string","const":"weekly"},"timezone":{"type":"string","minLength":1,"maxLength":120},"daysOfWeek":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59}},"required":["kind","timezone","daysOfWeek","hour","minute"]}]},"model":{"type":"object","properties":{"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"variant":{"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]}},"required":["providerId","modelId"]},"action":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"agent"},"instructions":{"type":"string","minLength":1,"maxLength":100000},"model":{"type":"object","properties":{"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"variant":{"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]}},"required":["providerId","modelId"]}},"required":["kind","instructions","model"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"saved_script"},"script":{"type":"object","properties":{"pluginId":{"type":"string","minLength":1,"maxLength":160},"configObjectId":{"type":"string","minLength":1,"maxLength":160},"configObjectVersionId":{"type":"string","minLength":1,"maxLength":160}},"required":["pluginId","configObjectId","configObjectVersionId"],"additionalProperties":false},"input":{}},"required":["kind","script"],"additionalProperties":false}]},"executionTarget":{"type":"string","enum":["desktop","cloud"]},"maximumRuntimeMs":{"type":"integer","minimum":10000,"maximum":3600000},"digest":{"type":"string","minLength":16,"maxLength":128},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","automationId","version","instructions","schedule","model","maximumRuntimeMs","digest","createdAt"]},"latestRun":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"automationId":{"type":"string","minLength":1,"maxLength":160},"revisionId":{"type":"string","minLength":1,"maxLength":160},"trigger":{"type":"string","enum":["scheduled","recovery","manual"]},"scheduledFor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"idempotencyKey":{"type":"string","minLength":1,"maxLength":512},"status":{"type":"string","enum":["queued","claimed","running","succeeded","failed","cancelled","skipped"]},"leaseOwner":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"null"}]},"leaseExpiresAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"heartbeatAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"attemptCount":{"type":"integer","minimum":0,"maximum":2},"executionTarget":{"type":"string","enum":["desktop","cloud"]},"executionThread":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"threadKind":{"type":"string","const":"automation"},"executionLocation":{"type":"string","enum":["desktop","cloud"]},"automationId":{"type":"string","minLength":1,"maxLength":160},"automationRunId":{"type":"string","minLength":1,"maxLength":160},"engineKind":{"type":"string","minLength":1,"maxLength":160},"nativeThreadId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"workspaceId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]}},"required":["id","threadKind","executionLocation","automationId","automationRunId","engineKind"]},{"type":"null"}]},"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"modelVariant":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"finishedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["owner_membership_lost","model_access_lost","provider_unavailable","connect_access_unavailable","execution_runtime_unavailable","execution_failed","execution_timed_out","runner_unavailable","cancelled","lease_lost","internal_error"]},"message":{"type":"string","minLength":1,"maxLength":2000},"retryable":{"type":"boolean"}},"required":["code","message","retryable"]},{"type":"null"}]},"resultSummary":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"codemodeReceiptId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"validatedResult":{},"usage":{"type":"object","properties":{"inputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"outputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["inputTokens","outputTokens","costMicros"]},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","automationId","revisionId","trigger","scheduledFor","idempotencyKey","status","leaseOwner","leaseExpiresAt","heartbeatAt","attemptCount","executionTarget","executionThread","providerId","modelId","startedAt","finishedAt","error","resultSummary","usage","createdAt","updatedAt"]},{"type":"null"}]}},"required":["automation","revision","latestRun"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"Sign-in required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"parameters":[{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":160}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}}]},"post":{"operationId":"createAutomation","tags":["Automations"],"x-mcp":false,"summary":"Create an active Automation from an app surface","description":"Den schedules Automations and keeps durable run history. Automations created by Desktop run on the owner's connected desktop; Automations created by Web run in OpenWork Cloud. If no desktop runner is connected when a desktop occurrence is due, that occurrence is recorded as missed. Creation makes an Automation active immediately and uses the owner's current OpenWork Connect integrations. Deactivation stops future runs but does not cancel a run already in progress. This compatibility route serves first-party Desktop clients. Agents must use createCloudAutomation so they cannot accidentally create Desktop placement.","responses":{"201":{"description":"Active Automation created.","content":{"application/json":{"schema":{"type":"object","properties":{"automation":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"organizationId":{"type":"string","minLength":1,"maxLength":160},"ownerMemberId":{"type":"string","minLength":1,"maxLength":160},"name":{"type":"string","minLength":1,"maxLength":120},"state":{"type":"string","enum":["active","inactive","needs_attention","archived"]},"currentRevisionId":{"type":"string","minLength":1,"maxLength":160},"nextDueAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"latestRunAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"latestSuccessfulRunId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"latestSuccessfulResult":{},"needsAttentionReason":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["owner_membership_lost","model_access_lost","provider_unavailable","connect_access_unavailable","execution_runtime_unavailable"]},"message":{"type":"string","minLength":1,"maxLength":2000},"occurredAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["code","message","occurredAt"]},{"type":"null"}]},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"archivedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","organizationId","ownerMemberId","name","state","currentRevisionId","nextDueAt","latestRunAt","needsAttentionReason","createdAt","updatedAt","archivedAt"]},"revision":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"automationId":{"type":"string","minLength":1,"maxLength":160},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"instructions":{"type":"string","minLength":1,"maxLength":100000},"schedule":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"once"},"timezone":{"type":"string","minLength":1,"maxLength":120},"at":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","timezone","at"]},{"type":"object","properties":{"kind":{"type":"string","const":"daily"},"timezone":{"type":"string","minLength":1,"maxLength":120},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59}},"required":["kind","timezone","hour","minute"]},{"type":"object","properties":{"kind":{"type":"string","const":"weekly"},"timezone":{"type":"string","minLength":1,"maxLength":120},"daysOfWeek":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59}},"required":["kind","timezone","daysOfWeek","hour","minute"]}]},"model":{"type":"object","properties":{"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"variant":{"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]}},"required":["providerId","modelId"]},"action":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"agent"},"instructions":{"type":"string","minLength":1,"maxLength":100000},"model":{"type":"object","properties":{"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"variant":{"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]}},"required":["providerId","modelId"]}},"required":["kind","instructions","model"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"saved_script"},"script":{"type":"object","properties":{"pluginId":{"type":"string","minLength":1,"maxLength":160},"configObjectId":{"type":"string","minLength":1,"maxLength":160},"configObjectVersionId":{"type":"string","minLength":1,"maxLength":160}},"required":["pluginId","configObjectId","configObjectVersionId"],"additionalProperties":false},"input":{}},"required":["kind","script"],"additionalProperties":false}]},"executionTarget":{"type":"string","enum":["desktop","cloud"]},"maximumRuntimeMs":{"type":"integer","minimum":10000,"maximum":3600000},"digest":{"type":"string","minLength":16,"maxLength":128},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","automationId","version","instructions","schedule","model","maximumRuntimeMs","digest","createdAt"]},"latestRun":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"automationId":{"type":"string","minLength":1,"maxLength":160},"revisionId":{"type":"string","minLength":1,"maxLength":160},"trigger":{"type":"string","enum":["scheduled","recovery","manual"]},"scheduledFor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"idempotencyKey":{"type":"string","minLength":1,"maxLength":512},"status":{"type":"string","enum":["queued","claimed","running","succeeded","failed","cancelled","skipped"]},"leaseOwner":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"null"}]},"leaseExpiresAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"heartbeatAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"attemptCount":{"type":"integer","minimum":0,"maximum":2},"executionTarget":{"type":"string","enum":["desktop","cloud"]},"executionThread":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"threadKind":{"type":"string","const":"automation"},"executionLocation":{"type":"string","enum":["desktop","cloud"]},"automationId":{"type":"string","minLength":1,"maxLength":160},"automationRunId":{"type":"string","minLength":1,"maxLength":160},"engineKind":{"type":"string","minLength":1,"maxLength":160},"nativeThreadId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"workspaceId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]}},"required":["id","threadKind","executionLocation","automationId","automationRunId","engineKind"]},{"type":"null"}]},"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"modelVariant":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"finishedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["owner_membership_lost","model_access_lost","provider_unavailable","connect_access_unavailable","execution_runtime_unavailable","execution_failed","execution_timed_out","runner_unavailable","cancelled","lease_lost","internal_error"]},"message":{"type":"string","minLength":1,"maxLength":2000},"retryable":{"type":"boolean"}},"required":["code","message","retryable"]},{"type":"null"}]},"resultSummary":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"codemodeReceiptId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"validatedResult":{},"usage":{"type":"object","properties":{"inputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"outputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["inputTokens","outputTokens","costMicros"]},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","automationId","revisionId","trigger","scheduledFor","idempotencyKey","status","leaseOwner","leaseExpiresAt","heartbeatAt","attemptCount","executionTarget","executionThread","providerId","modelId","startedAt","finishedAt","error","resultSummary","usage","createdAt","updatedAt"]},{"type":"null"}]}},"required":["automation","revision","latestRun"]}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"Sign-in required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"Cloud runtime or model access is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"schedule":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"once"},"timezone":{"type":"string","minLength":1,"maxLength":120},"at":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","timezone","at"]},{"type":"object","properties":{"kind":{"type":"string","const":"daily"},"timezone":{"type":"string","minLength":1,"maxLength":120},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59}},"required":["kind","timezone","hour","minute"]},{"type":"object","properties":{"kind":{"type":"string","const":"weekly"},"timezone":{"type":"string","minLength":1,"maxLength":120},"daysOfWeek":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59}},"required":["kind","timezone","daysOfWeek","hour","minute"]}]},"action":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"agent"},"instructions":{"type":"string","minLength":1,"maxLength":100000},"model":{"type":"object","properties":{"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"variant":{"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]}},"required":["providerId","modelId"]}},"required":["kind","instructions","model"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"saved_script"},"script":{"type":"object","properties":{"pluginId":{"type":"string","minLength":1,"maxLength":160},"configObjectId":{"type":"string","minLength":1,"maxLength":160},"configObjectVersionId":{"type":"string","minLength":1,"maxLength":160}},"required":["pluginId","configObjectId","configObjectVersionId"],"additionalProperties":false},"input":{}},"required":["kind","script"],"additionalProperties":false}]},"executionTarget":{"type":"string","enum":["desktop","cloud"]}},"required":["name","schedule","action","executionTarget"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"instructions":{"type":"string","minLength":1,"maxLength":100000},"schedule":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"once"},"timezone":{"type":"string","minLength":1,"maxLength":120},"at":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","timezone","at"]},{"type":"object","properties":{"kind":{"type":"string","const":"daily"},"timezone":{"type":"string","minLength":1,"maxLength":120},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59}},"required":["kind","timezone","hour","minute"]},{"type":"object","properties":{"kind":{"type":"string","const":"weekly"},"timezone":{"type":"string","minLength":1,"maxLength":120},"daysOfWeek":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59}},"required":["kind","timezone","daysOfWeek","hour","minute"]}]},"model":{"type":"object","properties":{"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"variant":{"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]}},"required":["providerId","modelId"]}},"required":["name","instructions","schedule","model"]}]}}}}}},"/v1/cloud-automations":{"post":{"operationId":"createCloudAutomation","tags":["Automations"],"x-mcp":true,"summary":"Create an active OpenWork Cloud Automation","description":"Den schedules Automations and keeps durable run history. Automations created by Desktop run on the owner's connected desktop; Automations created by Web run in OpenWork Cloud. If no desktop runner is connected when a desktop occurrence is due, that occurrence is recorded as missed. Creation makes an Automation active immediately and uses the owner's current OpenWork Connect integrations. Deactivation stops future runs but does not cancel a run already in progress. This is the Web and Cloud Chat creation surface. Placement is fixed to OpenWork Cloud and the Automation can wake a stopped Cloud container without a desktop. Create only when the person explicitly asks to create or schedule it; there is no draft step.","responses":{"201":{"description":"Active Cloud Automation created.","content":{"application/json":{"schema":{"type":"object","properties":{"automation":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"organizationId":{"type":"string","minLength":1,"maxLength":160},"ownerMemberId":{"type":"string","minLength":1,"maxLength":160},"name":{"type":"string","minLength":1,"maxLength":120},"state":{"type":"string","enum":["active","inactive","needs_attention","archived"]},"currentRevisionId":{"type":"string","minLength":1,"maxLength":160},"nextDueAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"latestRunAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"latestSuccessfulRunId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"latestSuccessfulResult":{},"needsAttentionReason":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["owner_membership_lost","model_access_lost","provider_unavailable","connect_access_unavailable","execution_runtime_unavailable"]},"message":{"type":"string","minLength":1,"maxLength":2000},"occurredAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["code","message","occurredAt"]},{"type":"null"}]},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"archivedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","organizationId","ownerMemberId","name","state","currentRevisionId","nextDueAt","latestRunAt","needsAttentionReason","createdAt","updatedAt","archivedAt"]},"revision":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"automationId":{"type":"string","minLength":1,"maxLength":160},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"instructions":{"type":"string","minLength":1,"maxLength":100000},"schedule":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"once"},"timezone":{"type":"string","minLength":1,"maxLength":120},"at":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","timezone","at"]},{"type":"object","properties":{"kind":{"type":"string","const":"daily"},"timezone":{"type":"string","minLength":1,"maxLength":120},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59}},"required":["kind","timezone","hour","minute"]},{"type":"object","properties":{"kind":{"type":"string","const":"weekly"},"timezone":{"type":"string","minLength":1,"maxLength":120},"daysOfWeek":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59}},"required":["kind","timezone","daysOfWeek","hour","minute"]}]},"model":{"type":"object","properties":{"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"variant":{"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]}},"required":["providerId","modelId"]},"action":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"agent"},"instructions":{"type":"string","minLength":1,"maxLength":100000},"model":{"type":"object","properties":{"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"variant":{"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]}},"required":["providerId","modelId"]}},"required":["kind","instructions","model"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"saved_script"},"script":{"type":"object","properties":{"pluginId":{"type":"string","minLength":1,"maxLength":160},"configObjectId":{"type":"string","minLength":1,"maxLength":160},"configObjectVersionId":{"type":"string","minLength":1,"maxLength":160}},"required":["pluginId","configObjectId","configObjectVersionId"],"additionalProperties":false},"input":{}},"required":["kind","script"],"additionalProperties":false}]},"executionTarget":{"type":"string","enum":["desktop","cloud"]},"maximumRuntimeMs":{"type":"integer","minimum":10000,"maximum":3600000},"digest":{"type":"string","minLength":16,"maxLength":128},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","automationId","version","instructions","schedule","model","maximumRuntimeMs","digest","createdAt"]},"latestRun":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"automationId":{"type":"string","minLength":1,"maxLength":160},"revisionId":{"type":"string","minLength":1,"maxLength":160},"trigger":{"type":"string","enum":["scheduled","recovery","manual"]},"scheduledFor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"idempotencyKey":{"type":"string","minLength":1,"maxLength":512},"status":{"type":"string","enum":["queued","claimed","running","succeeded","failed","cancelled","skipped"]},"leaseOwner":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"null"}]},"leaseExpiresAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"heartbeatAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"attemptCount":{"type":"integer","minimum":0,"maximum":2},"executionTarget":{"type":"string","enum":["desktop","cloud"]},"executionThread":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"threadKind":{"type":"string","const":"automation"},"executionLocation":{"type":"string","enum":["desktop","cloud"]},"automationId":{"type":"string","minLength":1,"maxLength":160},"automationRunId":{"type":"string","minLength":1,"maxLength":160},"engineKind":{"type":"string","minLength":1,"maxLength":160},"nativeThreadId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"workspaceId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]}},"required":["id","threadKind","executionLocation","automationId","automationRunId","engineKind"]},{"type":"null"}]},"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"modelVariant":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"finishedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["owner_membership_lost","model_access_lost","provider_unavailable","connect_access_unavailable","execution_runtime_unavailable","execution_failed","execution_timed_out","runner_unavailable","cancelled","lease_lost","internal_error"]},"message":{"type":"string","minLength":1,"maxLength":2000},"retryable":{"type":"boolean"}},"required":["code","message","retryable"]},{"type":"null"}]},"resultSummary":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"codemodeReceiptId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"validatedResult":{},"usage":{"type":"object","properties":{"inputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"outputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["inputTokens","outputTokens","costMicros"]},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","automationId","revisionId","trigger","scheduledFor","idempotencyKey","status","leaseOwner","leaseExpiresAt","heartbeatAt","attemptCount","executionTarget","executionThread","providerId","modelId","startedAt","finishedAt","error","resultSummary","usage","createdAt","updatedAt"]},{"type":"null"}]}},"required":["automation","revision","latestRun"]}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"Sign-in required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"Cloud runtime or model access is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"schedule":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"once"},"timezone":{"type":"string","minLength":1,"maxLength":120},"at":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","timezone","at"]},{"type":"object","properties":{"kind":{"type":"string","const":"daily"},"timezone":{"type":"string","minLength":1,"maxLength":120},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59}},"required":["kind","timezone","hour","minute"]},{"type":"object","properties":{"kind":{"type":"string","const":"weekly"},"timezone":{"type":"string","minLength":1,"maxLength":120},"daysOfWeek":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59}},"required":["kind","timezone","daysOfWeek","hour","minute"]}]},"action":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"agent"},"instructions":{"type":"string","minLength":1,"maxLength":100000},"model":{"type":"object","properties":{"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"variant":{"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]}},"required":["providerId","modelId"]}},"required":["kind","instructions","model"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"saved_script"},"script":{"type":"object","properties":{"pluginId":{"type":"string","minLength":1,"maxLength":160},"configObjectId":{"type":"string","minLength":1,"maxLength":160},"configObjectVersionId":{"type":"string","minLength":1,"maxLength":160}},"required":["pluginId","configObjectId","configObjectVersionId"],"additionalProperties":false},"input":{}},"required":["kind","script"],"additionalProperties":false}]}},"required":["name","schedule","action"],"additionalProperties":false}}}}}},"/v1/automations/{id}":{"get":{"operationId":"getAutomation","tags":["Automations"],"x-mcp":true,"summary":"Get an Automation","description":"Den schedules Automations and keeps durable run history. Automations created by Desktop run on the owner's connected desktop; Automations created by Web run in OpenWork Cloud. If no desktop runner is connected when a desktop occurrence is due, that occurrence is recorded as missed. Creation makes an Automation active immediately and uses the owner's current OpenWork Connect integrations. Deactivation stops future runs but does not cancel a run already in progress.","responses":{"200":{"description":"Automation returned.","content":{"application/json":{"schema":{"type":"object","properties":{"automation":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"organizationId":{"type":"string","minLength":1,"maxLength":160},"ownerMemberId":{"type":"string","minLength":1,"maxLength":160},"name":{"type":"string","minLength":1,"maxLength":120},"state":{"type":"string","enum":["active","inactive","needs_attention","archived"]},"currentRevisionId":{"type":"string","minLength":1,"maxLength":160},"nextDueAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"latestRunAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"latestSuccessfulRunId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"latestSuccessfulResult":{},"needsAttentionReason":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["owner_membership_lost","model_access_lost","provider_unavailable","connect_access_unavailable","execution_runtime_unavailable"]},"message":{"type":"string","minLength":1,"maxLength":2000},"occurredAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["code","message","occurredAt"]},{"type":"null"}]},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"archivedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","organizationId","ownerMemberId","name","state","currentRevisionId","nextDueAt","latestRunAt","needsAttentionReason","createdAt","updatedAt","archivedAt"]},"revision":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"automationId":{"type":"string","minLength":1,"maxLength":160},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"instructions":{"type":"string","minLength":1,"maxLength":100000},"schedule":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"once"},"timezone":{"type":"string","minLength":1,"maxLength":120},"at":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","timezone","at"]},{"type":"object","properties":{"kind":{"type":"string","const":"daily"},"timezone":{"type":"string","minLength":1,"maxLength":120},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59}},"required":["kind","timezone","hour","minute"]},{"type":"object","properties":{"kind":{"type":"string","const":"weekly"},"timezone":{"type":"string","minLength":1,"maxLength":120},"daysOfWeek":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59}},"required":["kind","timezone","daysOfWeek","hour","minute"]}]},"model":{"type":"object","properties":{"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"variant":{"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]}},"required":["providerId","modelId"]},"action":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"agent"},"instructions":{"type":"string","minLength":1,"maxLength":100000},"model":{"type":"object","properties":{"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"variant":{"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]}},"required":["providerId","modelId"]}},"required":["kind","instructions","model"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"saved_script"},"script":{"type":"object","properties":{"pluginId":{"type":"string","minLength":1,"maxLength":160},"configObjectId":{"type":"string","minLength":1,"maxLength":160},"configObjectVersionId":{"type":"string","minLength":1,"maxLength":160}},"required":["pluginId","configObjectId","configObjectVersionId"],"additionalProperties":false},"input":{}},"required":["kind","script"],"additionalProperties":false}]},"executionTarget":{"type":"string","enum":["desktop","cloud"]},"maximumRuntimeMs":{"type":"integer","minimum":10000,"maximum":3600000},"digest":{"type":"string","minLength":16,"maxLength":128},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","automationId","version","instructions","schedule","model","maximumRuntimeMs","digest","createdAt"]},"latestRun":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"automationId":{"type":"string","minLength":1,"maxLength":160},"revisionId":{"type":"string","minLength":1,"maxLength":160},"trigger":{"type":"string","enum":["scheduled","recovery","manual"]},"scheduledFor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"idempotencyKey":{"type":"string","minLength":1,"maxLength":512},"status":{"type":"string","enum":["queued","claimed","running","succeeded","failed","cancelled","skipped"]},"leaseOwner":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"null"}]},"leaseExpiresAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"heartbeatAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"attemptCount":{"type":"integer","minimum":0,"maximum":2},"executionTarget":{"type":"string","enum":["desktop","cloud"]},"executionThread":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"threadKind":{"type":"string","const":"automation"},"executionLocation":{"type":"string","enum":["desktop","cloud"]},"automationId":{"type":"string","minLength":1,"maxLength":160},"automationRunId":{"type":"string","minLength":1,"maxLength":160},"engineKind":{"type":"string","minLength":1,"maxLength":160},"nativeThreadId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"workspaceId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]}},"required":["id","threadKind","executionLocation","automationId","automationRunId","engineKind"]},{"type":"null"}]},"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"modelVariant":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"finishedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["owner_membership_lost","model_access_lost","provider_unavailable","connect_access_unavailable","execution_runtime_unavailable","execution_failed","execution_timed_out","runner_unavailable","cancelled","lease_lost","internal_error"]},"message":{"type":"string","minLength":1,"maxLength":2000},"retryable":{"type":"boolean"}},"required":["code","message","retryable"]},{"type":"null"}]},"resultSummary":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"codemodeReceiptId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"validatedResult":{},"usage":{"type":"object","properties":{"inputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"outputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["inputTokens","outputTokens","costMicros"]},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","automationId","revisionId","trigger","scheduledFor","idempotencyKey","status","leaseOwner","leaseExpiresAt","heartbeatAt","attemptCount","executionTarget","executionThread","providerId","modelId","startedAt","finishedAt","error","resultSummary","usage","createdAt","updatedAt"]},{"type":"null"}]}},"required":["automation","revision","latestRun"]}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"maxLength":160},"required":true}]},"patch":{"operationId":"updateAutomation","tags":["Automations"],"x-mcp":true,"summary":"Update an Automation","description":"Den schedules Automations and keeps durable run history. Automations created by Desktop run on the owner's connected desktop; Automations created by Web run in OpenWork Cloud. If no desktop runner is connected when a desktop occurrence is due, that occurrence is recorded as missed. Creation makes an Automation active immediately and uses the owner's current OpenWork Connect integrations. Deactivation stops future runs but does not cancel a run already in progress. Every behavior-changing edit creates an immutable revision and applies it to future runs immediately.","responses":{"200":{"description":"Automation updated.","content":{"application/json":{"schema":{"type":"object","properties":{"automation":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"organizationId":{"type":"string","minLength":1,"maxLength":160},"ownerMemberId":{"type":"string","minLength":1,"maxLength":160},"name":{"type":"string","minLength":1,"maxLength":120},"state":{"type":"string","enum":["active","inactive","needs_attention","archived"]},"currentRevisionId":{"type":"string","minLength":1,"maxLength":160},"nextDueAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"latestRunAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"latestSuccessfulRunId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"latestSuccessfulResult":{},"needsAttentionReason":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["owner_membership_lost","model_access_lost","provider_unavailable","connect_access_unavailable","execution_runtime_unavailable"]},"message":{"type":"string","minLength":1,"maxLength":2000},"occurredAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["code","message","occurredAt"]},{"type":"null"}]},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"archivedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","organizationId","ownerMemberId","name","state","currentRevisionId","nextDueAt","latestRunAt","needsAttentionReason","createdAt","updatedAt","archivedAt"]},"revision":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"automationId":{"type":"string","minLength":1,"maxLength":160},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"instructions":{"type":"string","minLength":1,"maxLength":100000},"schedule":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"once"},"timezone":{"type":"string","minLength":1,"maxLength":120},"at":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","timezone","at"]},{"type":"object","properties":{"kind":{"type":"string","const":"daily"},"timezone":{"type":"string","minLength":1,"maxLength":120},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59}},"required":["kind","timezone","hour","minute"]},{"type":"object","properties":{"kind":{"type":"string","const":"weekly"},"timezone":{"type":"string","minLength":1,"maxLength":120},"daysOfWeek":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59}},"required":["kind","timezone","daysOfWeek","hour","minute"]}]},"model":{"type":"object","properties":{"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"variant":{"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]}},"required":["providerId","modelId"]},"action":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"agent"},"instructions":{"type":"string","minLength":1,"maxLength":100000},"model":{"type":"object","properties":{"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"variant":{"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]}},"required":["providerId","modelId"]}},"required":["kind","instructions","model"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"saved_script"},"script":{"type":"object","properties":{"pluginId":{"type":"string","minLength":1,"maxLength":160},"configObjectId":{"type":"string","minLength":1,"maxLength":160},"configObjectVersionId":{"type":"string","minLength":1,"maxLength":160}},"required":["pluginId","configObjectId","configObjectVersionId"],"additionalProperties":false},"input":{}},"required":["kind","script"],"additionalProperties":false}]},"executionTarget":{"type":"string","enum":["desktop","cloud"]},"maximumRuntimeMs":{"type":"integer","minimum":10000,"maximum":3600000},"digest":{"type":"string","minLength":16,"maxLength":128},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","automationId","version","instructions","schedule","model","maximumRuntimeMs","digest","createdAt"]},"latestRun":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"automationId":{"type":"string","minLength":1,"maxLength":160},"revisionId":{"type":"string","minLength":1,"maxLength":160},"trigger":{"type":"string","enum":["scheduled","recovery","manual"]},"scheduledFor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"idempotencyKey":{"type":"string","minLength":1,"maxLength":512},"status":{"type":"string","enum":["queued","claimed","running","succeeded","failed","cancelled","skipped"]},"leaseOwner":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"null"}]},"leaseExpiresAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"heartbeatAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"attemptCount":{"type":"integer","minimum":0,"maximum":2},"executionTarget":{"type":"string","enum":["desktop","cloud"]},"executionThread":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"threadKind":{"type":"string","const":"automation"},"executionLocation":{"type":"string","enum":["desktop","cloud"]},"automationId":{"type":"string","minLength":1,"maxLength":160},"automationRunId":{"type":"string","minLength":1,"maxLength":160},"engineKind":{"type":"string","minLength":1,"maxLength":160},"nativeThreadId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"workspaceId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]}},"required":["id","threadKind","executionLocation","automationId","automationRunId","engineKind"]},{"type":"null"}]},"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"modelVariant":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"finishedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["owner_membership_lost","model_access_lost","provider_unavailable","connect_access_unavailable","execution_runtime_unavailable","execution_failed","execution_timed_out","runner_unavailable","cancelled","lease_lost","internal_error"]},"message":{"type":"string","minLength":1,"maxLength":2000},"retryable":{"type":"boolean"}},"required":["code","message","retryable"]},{"type":"null"}]},"resultSummary":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"codemodeReceiptId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"validatedResult":{},"usage":{"type":"object","properties":{"inputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"outputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["inputTokens","outputTokens","costMicros"]},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","automationId","revisionId","trigger","scheduledFor","idempotencyKey","status","leaseOwner","leaseExpiresAt","heartbeatAt","attemptCount","executionTarget","executionThread","providerId","modelId","startedAt","finishedAt","error","resultSummary","usage","createdAt","updatedAt"]},{"type":"null"}]}},"required":["automation","revision","latestRun"]}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"maxLength":160},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"instructions":{"type":"string","minLength":1,"maxLength":100000},"schedule":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"once"},"timezone":{"type":"string","minLength":1,"maxLength":120},"at":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","timezone","at"]},{"type":"object","properties":{"kind":{"type":"string","const":"daily"},"timezone":{"type":"string","minLength":1,"maxLength":120},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59}},"required":["kind","timezone","hour","minute"]},{"type":"object","properties":{"kind":{"type":"string","const":"weekly"},"timezone":{"type":"string","minLength":1,"maxLength":120},"daysOfWeek":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59}},"required":["kind","timezone","daysOfWeek","hour","minute"]}]},"model":{"type":"object","properties":{"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"variant":{"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]}},"required":["providerId","modelId"]},"action":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"agent"},"instructions":{"type":"string","minLength":1,"maxLength":100000},"model":{"type":"object","properties":{"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"variant":{"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]}},"required":["providerId","modelId"]}},"required":["kind","instructions","model"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"saved_script"},"script":{"type":"object","properties":{"pluginId":{"type":"string","minLength":1,"maxLength":160},"configObjectId":{"type":"string","minLength":1,"maxLength":160},"configObjectVersionId":{"type":"string","minLength":1,"maxLength":160}},"required":["pluginId","configObjectId","configObjectVersionId"],"additionalProperties":false},"input":{}},"required":["kind","script"],"additionalProperties":false}]},"executionTarget":{"type":"string","enum":["desktop","cloud"]}},"additionalProperties":false}}}}},"delete":{"operationId":"archiveAutomation","tags":["Automations"],"x-mcp":true,"summary":"Archive an Automation","description":"Den schedules Automations and keeps durable run history. Automations created by Desktop run on the owner's connected desktop; Automations created by Web run in OpenWork Cloud. If no desktop runner is connected when a desktop occurrence is due, that occurrence is recorded as missed. Creation makes an Automation active immediately and uses the owner's current OpenWork Connect integrations. Deactivation stops future runs but does not cancel a run already in progress. Durable run history is retained.","responses":{"200":{"description":"Automation archived.","content":{"application/json":{"schema":{"type":"object","properties":{"automation":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"organizationId":{"type":"string","minLength":1,"maxLength":160},"ownerMemberId":{"type":"string","minLength":1,"maxLength":160},"name":{"type":"string","minLength":1,"maxLength":120},"state":{"type":"string","enum":["active","inactive","needs_attention","archived"]},"currentRevisionId":{"type":"string","minLength":1,"maxLength":160},"nextDueAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"latestRunAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"latestSuccessfulRunId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"latestSuccessfulResult":{},"needsAttentionReason":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["owner_membership_lost","model_access_lost","provider_unavailable","connect_access_unavailable","execution_runtime_unavailable"]},"message":{"type":"string","minLength":1,"maxLength":2000},"occurredAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["code","message","occurredAt"]},{"type":"null"}]},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"archivedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","organizationId","ownerMemberId","name","state","currentRevisionId","nextDueAt","latestRunAt","needsAttentionReason","createdAt","updatedAt","archivedAt"]},"revision":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"automationId":{"type":"string","minLength":1,"maxLength":160},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"instructions":{"type":"string","minLength":1,"maxLength":100000},"schedule":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"once"},"timezone":{"type":"string","minLength":1,"maxLength":120},"at":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","timezone","at"]},{"type":"object","properties":{"kind":{"type":"string","const":"daily"},"timezone":{"type":"string","minLength":1,"maxLength":120},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59}},"required":["kind","timezone","hour","minute"]},{"type":"object","properties":{"kind":{"type":"string","const":"weekly"},"timezone":{"type":"string","minLength":1,"maxLength":120},"daysOfWeek":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59}},"required":["kind","timezone","daysOfWeek","hour","minute"]}]},"model":{"type":"object","properties":{"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"variant":{"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]}},"required":["providerId","modelId"]},"action":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"agent"},"instructions":{"type":"string","minLength":1,"maxLength":100000},"model":{"type":"object","properties":{"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"variant":{"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]}},"required":["providerId","modelId"]}},"required":["kind","instructions","model"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"saved_script"},"script":{"type":"object","properties":{"pluginId":{"type":"string","minLength":1,"maxLength":160},"configObjectId":{"type":"string","minLength":1,"maxLength":160},"configObjectVersionId":{"type":"string","minLength":1,"maxLength":160}},"required":["pluginId","configObjectId","configObjectVersionId"],"additionalProperties":false},"input":{}},"required":["kind","script"],"additionalProperties":false}]},"executionTarget":{"type":"string","enum":["desktop","cloud"]},"maximumRuntimeMs":{"type":"integer","minimum":10000,"maximum":3600000},"digest":{"type":"string","minLength":16,"maxLength":128},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","automationId","version","instructions","schedule","model","maximumRuntimeMs","digest","createdAt"]},"latestRun":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"automationId":{"type":"string","minLength":1,"maxLength":160},"revisionId":{"type":"string","minLength":1,"maxLength":160},"trigger":{"type":"string","enum":["scheduled","recovery","manual"]},"scheduledFor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"idempotencyKey":{"type":"string","minLength":1,"maxLength":512},"status":{"type":"string","enum":["queued","claimed","running","succeeded","failed","cancelled","skipped"]},"leaseOwner":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"null"}]},"leaseExpiresAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"heartbeatAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"attemptCount":{"type":"integer","minimum":0,"maximum":2},"executionTarget":{"type":"string","enum":["desktop","cloud"]},"executionThread":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"threadKind":{"type":"string","const":"automation"},"executionLocation":{"type":"string","enum":["desktop","cloud"]},"automationId":{"type":"string","minLength":1,"maxLength":160},"automationRunId":{"type":"string","minLength":1,"maxLength":160},"engineKind":{"type":"string","minLength":1,"maxLength":160},"nativeThreadId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"workspaceId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]}},"required":["id","threadKind","executionLocation","automationId","automationRunId","engineKind"]},{"type":"null"}]},"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"modelVariant":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"finishedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["owner_membership_lost","model_access_lost","provider_unavailable","connect_access_unavailable","execution_runtime_unavailable","execution_failed","execution_timed_out","runner_unavailable","cancelled","lease_lost","internal_error"]},"message":{"type":"string","minLength":1,"maxLength":2000},"retryable":{"type":"boolean"}},"required":["code","message","retryable"]},{"type":"null"}]},"resultSummary":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"codemodeReceiptId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"validatedResult":{},"usage":{"type":"object","properties":{"inputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"outputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["inputTokens","outputTokens","costMicros"]},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","automationId","revisionId","trigger","scheduledFor","idempotencyKey","status","leaseOwner","leaseExpiresAt","heartbeatAt","attemptCount","executionTarget","executionThread","providerId","modelId","startedAt","finishedAt","error","resultSummary","usage","createdAt","updatedAt"]},{"type":"null"}]}},"required":["automation","revision","latestRun"]}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"maxLength":160},"required":true}]}},"/v1/automations/{id}/activate":{"post":{"operationId":"activateAutomation","tags":["Automations"],"x-mcp":true,"summary":"Activate an Automation","description":"Den schedules Automations and keeps durable run history. Automations created by Desktop run on the owner's connected desktop; Automations created by Web run in OpenWork Cloud. If no desktop runner is connected when a desktop occurrence is due, that occurrence is recorded as missed. Creation makes an Automation active immediately and uses the owner's current OpenWork Connect integrations. Deactivation stops future runs but does not cancel a run already in progress.","responses":{"200":{"description":"Automation state returned.","content":{"application/json":{"schema":{"type":"object","properties":{"automation":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"organizationId":{"type":"string","minLength":1,"maxLength":160},"ownerMemberId":{"type":"string","minLength":1,"maxLength":160},"name":{"type":"string","minLength":1,"maxLength":120},"state":{"type":"string","enum":["active","inactive","needs_attention","archived"]},"currentRevisionId":{"type":"string","minLength":1,"maxLength":160},"nextDueAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"latestRunAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"latestSuccessfulRunId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"latestSuccessfulResult":{},"needsAttentionReason":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["owner_membership_lost","model_access_lost","provider_unavailable","connect_access_unavailable","execution_runtime_unavailable"]},"message":{"type":"string","minLength":1,"maxLength":2000},"occurredAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["code","message","occurredAt"]},{"type":"null"}]},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"archivedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","organizationId","ownerMemberId","name","state","currentRevisionId","nextDueAt","latestRunAt","needsAttentionReason","createdAt","updatedAt","archivedAt"]},"revision":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"automationId":{"type":"string","minLength":1,"maxLength":160},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"instructions":{"type":"string","minLength":1,"maxLength":100000},"schedule":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"once"},"timezone":{"type":"string","minLength":1,"maxLength":120},"at":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","timezone","at"]},{"type":"object","properties":{"kind":{"type":"string","const":"daily"},"timezone":{"type":"string","minLength":1,"maxLength":120},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59}},"required":["kind","timezone","hour","minute"]},{"type":"object","properties":{"kind":{"type":"string","const":"weekly"},"timezone":{"type":"string","minLength":1,"maxLength":120},"daysOfWeek":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59}},"required":["kind","timezone","daysOfWeek","hour","minute"]}]},"model":{"type":"object","properties":{"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"variant":{"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]}},"required":["providerId","modelId"]},"action":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"agent"},"instructions":{"type":"string","minLength":1,"maxLength":100000},"model":{"type":"object","properties":{"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"variant":{"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]}},"required":["providerId","modelId"]}},"required":["kind","instructions","model"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"saved_script"},"script":{"type":"object","properties":{"pluginId":{"type":"string","minLength":1,"maxLength":160},"configObjectId":{"type":"string","minLength":1,"maxLength":160},"configObjectVersionId":{"type":"string","minLength":1,"maxLength":160}},"required":["pluginId","configObjectId","configObjectVersionId"],"additionalProperties":false},"input":{}},"required":["kind","script"],"additionalProperties":false}]},"executionTarget":{"type":"string","enum":["desktop","cloud"]},"maximumRuntimeMs":{"type":"integer","minimum":10000,"maximum":3600000},"digest":{"type":"string","minLength":16,"maxLength":128},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","automationId","version","instructions","schedule","model","maximumRuntimeMs","digest","createdAt"]},"latestRun":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"automationId":{"type":"string","minLength":1,"maxLength":160},"revisionId":{"type":"string","minLength":1,"maxLength":160},"trigger":{"type":"string","enum":["scheduled","recovery","manual"]},"scheduledFor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"idempotencyKey":{"type":"string","minLength":1,"maxLength":512},"status":{"type":"string","enum":["queued","claimed","running","succeeded","failed","cancelled","skipped"]},"leaseOwner":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"null"}]},"leaseExpiresAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"heartbeatAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"attemptCount":{"type":"integer","minimum":0,"maximum":2},"executionTarget":{"type":"string","enum":["desktop","cloud"]},"executionThread":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"threadKind":{"type":"string","const":"automation"},"executionLocation":{"type":"string","enum":["desktop","cloud"]},"automationId":{"type":"string","minLength":1,"maxLength":160},"automationRunId":{"type":"string","minLength":1,"maxLength":160},"engineKind":{"type":"string","minLength":1,"maxLength":160},"nativeThreadId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"workspaceId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]}},"required":["id","threadKind","executionLocation","automationId","automationRunId","engineKind"]},{"type":"null"}]},"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"modelVariant":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"finishedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["owner_membership_lost","model_access_lost","provider_unavailable","connect_access_unavailable","execution_runtime_unavailable","execution_failed","execution_timed_out","runner_unavailable","cancelled","lease_lost","internal_error"]},"message":{"type":"string","minLength":1,"maxLength":2000},"retryable":{"type":"boolean"}},"required":["code","message","retryable"]},{"type":"null"}]},"resultSummary":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"codemodeReceiptId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"validatedResult":{},"usage":{"type":"object","properties":{"inputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"outputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["inputTokens","outputTokens","costMicros"]},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","automationId","revisionId","trigger","scheduledFor","idempotencyKey","status","leaseOwner","leaseExpiresAt","heartbeatAt","attemptCount","executionTarget","executionThread","providerId","modelId","startedAt","finishedAt","error","resultSummary","usage","createdAt","updatedAt"]},{"type":"null"}]}},"required":["automation","revision","latestRun"]}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"maxLength":160},"required":true}]}},"/v1/automations/{id}/deactivate":{"post":{"operationId":"deactivateAutomation","tags":["Automations"],"x-mcp":true,"summary":"Deactivate an Automation","description":"Den schedules Automations and keeps durable run history. Automations created by Desktop run on the owner's connected desktop; Automations created by Web run in OpenWork Cloud. If no desktop runner is connected when a desktop occurrence is due, that occurrence is recorded as missed. Creation makes an Automation active immediately and uses the owner's current OpenWork Connect integrations. Deactivation stops future runs but does not cancel a run already in progress.","responses":{"200":{"description":"Automation state returned.","content":{"application/json":{"schema":{"type":"object","properties":{"automation":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"organizationId":{"type":"string","minLength":1,"maxLength":160},"ownerMemberId":{"type":"string","minLength":1,"maxLength":160},"name":{"type":"string","minLength":1,"maxLength":120},"state":{"type":"string","enum":["active","inactive","needs_attention","archived"]},"currentRevisionId":{"type":"string","minLength":1,"maxLength":160},"nextDueAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"latestRunAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"latestSuccessfulRunId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"latestSuccessfulResult":{},"needsAttentionReason":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["owner_membership_lost","model_access_lost","provider_unavailable","connect_access_unavailable","execution_runtime_unavailable"]},"message":{"type":"string","minLength":1,"maxLength":2000},"occurredAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["code","message","occurredAt"]},{"type":"null"}]},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"archivedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","organizationId","ownerMemberId","name","state","currentRevisionId","nextDueAt","latestRunAt","needsAttentionReason","createdAt","updatedAt","archivedAt"]},"revision":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"automationId":{"type":"string","minLength":1,"maxLength":160},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"instructions":{"type":"string","minLength":1,"maxLength":100000},"schedule":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"once"},"timezone":{"type":"string","minLength":1,"maxLength":120},"at":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","timezone","at"]},{"type":"object","properties":{"kind":{"type":"string","const":"daily"},"timezone":{"type":"string","minLength":1,"maxLength":120},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59}},"required":["kind","timezone","hour","minute"]},{"type":"object","properties":{"kind":{"type":"string","const":"weekly"},"timezone":{"type":"string","minLength":1,"maxLength":120},"daysOfWeek":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59}},"required":["kind","timezone","daysOfWeek","hour","minute"]}]},"model":{"type":"object","properties":{"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"variant":{"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]}},"required":["providerId","modelId"]},"action":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"agent"},"instructions":{"type":"string","minLength":1,"maxLength":100000},"model":{"type":"object","properties":{"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"variant":{"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]}},"required":["providerId","modelId"]}},"required":["kind","instructions","model"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"saved_script"},"script":{"type":"object","properties":{"pluginId":{"type":"string","minLength":1,"maxLength":160},"configObjectId":{"type":"string","minLength":1,"maxLength":160},"configObjectVersionId":{"type":"string","minLength":1,"maxLength":160}},"required":["pluginId","configObjectId","configObjectVersionId"],"additionalProperties":false},"input":{}},"required":["kind","script"],"additionalProperties":false}]},"executionTarget":{"type":"string","enum":["desktop","cloud"]},"maximumRuntimeMs":{"type":"integer","minimum":10000,"maximum":3600000},"digest":{"type":"string","minLength":16,"maxLength":128},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","automationId","version","instructions","schedule","model","maximumRuntimeMs","digest","createdAt"]},"latestRun":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"automationId":{"type":"string","minLength":1,"maxLength":160},"revisionId":{"type":"string","minLength":1,"maxLength":160},"trigger":{"type":"string","enum":["scheduled","recovery","manual"]},"scheduledFor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"idempotencyKey":{"type":"string","minLength":1,"maxLength":512},"status":{"type":"string","enum":["queued","claimed","running","succeeded","failed","cancelled","skipped"]},"leaseOwner":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"null"}]},"leaseExpiresAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"heartbeatAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"attemptCount":{"type":"integer","minimum":0,"maximum":2},"executionTarget":{"type":"string","enum":["desktop","cloud"]},"executionThread":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"threadKind":{"type":"string","const":"automation"},"executionLocation":{"type":"string","enum":["desktop","cloud"]},"automationId":{"type":"string","minLength":1,"maxLength":160},"automationRunId":{"type":"string","minLength":1,"maxLength":160},"engineKind":{"type":"string","minLength":1,"maxLength":160},"nativeThreadId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"workspaceId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]}},"required":["id","threadKind","executionLocation","automationId","automationRunId","engineKind"]},{"type":"null"}]},"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"modelVariant":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"finishedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["owner_membership_lost","model_access_lost","provider_unavailable","connect_access_unavailable","execution_runtime_unavailable","execution_failed","execution_timed_out","runner_unavailable","cancelled","lease_lost","internal_error"]},"message":{"type":"string","minLength":1,"maxLength":2000},"retryable":{"type":"boolean"}},"required":["code","message","retryable"]},{"type":"null"}]},"resultSummary":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"codemodeReceiptId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"validatedResult":{},"usage":{"type":"object","properties":{"inputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"outputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["inputTokens","outputTokens","costMicros"]},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","automationId","revisionId","trigger","scheduledFor","idempotencyKey","status","leaseOwner","leaseExpiresAt","heartbeatAt","attemptCount","executionTarget","executionThread","providerId","modelId","startedAt","finishedAt","error","resultSummary","usage","createdAt","updatedAt"]},{"type":"null"}]}},"required":["automation","revision","latestRun"]}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"maxLength":160},"required":true}]}},"/v1/automations/{id}/run":{"post":{"operationId":"runAutomationNow","tags":["Automations"],"x-mcp":true,"summary":"Run an Automation now","description":"Den schedules Automations and keeps durable run history. Automations created by Desktop run on the owner's connected desktop; Automations created by Web run in OpenWork Cloud. If no desktop runner is connected when a desktop occurrence is due, that occurrence is recorded as missed. Creation makes an Automation active immediately and uses the owner's current OpenWork Connect integrations. Deactivation stops future runs but does not cancel a run already in progress.","responses":{"202":{"description":"Run queued.","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"automationId":{"type":"string","minLength":1,"maxLength":160},"revisionId":{"type":"string","minLength":1,"maxLength":160},"trigger":{"type":"string","enum":["scheduled","recovery","manual"]},"scheduledFor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"idempotencyKey":{"type":"string","minLength":1,"maxLength":512},"status":{"type":"string","enum":["queued","claimed","running","succeeded","failed","cancelled","skipped"]},"leaseOwner":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"null"}]},"leaseExpiresAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"heartbeatAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"attemptCount":{"type":"integer","minimum":0,"maximum":2},"executionTarget":{"type":"string","enum":["desktop","cloud"]},"executionThread":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"threadKind":{"type":"string","const":"automation"},"executionLocation":{"type":"string","enum":["desktop","cloud"]},"automationId":{"type":"string","minLength":1,"maxLength":160},"automationRunId":{"type":"string","minLength":1,"maxLength":160},"engineKind":{"type":"string","minLength":1,"maxLength":160},"nativeThreadId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"workspaceId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]}},"required":["id","threadKind","executionLocation","automationId","automationRunId","engineKind"]},{"type":"null"}]},"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"modelVariant":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"finishedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["owner_membership_lost","model_access_lost","provider_unavailable","connect_access_unavailable","execution_runtime_unavailable","execution_failed","execution_timed_out","runner_unavailable","cancelled","lease_lost","internal_error"]},"message":{"type":"string","minLength":1,"maxLength":2000},"retryable":{"type":"boolean"}},"required":["code","message","retryable"]},{"type":"null"}]},"resultSummary":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"codemodeReceiptId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"validatedResult":{},"usage":{"type":"object","properties":{"inputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"outputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["inputTokens","outputTokens","costMicros"]},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","automationId","revisionId","trigger","scheduledFor","idempotencyKey","status","leaseOwner","leaseExpiresAt","heartbeatAt","attemptCount","executionTarget","executionThread","providerId","modelId","startedAt","finishedAt","error","resultSummary","usage","createdAt","updatedAt"]}},"required":["run"]}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"maxLength":160},"required":true}]}},"/v1/automations/{id}/runs":{"get":{"operationId":"listAutomationRuns","tags":["Automations"],"x-mcp":true,"summary":"List Automation runs","description":"Den schedules Automations and keeps durable run history. Automations created by Desktop run on the owner's connected desktop; Automations created by Web run in OpenWork Cloud. If no desktop runner is connected when a desktop occurrence is due, that occurrence is recorded as missed. Creation makes an Automation active immediately and uses the owner's current OpenWork Connect integrations. Deactivation stops future runs but does not cancel a run already in progress.","responses":{"200":{"description":"Run history returned.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"automationId":{"type":"string","minLength":1,"maxLength":160},"revisionId":{"type":"string","minLength":1,"maxLength":160},"trigger":{"type":"string","enum":["scheduled","recovery","manual"]},"scheduledFor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"idempotencyKey":{"type":"string","minLength":1,"maxLength":512},"status":{"type":"string","enum":["queued","claimed","running","succeeded","failed","cancelled","skipped"]},"leaseOwner":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"null"}]},"leaseExpiresAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"heartbeatAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"attemptCount":{"type":"integer","minimum":0,"maximum":2},"executionTarget":{"type":"string","enum":["desktop","cloud"]},"executionThread":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"threadKind":{"type":"string","const":"automation"},"executionLocation":{"type":"string","enum":["desktop","cloud"]},"automationId":{"type":"string","minLength":1,"maxLength":160},"automationRunId":{"type":"string","minLength":1,"maxLength":160},"engineKind":{"type":"string","minLength":1,"maxLength":160},"nativeThreadId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"workspaceId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]}},"required":["id","threadKind","executionLocation","automationId","automationRunId","engineKind"]},{"type":"null"}]},"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"modelVariant":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"finishedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["owner_membership_lost","model_access_lost","provider_unavailable","connect_access_unavailable","execution_runtime_unavailable","execution_failed","execution_timed_out","runner_unavailable","cancelled","lease_lost","internal_error"]},"message":{"type":"string","minLength":1,"maxLength":2000},"retryable":{"type":"boolean"}},"required":["code","message","retryable"]},{"type":"null"}]},"resultSummary":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"codemodeReceiptId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"validatedResult":{},"usage":{"type":"object","properties":{"inputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"outputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["inputTokens","outputTokens","costMicros"]},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","automationId","revisionId","trigger","scheduledFor","idempotencyKey","status","leaseOwner","leaseExpiresAt","heartbeatAt","attemptCount","executionTarget","executionThread","providerId","modelId","startedAt","finishedAt","error","resultSummary","usage","createdAt","updatedAt"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"maxLength":160},"required":true},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":160}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}}]}},"/v1/automation-runs/{id}":{"get":{"operationId":"getAutomationRun","tags":["Automations"],"x-mcp":true,"summary":"Inspect an Automation run receipt and execution thread","description":"Den schedules Automations and keeps durable run history. Automations created by Desktop run on the owner's connected desktop; Automations created by Web run in OpenWork Cloud. If no desktop runner is connected when a desktop occurrence is due, that occurrence is recorded as missed. Creation makes an Automation active immediately and uses the owner's current OpenWork Connect integrations. Deactivation stops future runs but does not cancel a run already in progress.","responses":{"200":{"description":"Durable run receipt returned.","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"automationId":{"type":"string","minLength":1,"maxLength":160},"revisionId":{"type":"string","minLength":1,"maxLength":160},"trigger":{"type":"string","enum":["scheduled","recovery","manual"]},"scheduledFor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"idempotencyKey":{"type":"string","minLength":1,"maxLength":512},"status":{"type":"string","enum":["queued","claimed","running","succeeded","failed","cancelled","skipped"]},"leaseOwner":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"null"}]},"leaseExpiresAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"heartbeatAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"attemptCount":{"type":"integer","minimum":0,"maximum":2},"executionTarget":{"type":"string","enum":["desktop","cloud"]},"executionThread":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"threadKind":{"type":"string","const":"automation"},"executionLocation":{"type":"string","enum":["desktop","cloud"]},"automationId":{"type":"string","minLength":1,"maxLength":160},"automationRunId":{"type":"string","minLength":1,"maxLength":160},"engineKind":{"type":"string","minLength":1,"maxLength":160},"nativeThreadId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"workspaceId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]}},"required":["id","threadKind","executionLocation","automationId","automationRunId","engineKind"]},{"type":"null"}]},"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"modelVariant":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"finishedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["owner_membership_lost","model_access_lost","provider_unavailable","connect_access_unavailable","execution_runtime_unavailable","execution_failed","execution_timed_out","runner_unavailable","cancelled","lease_lost","internal_error"]},"message":{"type":"string","minLength":1,"maxLength":2000},"retryable":{"type":"boolean"}},"required":["code","message","retryable"]},{"type":"null"}]},"resultSummary":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"codemodeReceiptId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"validatedResult":{},"usage":{"type":"object","properties":{"inputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"outputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["inputTokens","outputTokens","costMicros"]},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","automationId","revisionId","trigger","scheduledFor","idempotencyKey","status","leaseOwner","leaseExpiresAt","heartbeatAt","attemptCount","executionTarget","executionThread","providerId","modelId","startedAt","finishedAt","error","resultSummary","usage","createdAt","updatedAt"]},"automation":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"organizationId":{"type":"string","minLength":1,"maxLength":160},"ownerMemberId":{"type":"string","minLength":1,"maxLength":160},"name":{"type":"string","minLength":1,"maxLength":120},"state":{"type":"string","enum":["active","inactive","needs_attention","archived"]},"currentRevisionId":{"type":"string","minLength":1,"maxLength":160},"nextDueAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"latestRunAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"latestSuccessfulRunId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"latestSuccessfulResult":{},"needsAttentionReason":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["owner_membership_lost","model_access_lost","provider_unavailable","connect_access_unavailable","execution_runtime_unavailable"]},"message":{"type":"string","minLength":1,"maxLength":2000},"occurredAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["code","message","occurredAt"]},{"type":"null"}]},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"archivedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","organizationId","ownerMemberId","name","state","currentRevisionId","nextDueAt","latestRunAt","needsAttentionReason","createdAt","updatedAt","archivedAt"]},"revision":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"automationId":{"type":"string","minLength":1,"maxLength":160},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"instructions":{"type":"string","minLength":1,"maxLength":100000},"schedule":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"once"},"timezone":{"type":"string","minLength":1,"maxLength":120},"at":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","timezone","at"]},{"type":"object","properties":{"kind":{"type":"string","const":"daily"},"timezone":{"type":"string","minLength":1,"maxLength":120},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59}},"required":["kind","timezone","hour","minute"]},{"type":"object","properties":{"kind":{"type":"string","const":"weekly"},"timezone":{"type":"string","minLength":1,"maxLength":120},"daysOfWeek":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59}},"required":["kind","timezone","daysOfWeek","hour","minute"]}]},"model":{"type":"object","properties":{"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"variant":{"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]}},"required":["providerId","modelId"]},"action":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"agent"},"instructions":{"type":"string","minLength":1,"maxLength":100000},"model":{"type":"object","properties":{"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"variant":{"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]}},"required":["providerId","modelId"]}},"required":["kind","instructions","model"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"saved_script"},"script":{"type":"object","properties":{"pluginId":{"type":"string","minLength":1,"maxLength":160},"configObjectId":{"type":"string","minLength":1,"maxLength":160},"configObjectVersionId":{"type":"string","minLength":1,"maxLength":160}},"required":["pluginId","configObjectId","configObjectVersionId"],"additionalProperties":false},"input":{}},"required":["kind","script"],"additionalProperties":false}]},"executionTarget":{"type":"string","enum":["desktop","cloud"]},"maximumRuntimeMs":{"type":"integer","minimum":10000,"maximum":3600000},"digest":{"type":"string","minLength":16,"maxLength":128},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","automationId","version","instructions","schedule","model","maximumRuntimeMs","digest","createdAt"]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"runId":{"type":"string","minLength":1,"maxLength":160},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"sequence":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["user","assistant","capability_search","capability_execution","usage","warning","terminal"]},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","runId","attempt","sequence","type","payload","createdAt"]}}},"required":["run","automation","revision","events"]}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"maxLength":160},"required":true}]}},"/v1/automation-runs/{id}/cancel":{"post":{"operationId":"cancelAutomationRun","tags":["Automations"],"x-mcp":true,"summary":"Cancel an active Automation run","description":"Den schedules Automations and keeps durable run history. Automations created by Desktop run on the owner's connected desktop; Automations created by Web run in OpenWork Cloud. If no desktop runner is connected when a desktop occurrence is due, that occurrence is recorded as missed. Creation makes an Automation active immediately and uses the owner's current OpenWork Connect integrations. Deactivation stops future runs but does not cancel a run already in progress.","responses":{"200":{"description":"Cancellation requested.","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"automationId":{"type":"string","minLength":1,"maxLength":160},"revisionId":{"type":"string","minLength":1,"maxLength":160},"trigger":{"type":"string","enum":["scheduled","recovery","manual"]},"scheduledFor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"idempotencyKey":{"type":"string","minLength":1,"maxLength":512},"status":{"type":"string","enum":["queued","claimed","running","succeeded","failed","cancelled","skipped"]},"leaseOwner":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"null"}]},"leaseExpiresAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"heartbeatAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"attemptCount":{"type":"integer","minimum":0,"maximum":2},"executionTarget":{"type":"string","enum":["desktop","cloud"]},"executionThread":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"threadKind":{"type":"string","const":"automation"},"executionLocation":{"type":"string","enum":["desktop","cloud"]},"automationId":{"type":"string","minLength":1,"maxLength":160},"automationRunId":{"type":"string","minLength":1,"maxLength":160},"engineKind":{"type":"string","minLength":1,"maxLength":160},"nativeThreadId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"workspaceId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]}},"required":["id","threadKind","executionLocation","automationId","automationRunId","engineKind"]},{"type":"null"}]},"providerId":{"type":"string","minLength":1,"maxLength":160},"modelId":{"type":"string","minLength":1,"maxLength":160},"modelVariant":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"finishedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["owner_membership_lost","model_access_lost","provider_unavailable","connect_access_unavailable","execution_runtime_unavailable","execution_failed","execution_timed_out","runner_unavailable","cancelled","lease_lost","internal_error"]},"message":{"type":"string","minLength":1,"maxLength":2000},"retryable":{"type":"boolean"}},"required":["code","message","retryable"]},{"type":"null"}]},"resultSummary":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"codemodeReceiptId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"validatedResult":{},"usage":{"type":"object","properties":{"inputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"outputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["inputTokens","outputTokens","costMicros"]},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","automationId","revisionId","trigger","scheduledFor","idempotencyKey","status","leaseOwner","leaseExpiresAt","heartbeatAt","attemptCount","executionTarget","executionThread","providerId","modelId","startedAt","finishedAt","error","resultSummary","usage","createdAt","updatedAt"]}},"required":["run"]}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"maxLength":160},"required":true}]}},"/v1/org":{"patch":{"operationId":"patchV1Org","tags":["Organizations"],"summary":"Update organization","description":"Updates organization fields. Workspace owners and super-admins can change settings. The slug is immutable to avoid breaking dashboard URLs.","responses":{"200":{"description":"Organization updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponse"}}}},"400":{"description":"The organization update request body was invalid, contained malformed email domains, or contained an invalid brand icon URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrganizationBadRequest"}}}},"401":{"description":"The caller must be signed in to update an organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"402":{"description":"Enabling enforced SSO or desktop version controls requires an Enterprise plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterprisePlanRequiredError"}}}},"403":{"description":"The caller does not have permission to update the requested organization fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":120},"allowedEmailDomains":{"anyOf":[{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}},{"type":"null"}]},"allowedDesktopVersions":{"anyOf":[{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":32}},{"type":"null"}]},"requireSso":{"type":"boolean"},"brandAppName":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"brandLogoUrl":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"brandIconUrl":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"brandAccentColor":{"anyOf":[{"type":"string","minLength":1,"maxLength":32},{"type":"null"}]}}}}}}},"get":{"operationId":"getV1Org","tags":["Organizations"],"summary":"Get active organization","description":"Returns the active organization from the current session, including its owner, the current member record, and their team memberships.","responses":{"200":{"description":"Organization context returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationContextResponse"}}}},"401":{"description":"The caller must be signed in to load organization context.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"query","name":"refreshRoles","schema":{"type":"string","enum":["true","false"]}}]},"delete":{"operationId":"deleteV1Org","tags":["Organizations"],"summary":"Delete organization","description":"Permanently deletes the active organization and its organization-scoped data. Owners must have a fresh privileged session.","responses":{"200":{"description":"Organization deleted successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteOrganizationResponse"}}}},"401":{"description":"The caller must be signed in to delete an organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners with a fresh privileged session can delete organizations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/orgs/invitations/preview":{"get":{"operationId":"getV1OrgsInvitationsPreview","tags":["Invitations"],"summary":"Preview organization invitation","description":"Returns invitation preview details so a user can inspect an organization invite before accepting it.","responses":{"200":{"description":"Invitation preview returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationPreviewResponse"}}}},"400":{"description":"The invitation preview query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"404":{"description":"The invitation could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"query","name":"id","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/v1/orgs/invitations/accept":{"post":{"operationId":"postV1OrgsInvitationsAccept","tags":["Invitations"],"summary":"Accept organization invitation","description":"Accepts an organization invitation for the current signed-in user and switches their active organization to the accepted workspace.","responses":{"200":{"description":"Invitation accepted successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationAcceptedResponse"}}}},"400":{"description":"The invitation acceptance request body was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to accept an invitation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"API keys cannot accept invitations, or the deployment requires a verified account email.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The invitation could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"The account cannot join this organization.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AccountEmailDomainNotAllowedError"},{"$ref":"#/components/schemas/ScimDeprovisionedError"}]}}}},"410":{"description":"The user previously accepted this invitation, but their workspace access was removed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MembershipRemovedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":255}},"required":["id"]}}}}}},"/v1/api-keys":{"get":{"operationId":"getV1ApiKeys","tags":["API Keys"],"summary":"List organization API keys","description":"Returns the API keys that belong to the selected organization.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Organization API keys","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationApiKeyListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can list API keys.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationApiKeyForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationNotFoundError"}}}}}},"post":{"operationId":"postV1ApiKeys","tags":["API Keys"],"summary":"Create an organization API key","description":"Creates a new API key for the selected organization.","security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Organization API key created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationApiKeyResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can create API keys.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationApiKeyForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationNotFoundError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationApiKeyRequest"}}}}}},"/v1/brand-assets/{organizationId}/{kind}/{version}":{"get":{"operationId":"getV1BrandAssetsByOrganizationIdByKindByVersion","tags":["Organizations"],"summary":"Read an immutable organization brand asset","description":"Serves a capability-signed, content-addressed organization logo or app icon from this Den deployment.","responses":{"200":{"description":"Immutable brand image bytes."},"404":{"description":"The managed brand asset could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"organizationId","required":true},{"schema":{"type":"string"},"in":"path","name":"kind","required":true},{"schema":{"type":"string"},"in":"path","name":"version","required":true}]}},"/v1/org/brand-assets":{"post":{"operationId":"postV1OrgBrandAssets","tags":["Organizations"],"summary":"Upload organization brand assets","description":"Validates and stores owner-supplied wordmark and app icon files inside the Den deployment.","responses":{"200":{"description":"Managed brand assets were saved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedBrandAssetUploadResponse"}}}},"400":{"description":"A supplied brand asset was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidManagedBrandAssetError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can upload brand assets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"413":{"description":"The upload exceeded the request size limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidManagedBrandAssetError"}}}}}}},"/v1/workflow-runs":{"get":{"operationId":"getV1WorkflowRuns","tags":["Workflow Runs"],"summary":"List Workflow runs","description":"Lists Workflow run receipts visible to the active organization member.","responses":{"200":{"description":"Workflow runs returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRunListResponse"}}}},"400":{"description":"The Workflow run list query was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list Workflow runs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"parameters":[{"in":"query","name":"limit","schema":{"default":50,"type":"integer","minimum":1,"maximum":200}}]}},"/v1/workflows":{"get":{"operationId":"getV1Workflows","tags":["Workflows"],"summary":"List accessible Workflows","responses":{"200":{"description":"Workflows returned.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"pluginId":{"type":"string"},"configObjectId":{"type":"string"},"configObjectVersionId":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"inputSchema":{"anyOf":[{},{"type":"null"}]},"outputSchema":{"anyOf":[{},{"type":"null"}]},"requiredCapabilities":{"type":"array","items":{"type":"object","properties":{"capabilityName":{"type":"string"},"scriptPath":{"type":"string"}},"required":["capabilityName","scriptPath"]}}},"required":["pluginId","configObjectId","configObjectVersionId","title","description","inputSchema","outputSchema","requiredCapabilities"]}}},"required":["items"]}}}},"401":{"description":"Sign-in required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}},"post":{"operationId":"saveWorkflow","tags":["Workflows"],"summary":"Save a successful Code Mode run as a Workflow inside an OpenWork Connect Plugin","responses":{"201":{"description":"Workflow saved.","content":{"application/json":{"schema":{"type":"object","properties":{"pluginId":{"type":"string"},"configObjectId":{"type":"string"},"configObjectVersionId":{"type":"string"}},"required":["pluginId","configObjectId","configObjectVersionId"]}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"403":{"description":"The caller cannot add Workflows to this Plugin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Plugin not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pluginId":{"description":"Existing OpenWork Connect Plugin that will contain and share this Workflow. Omit to use the member's private My Workflows Plugin.","type":"string","minLength":1,"maxLength":160},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":4000},"code":{"type":"string","minLength":1,"maxLength":200000},"currentInput":{},"inputSchema":{},"outputSchema":{"description":"Optional JSON Schema for the value returned by this Workflow."}},"required":["name","code"]}}}}}},"/v1/workflows/{configObjectId}":{"get":{"operationId":"getV1WorkflowsByConfigObjectId","tags":["Workflows"],"summary":"Inspect a Workflow","responses":{"200":{"description":"Workflow returned.","content":{"application/json":{"schema":{"type":"object","properties":{"workflow":{"type":"object","properties":{"type":{"type":"string","const":"workflow"},"id":{"type":"string"},"plugin":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},{"type":"null"}]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"string","enum":["viewer","editor","manager"]},"edges":{"type":"array","items":{}},"state":{"type":"string","enum":["ready","needs_signin","needs_admin_setup"]},"resultState":{"type":"string","enum":["never_run","fresh","stale","needs_attention"]},"latestSuccessfulAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"viewState":{"type":"string","enum":["default","custom_active","build_failed","retired"]},"activeViewTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"automationCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["created","installed_template"]},"templateName":{"type":"string"},"templateVersion":{"type":"string"}},"required":["kind"]}},"required":["type","id","plugin","name","description","role","edges","state","resultState","latestSuccessfulAt","viewState","activeViewTitle","automationCount","source"]},"script":{"type":"object","properties":{"pluginId":{"type":"string","minLength":1,"maxLength":160},"configObjectId":{"type":"string","minLength":1,"maxLength":160},"title":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"canRun":{"type":"boolean"},"canManage":{"type":"boolean"},"currentVersion":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"inputSchema":{"anyOf":[{},{"type":"null"}]},"outputSchema":{"anyOf":[{},{"type":"null"}]},"exampleInput":{"anyOf":[{},{"type":"null"}]},"requiredCapabilities":{"type":"array","items":{"type":"object","properties":{"capabilityName":{"type":"string","minLength":1,"maxLength":255},"scriptPath":{"type":"string","minLength":1,"maxLength":255}},"required":["capabilityName","scriptPath"]}},"codeDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"inputSchemaDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"outputSchemaDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"automationReferences":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"name":{"type":"string","minLength":1,"maxLength":120},"state":{"type":"string","enum":["active","inactive","needs_attention","archived"]},"configObjectVersionId":{"type":"string","minLength":1,"maxLength":160},"input":{}},"required":["id","name","state","configObjectVersionId"]}}},"required":["id","code","inputSchema","outputSchema","requiredCapabilities","codeDigest","inputSchemaDigest","outputSchemaDigest","createdAt","automationReferences"]},"versions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"inputSchema":{"anyOf":[{},{"type":"null"}]},"outputSchema":{"anyOf":[{},{"type":"null"}]},"exampleInput":{"anyOf":[{},{"type":"null"}]},"requiredCapabilities":{"type":"array","items":{"type":"object","properties":{"capabilityName":{"type":"string","minLength":1,"maxLength":255},"scriptPath":{"type":"string","minLength":1,"maxLength":255}},"required":["capabilityName","scriptPath"]}},"codeDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"inputSchemaDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"outputSchemaDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"automationReferences":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"name":{"type":"string","minLength":1,"maxLength":120},"state":{"type":"string","enum":["active","inactive","needs_attention","archived"]},"configObjectVersionId":{"type":"string","minLength":1,"maxLength":160},"input":{}},"required":["id","name","state","configObjectVersionId"]}}},"required":["id","code","inputSchema","outputSchema","requiredCapabilities","codeDigest","inputSchemaDigest","outputSchemaDigest","createdAt","automationReferences"]}},"latestSnapshot":{"anyOf":[{"type":"object","properties":{"receiptId":{"type":"string","minLength":1,"maxLength":160},"pluginId":{"type":"string","minLength":1,"maxLength":160},"configObjectId":{"type":"string","minLength":1,"maxLength":160},"configObjectVersionId":{"type":"string","minLength":1,"maxLength":160},"automationRunId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"value":{"anyOf":[{},{"type":"null"}]},"markdown":{"anyOf":[{"type":"string"},{"type":"null"}]},"codeDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"resultDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"inputSchemaDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"outputSchemaDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"rendererVersion":{"anyOf":[{"type":"string","const":"codemode-markdown-v1"},{"type":"null"}]},"status":{"type":"string","enum":["succeeded","failed"]},"errorKind":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"type":"string","enum":["manual","scheduled"]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"finishedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"contentDeletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["receiptId","pluginId","configObjectId","configObjectVersionId","automationRunId","value","markdown","codeDigest","resultDigest","inputSchemaDigest","outputSchemaDigest","rendererVersion","status","errorKind","errorMessage","source","startedAt","finishedAt","contentDeletedAt"]},{"type":"null"}]},"latestSuccessfulSnapshot":{"anyOf":[{"type":"object","properties":{"receiptId":{"type":"string","minLength":1,"maxLength":160},"pluginId":{"type":"string","minLength":1,"maxLength":160},"configObjectId":{"type":"string","minLength":1,"maxLength":160},"configObjectVersionId":{"type":"string","minLength":1,"maxLength":160},"automationRunId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"value":{"anyOf":[{},{"type":"null"}]},"markdown":{"anyOf":[{"type":"string"},{"type":"null"}]},"codeDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"resultDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"inputSchemaDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"outputSchemaDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"rendererVersion":{"anyOf":[{"type":"string","const":"codemode-markdown-v1"},{"type":"null"}]},"status":{"type":"string","enum":["succeeded","failed"]},"errorKind":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"type":"string","enum":["manual","scheduled"]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"finishedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"contentDeletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["receiptId","pluginId","configObjectId","configObjectVersionId","automationRunId","value","markdown","codeDigest","resultDigest","inputSchemaDigest","outputSchemaDigest","rendererVersion","status","errorKind","errorMessage","source","startedAt","finishedAt","contentDeletedAt"]},{"type":"null"}]},"freshness":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"never_run"}},"required":["state"]},{"type":"object","properties":{"state":{"type":"string","const":"fresh"},"ageMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["state","ageMs"]},{"type":"object","properties":{"state":{"type":"string","const":"stale"},"ageMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"maxAgeMs":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["state","ageMs","maxAgeMs"]},{"type":"object","properties":{"state":{"type":"string","const":"needs_attention"},"ageMs":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"lastSuccessfulReceiptId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"reason":{"type":"string","minLength":1,"maxLength":2000}},"required":["state","ageMs","lastSuccessfulReceiptId","reason"]}]}},"required":["pluginId","configObjectId","title","description","canRun","canManage","currentVersion","versions","latestSnapshot","latestSuccessfulSnapshot","freshness"]},"views":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"configObjectId":{"type":"string","minLength":1,"maxLength":160},"title":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"status":{"type":"string","enum":["active","retired"]},"activeRevisionId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"revisions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"artifactViewId":{"type":"string","minLength":1,"maxLength":160},"resourceUri":{"type":"string","pattern":"^ui:\\/\\/openwork\\/artifacts\\/.*"},"buildStatus":{"type":"string","enum":["ready","failed"]},"sourceDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"resourceDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"outputSchemaDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"csp":{"type":"object","properties":{"connectDomains":{"minItems":0,"maxItems":0,"type":"array","items":{"type":"string"}},"resourceDomains":{"minItems":0,"maxItems":0,"type":"array","items":{"type":"string"}},"frameDomains":{"minItems":0,"maxItems":0,"type":"array","items":{"type":"string"}},"baseUriDomains":{"minItems":0,"maxItems":0,"type":"array","items":{"type":"string"}}},"required":["connectDomains","resourceDomains","frameDomains","baseUriDomains"]},"diagnostics":{"type":"array","items":{"type":"object","properties":{"level":{"type":"string","enum":["error","warning"]},"message":{"type":"string","minLength":1,"maxLength":4000},"line":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"column":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["level","message","line","column"]}},"compilerName":{"type":"string","minLength":1},"compilerVersion":{"type":"string","minLength":1},"reactVersion":{"type":"string","minLength":1},"compiledHtmlBytes":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"retiredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","artifactViewId","resourceUri","buildStatus","sourceDigest","resourceDigest","outputSchemaDigest","csp","diagnostics","compilerName","compilerVersion","reactVersion","compiledHtmlBytes","retiredAt","createdAt"]}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","configObjectId","title","description","status","activeRevisionId","revisions","createdAt","updatedAt"]}}},"required":["workflow","script","views"]}}}},"404":{"description":"Workflow not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"query","name":"maxAgeMs","schema":{"type":"integer","minimum":60000,"maximum":2592000000}},{"schema":{"type":"string"},"in":"path","name":"configObjectId","required":true}]}},"/v1/workflows/{configObjectId}/views":{"get":{"operationId":"getV1WorkflowsByConfigObjectIdViews","tags":["Workflows"],"summary":"List generated Artifact views for a Workflow","responses":{"200":{"description":"Artifact views returned.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"configObjectId":{"type":"string","minLength":1,"maxLength":160},"title":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"status":{"type":"string","enum":["active","retired"]},"activeRevisionId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"revisions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"artifactViewId":{"type":"string","minLength":1,"maxLength":160},"resourceUri":{"type":"string","pattern":"^ui:\\/\\/openwork\\/artifacts\\/.*"},"buildStatus":{"type":"string","enum":["ready","failed"]},"sourceDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"resourceDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"outputSchemaDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"csp":{"type":"object","properties":{"connectDomains":{"minItems":0,"maxItems":0,"type":"array","items":{"type":"string"}},"resourceDomains":{"minItems":0,"maxItems":0,"type":"array","items":{"type":"string"}},"frameDomains":{"minItems":0,"maxItems":0,"type":"array","items":{"type":"string"}},"baseUriDomains":{"minItems":0,"maxItems":0,"type":"array","items":{"type":"string"}}},"required":["connectDomains","resourceDomains","frameDomains","baseUriDomains"]},"diagnostics":{"type":"array","items":{"type":"object","properties":{"level":{"type":"string","enum":["error","warning"]},"message":{"type":"string","minLength":1,"maxLength":4000},"line":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"column":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["level","message","line","column"]}},"compilerName":{"type":"string","minLength":1},"compilerVersion":{"type":"string","minLength":1},"reactVersion":{"type":"string","minLength":1},"compiledHtmlBytes":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"retiredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","artifactViewId","resourceUri","buildStatus","sourceDigest","resourceDigest","outputSchemaDigest","csp","diagnostics","compilerName","compilerVersion","reactVersion","compiledHtmlBytes","retiredAt","createdAt"]}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","configObjectId","title","description","status","activeRevisionId","revisions","createdAt","updatedAt"]}}},"required":["items"]}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"configObjectId","required":true}]}},"/v1/artifact-views/{artifactViewId}/revisions/{revisionId}/activate":{"post":{"operationId":"postV1ArtifactViewsByArtifactViewIdRevisionsByRevisionIdActivate","tags":["Codemode Runs"],"summary":"Activate or roll back an immutable Artifact view revision","responses":{"200":{"description":"Artifact view activated.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"configObjectId":{"type":"string","minLength":1,"maxLength":160},"title":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"status":{"type":"string","enum":["active","retired"]},"activeRevisionId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"revisions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"artifactViewId":{"type":"string","minLength":1,"maxLength":160},"resourceUri":{"type":"string","pattern":"^ui:\\/\\/openwork\\/artifacts\\/.*"},"buildStatus":{"type":"string","enum":["ready","failed"]},"sourceDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"resourceDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"outputSchemaDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"csp":{"type":"object","properties":{"connectDomains":{"minItems":0,"maxItems":0,"type":"array","items":{"type":"string"}},"resourceDomains":{"minItems":0,"maxItems":0,"type":"array","items":{"type":"string"}},"frameDomains":{"minItems":0,"maxItems":0,"type":"array","items":{"type":"string"}},"baseUriDomains":{"minItems":0,"maxItems":0,"type":"array","items":{"type":"string"}}},"required":["connectDomains","resourceDomains","frameDomains","baseUriDomains"]},"diagnostics":{"type":"array","items":{"type":"object","properties":{"level":{"type":"string","enum":["error","warning"]},"message":{"type":"string","minLength":1,"maxLength":4000},"line":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"column":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["level","message","line","column"]}},"compilerName":{"type":"string","minLength":1},"compilerVersion":{"type":"string","minLength":1},"reactVersion":{"type":"string","minLength":1},"compiledHtmlBytes":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"retiredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","artifactViewId","resourceUri","buildStatus","sourceDigest","resourceDigest","outputSchemaDigest","csp","diagnostics","compilerName","compilerVersion","reactVersion","compiledHtmlBytes","retiredAt","createdAt"]}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","configObjectId","title","description","status","activeRevisionId","revisions","createdAt","updatedAt"]}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"artifactViewId","required":true},{"schema":{"type":"string"},"in":"path","name":"revisionId","required":true}]}},"/v1/artifact-views/{artifactViewId}/retire":{"post":{"operationId":"postV1ArtifactViewsByArtifactViewIdRetire","tags":["Codemode Runs"],"summary":"Retire a generated Artifact view","responses":{"200":{"description":"Artifact view retired.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"configObjectId":{"type":"string","minLength":1,"maxLength":160},"title":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"status":{"type":"string","enum":["active","retired"]},"activeRevisionId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"revisions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"artifactViewId":{"type":"string","minLength":1,"maxLength":160},"resourceUri":{"type":"string","pattern":"^ui:\\/\\/openwork\\/artifacts\\/.*"},"buildStatus":{"type":"string","enum":["ready","failed"]},"sourceDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"resourceDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"outputSchemaDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"csp":{"type":"object","properties":{"connectDomains":{"minItems":0,"maxItems":0,"type":"array","items":{"type":"string"}},"resourceDomains":{"minItems":0,"maxItems":0,"type":"array","items":{"type":"string"}},"frameDomains":{"minItems":0,"maxItems":0,"type":"array","items":{"type":"string"}},"baseUriDomains":{"minItems":0,"maxItems":0,"type":"array","items":{"type":"string"}}},"required":["connectDomains","resourceDomains","frameDomains","baseUriDomains"]},"diagnostics":{"type":"array","items":{"type":"object","properties":{"level":{"type":"string","enum":["error","warning"]},"message":{"type":"string","minLength":1,"maxLength":4000},"line":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"column":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["level","message","line","column"]}},"compilerName":{"type":"string","minLength":1},"compilerVersion":{"type":"string","minLength":1},"reactVersion":{"type":"string","minLength":1},"compiledHtmlBytes":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"retiredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","artifactViewId","resourceUri","buildStatus","sourceDigest","resourceDigest","outputSchemaDigest","csp","diagnostics","compilerName","compilerVersion","reactVersion","compiledHtmlBytes","retiredAt","createdAt"]}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","configObjectId","title","description","status","activeRevisionId","revisions","createdAt","updatedAt"]}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"artifactViewId","required":true}]}},"/v1/workflows/{configObjectId}/versions":{"get":{"operationId":"getV1WorkflowsByConfigObjectIdVersions","tags":["Workflows"],"summary":"List immutable Workflow versions","responses":{"200":{"description":"Workflow versions returned.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"inputSchema":{"anyOf":[{},{"type":"null"}]},"outputSchema":{"anyOf":[{},{"type":"null"}]},"exampleInput":{"anyOf":[{},{"type":"null"}]},"requiredCapabilities":{"type":"array","items":{"type":"object","properties":{"capabilityName":{"type":"string","minLength":1,"maxLength":255},"scriptPath":{"type":"string","minLength":1,"maxLength":255}},"required":["capabilityName","scriptPath"]}},"codeDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"inputSchemaDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"outputSchemaDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"automationReferences":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"name":{"type":"string","minLength":1,"maxLength":120},"state":{"type":"string","enum":["active","inactive","needs_attention","archived"]},"configObjectVersionId":{"type":"string","minLength":1,"maxLength":160},"input":{}},"required":["id","name","state","configObjectVersionId"]}}},"required":["id","code","inputSchema","outputSchema","requiredCapabilities","codeDigest","inputSchemaDigest","outputSchemaDigest","createdAt","automationReferences"]}}},"required":["items"]}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"configObjectId","required":true}]},"post":{"operationId":"postV1WorkflowsByConfigObjectIdVersions","tags":["Workflows"],"summary":"Create an immutable Workflow version using the immediately preceding matching test receipt and unchanged draft","responses":{"201":{"description":"Workflow version created.","content":{"application/json":{"schema":{"type":"object","properties":{"pluginId":{"type":"string","minLength":1,"maxLength":160},"configObjectId":{"type":"string","minLength":1,"maxLength":160},"title":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"canRun":{"type":"boolean"},"canManage":{"type":"boolean"},"currentVersion":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"inputSchema":{"anyOf":[{},{"type":"null"}]},"outputSchema":{"anyOf":[{},{"type":"null"}]},"exampleInput":{"anyOf":[{},{"type":"null"}]},"requiredCapabilities":{"type":"array","items":{"type":"object","properties":{"capabilityName":{"type":"string","minLength":1,"maxLength":255},"scriptPath":{"type":"string","minLength":1,"maxLength":255}},"required":["capabilityName","scriptPath"]}},"codeDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"inputSchemaDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"outputSchemaDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"automationReferences":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"name":{"type":"string","minLength":1,"maxLength":120},"state":{"type":"string","enum":["active","inactive","needs_attention","archived"]},"configObjectVersionId":{"type":"string","minLength":1,"maxLength":160},"input":{}},"required":["id","name","state","configObjectVersionId"]}}},"required":["id","code","inputSchema","outputSchema","requiredCapabilities","codeDigest","inputSchemaDigest","outputSchemaDigest","createdAt","automationReferences"]},"versions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"inputSchema":{"anyOf":[{},{"type":"null"}]},"outputSchema":{"anyOf":[{},{"type":"null"}]},"exampleInput":{"anyOf":[{},{"type":"null"}]},"requiredCapabilities":{"type":"array","items":{"type":"object","properties":{"capabilityName":{"type":"string","minLength":1,"maxLength":255},"scriptPath":{"type":"string","minLength":1,"maxLength":255}},"required":["capabilityName","scriptPath"]}},"codeDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"inputSchemaDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"outputSchemaDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"automationReferences":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"name":{"type":"string","minLength":1,"maxLength":120},"state":{"type":"string","enum":["active","inactive","needs_attention","archived"]},"configObjectVersionId":{"type":"string","minLength":1,"maxLength":160},"input":{}},"required":["id","name","state","configObjectVersionId"]}}},"required":["id","code","inputSchema","outputSchema","requiredCapabilities","codeDigest","inputSchemaDigest","outputSchemaDigest","createdAt","automationReferences"]}},"latestSnapshot":{"anyOf":[{"type":"object","properties":{"receiptId":{"type":"string","minLength":1,"maxLength":160},"pluginId":{"type":"string","minLength":1,"maxLength":160},"configObjectId":{"type":"string","minLength":1,"maxLength":160},"configObjectVersionId":{"type":"string","minLength":1,"maxLength":160},"automationRunId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"value":{"anyOf":[{},{"type":"null"}]},"markdown":{"anyOf":[{"type":"string"},{"type":"null"}]},"codeDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"resultDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"inputSchemaDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"outputSchemaDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"rendererVersion":{"anyOf":[{"type":"string","const":"codemode-markdown-v1"},{"type":"null"}]},"status":{"type":"string","enum":["succeeded","failed"]},"errorKind":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"type":"string","enum":["manual","scheduled"]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"finishedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"contentDeletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["receiptId","pluginId","configObjectId","configObjectVersionId","automationRunId","value","markdown","codeDigest","resultDigest","inputSchemaDigest","outputSchemaDigest","rendererVersion","status","errorKind","errorMessage","source","startedAt","finishedAt","contentDeletedAt"]},{"type":"null"}]},"latestSuccessfulSnapshot":{"anyOf":[{"type":"object","properties":{"receiptId":{"type":"string","minLength":1,"maxLength":160},"pluginId":{"type":"string","minLength":1,"maxLength":160},"configObjectId":{"type":"string","minLength":1,"maxLength":160},"configObjectVersionId":{"type":"string","minLength":1,"maxLength":160},"automationRunId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"value":{"anyOf":[{},{"type":"null"}]},"markdown":{"anyOf":[{"type":"string"},{"type":"null"}]},"codeDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"resultDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"inputSchemaDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"outputSchemaDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"rendererVersion":{"anyOf":[{"type":"string","const":"codemode-markdown-v1"},{"type":"null"}]},"status":{"type":"string","enum":["succeeded","failed"]},"errorKind":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"type":"string","enum":["manual","scheduled"]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"finishedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"contentDeletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["receiptId","pluginId","configObjectId","configObjectVersionId","automationRunId","value","markdown","codeDigest","resultDigest","inputSchemaDigest","outputSchemaDigest","rendererVersion","status","errorKind","errorMessage","source","startedAt","finishedAt","contentDeletedAt"]},{"type":"null"}]},"freshness":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"never_run"}},"required":["state"]},{"type":"object","properties":{"state":{"type":"string","const":"fresh"},"ageMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["state","ageMs"]},{"type":"object","properties":{"state":{"type":"string","const":"stale"},"ageMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"maxAgeMs":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["state","ageMs","maxAgeMs"]},{"type":"object","properties":{"state":{"type":"string","const":"needs_attention"},"ageMs":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"lastSuccessfulReceiptId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"reason":{"type":"string","minLength":1,"maxLength":2000}},"required":["state","ageMs","lastSuccessfulReceiptId","reason"]}]}},"required":["pluginId","configObjectId","title","description","canRun","canManage","currentVersion","versions","latestSnapshot","latestSuccessfulSnapshot","freshness"]}}}},"400":{"description":"Version rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":4000},"code":{"type":"string","minLength":1,"maxLength":200000},"exampleInput":{},"inputSchema":{},"outputSchema":{"description":"Optional JSON Schema for the value returned by this Workflow."},"requiredCapabilities":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"capabilityName":{"type":"string","minLength":1,"maxLength":255},"scriptPath":{"type":"string","minLength":1,"maxLength":255}},"required":["capabilityName","scriptPath"]}},"receiptId":{"type":"string","minLength":1,"maxLength":160,"description":"Copy receiptId from the immediately preceding successful draft test. Submit the exact same name, description, code, exampleInput, inputSchema, outputSchema, and requiredCapabilities used by that test."}},"required":["name","code","requiredCapabilities","receiptId"]}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"configObjectId","required":true}]}},"/v1/workflows/{configObjectId}/snapshots":{"get":{"operationId":"getV1WorkflowsByConfigObjectIdSnapshots","tags":["Workflows"],"summary":"List Workflow artifact snapshots","responses":{"200":{"description":"Artifact snapshots returned.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"receiptId":{"type":"string","minLength":1,"maxLength":160},"pluginId":{"type":"string","minLength":1,"maxLength":160},"configObjectId":{"type":"string","minLength":1,"maxLength":160},"configObjectVersionId":{"type":"string","minLength":1,"maxLength":160},"automationRunId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"value":{"anyOf":[{},{"type":"null"}]},"markdown":{"anyOf":[{"type":"string"},{"type":"null"}]},"codeDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"resultDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"inputSchemaDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"outputSchemaDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"rendererVersion":{"anyOf":[{"type":"string","const":"codemode-markdown-v1"},{"type":"null"}]},"status":{"type":"string","enum":["succeeded","failed"]},"errorKind":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"type":"string","enum":["manual","scheduled"]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"finishedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"contentDeletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["receiptId","pluginId","configObjectId","configObjectVersionId","automationRunId","value","markdown","codeDigest","resultDigest","inputSchemaDigest","outputSchemaDigest","rendererVersion","status","errorKind","errorMessage","source","startedAt","finishedAt","contentDeletedAt"]}}},"required":["items"]}}}}},"parameters":[{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":200}},{"schema":{"type":"string"},"in":"path","name":"configObjectId","required":true}]}},"/v1/workflows/{configObjectId}/snapshots/{receiptId}":{"get":{"operationId":"getV1WorkflowsByConfigObjectIdSnapshotsByReceiptId","tags":["Workflows"],"summary":"Inspect one Workflow artifact snapshot","responses":{"200":{"description":"Artifact snapshot returned.","content":{"application/json":{"schema":{"type":"object","properties":{"receiptId":{"type":"string","minLength":1,"maxLength":160},"pluginId":{"type":"string","minLength":1,"maxLength":160},"configObjectId":{"type":"string","minLength":1,"maxLength":160},"configObjectVersionId":{"type":"string","minLength":1,"maxLength":160},"automationRunId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"value":{"anyOf":[{},{"type":"null"}]},"markdown":{"anyOf":[{"type":"string"},{"type":"null"}]},"codeDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"resultDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"inputSchemaDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"outputSchemaDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"rendererVersion":{"anyOf":[{"type":"string","const":"codemode-markdown-v1"},{"type":"null"}]},"status":{"type":"string","enum":["succeeded","failed"]},"errorKind":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"type":"string","enum":["manual","scheduled"]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"finishedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"contentDeletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["receiptId","pluginId","configObjectId","configObjectVersionId","automationRunId","value","markdown","codeDigest","resultDigest","inputSchemaDigest","outputSchemaDigest","rendererVersion","status","errorKind","errorMessage","source","startedAt","finishedAt","contentDeletedAt"]}}}},"404":{"description":"Artifact snapshot not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"configObjectId","required":true},{"schema":{"type":"string"},"in":"path","name":"receiptId","required":true}]}},"/v1/workflows/test":{"post":{"operationId":"postV1WorkflowsTest","tags":["Workflows"],"summary":"Test the exact Workflow draft and return the receiptId required to create that unchanged version","responses":{"200":{"description":"Workflow draft tested.","content":{"application/json":{"schema":{"type":"object","properties":{"receiptId":{"type":"string","minLength":1,"maxLength":160},"value":{},"markdown":{"type":"string"},"codeDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"resultDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"inputSchemaDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"outputSchemaDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"rendererVersion":{"type":"string","const":"codemode-markdown-v1"},"requiredCapabilities":{"type":"array","items":{"type":"object","properties":{"capabilityName":{"type":"string","minLength":1,"maxLength":255},"scriptPath":{"type":"string","minLength":1,"maxLength":255}},"required":["capabilityName","scriptPath"]}},"finishedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["receiptId","value","markdown","codeDigest","resultDigest","inputSchemaDigest","outputSchemaDigest","rendererVersion","requiredCapabilities","finishedAt"]}}}},"400":{"description":"Test rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":4000},"code":{"type":"string","minLength":1,"maxLength":200000},"exampleInput":{},"inputSchema":{},"outputSchema":{"description":"Optional JSON Schema for the value returned by this Workflow."},"requiredCapabilities":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"capabilityName":{"type":"string","minLength":1,"maxLength":255},"scriptPath":{"type":"string","minLength":1,"maxLength":255}},"required":["capabilityName","scriptPath"]}},"configObjectId":{"type":"string","minLength":1,"maxLength":160}},"required":["name","code","requiredCapabilities","configObjectId"]}}}}}},"/v1/workflows/{configObjectId}/run":{"post":{"operationId":"postV1WorkflowsByConfigObjectIdRun","tags":["Workflows"],"summary":"Run an exact Workflow version","responses":{"200":{"description":"Workflow executed.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"succeeded"},"value":{},"markdown":{"type":"string"},"receiptId":{"anyOf":[{"type":"string"},{"type":"null"}]},"resultDigest":{"type":"string"},"inputSchemaDigest":{"anyOf":[{"type":"string"},{"type":"null"}]},"outputSchemaDigest":{"anyOf":[{"type":"string"},{"type":"null"}]},"rendererVersion":{"type":"string","const":"codemode-markdown-v1"}},"required":["status","value","markdown","receiptId","resultDigest","inputSchemaDigest","outputSchemaDigest","rendererVersion"]}}}},"400":{"description":"Execution rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pluginId":{"type":"string","minLength":1,"maxLength":160},"configObjectVersionId":{"type":"string","minLength":1,"maxLength":160},"input":{}},"required":["pluginId","configObjectVersionId"]}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"configObjectId","required":true}]}},"/v1/workflows/{configObjectId}/snapshots/{receiptId}/content":{"delete":{"operationId":"deleteV1WorkflowsByConfigObjectIdSnapshotsByReceiptIdContent","tags":["Workflows"],"summary":"Delete artifact content while retaining its audit receipt","responses":{"200":{"description":"Artifact content deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"receiptId":{"type":"string","minLength":1,"maxLength":160},"pluginId":{"type":"string","minLength":1,"maxLength":160},"configObjectId":{"type":"string","minLength":1,"maxLength":160},"configObjectVersionId":{"type":"string","minLength":1,"maxLength":160},"automationRunId":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"value":{"anyOf":[{},{"type":"null"}]},"markdown":{"anyOf":[{"type":"string"},{"type":"null"}]},"codeDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"resultDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"inputSchemaDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"outputSchemaDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"rendererVersion":{"anyOf":[{"type":"string","const":"codemode-markdown-v1"},{"type":"null"}]},"status":{"type":"string","enum":["succeeded","failed"]},"errorKind":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"type":"string","enum":["manual","scheduled"]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"finishedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"contentDeletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["receiptId","pluginId","configObjectId","configObjectVersionId","automationRunId","value","markdown","codeDigest","resultDigest","inputSchemaDigest","outputSchemaDigest","rendererVersion","status","errorKind","errorMessage","source","startedAt","finishedAt","contentDeletedAt"]}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"configObjectId","required":true},{"schema":{"type":"string"},"in":"path","name":"receiptId","required":true}]}},"/v1/dashboards":{"get":{"operationId":"getV1Dashboards","tags":["Dashboards"],"summary":"List dashboards","responses":{"200":{"description":"Dashboards returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardListResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can list dashboards.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}},"post":{"operationId":"postV1Dashboards","tags":["Dashboards"],"summary":"Create dashboard","responses":{"201":{"description":"Dashboard created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardResponse"}}}},"400":{"description":"The dashboard request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can create dashboards.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"elements":{"default":[],"maxItems":50,"type":"array","items":{"$ref":"#/components/schemas/DashboardElement"}}},"required":["name"]}}}}}},"/v1/dashboards/{dashboardId}":{"get":{"operationId":"getV1DashboardsByDashboardId","tags":["Dashboards"],"summary":"Get dashboard","responses":{"200":{"description":"Dashboard returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can view dashboards.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The dashboard was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"dashboardId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'dsb_' prefix and a 26-character base32 suffix."}]},"patch":{"operationId":"patchV1DashboardsByDashboardId","tags":["Dashboards"],"summary":"Update dashboard","responses":{"200":{"description":"Dashboard updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardResponse"}}}},"400":{"description":"The dashboard request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can update dashboards.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The dashboard was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"dashboardId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'dsb_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"elements":{"maxItems":50,"type":"array","items":{"$ref":"#/components/schemas/DashboardElement"}}}}}}}},"delete":{"operationId":"deleteV1DashboardsByDashboardId","tags":["Dashboards"],"summary":"Delete dashboard","responses":{"204":{"description":"Dashboard deleted successfully."},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can delete dashboards.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The dashboard was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"dashboardId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'dsb_' prefix and a 26-character base32 suffix."}]}},"/v1/dashboards/{dashboardId}/access":{"get":{"operationId":"getV1DashboardsByDashboardIdAccess","tags":["Dashboards"],"summary":"List dashboard access grants","responses":{"200":{"description":"Dashboard access grants returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardAccessListResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can list dashboard access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The dashboard was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"dashboardId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'dsb_' prefix and a 26-character base32 suffix."}]},"post":{"operationId":"postV1DashboardsByDashboardIdAccess","tags":["Dashboards"],"summary":"Grant dashboard access","description":"Assigns a dashboard to one member, one team, or the whole organization — the same subject model connector assignment grants use. Regranting a revoked subject reactivates the existing grant.","responses":{"201":{"description":"Dashboard access granted successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardAccessResponse"}}}},"400":{"description":"The grant request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can grant dashboard access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The dashboard, member, or team was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"dashboardId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'dsb_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29},"teamId":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"orgWide":{"default":false,"type":"boolean"},"role":{"type":"string","enum":["viewer","editor","manager"]}},"required":["role"]}}}}}},"/v1/dashboards/{dashboardId}/access/{grantId}":{"delete":{"operationId":"deleteV1DashboardsByDashboardIdAccessByGrantId","tags":["Dashboards"],"summary":"Revoke dashboard access","responses":{"204":{"description":"Dashboard access revoked successfully."},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can revoke dashboard access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The dashboard or grant was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"dashboardId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'dsb_' prefix and a 26-character base32 suffix."},{"in":"path","name":"grantId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'dsg_' prefix and a 26-character base32 suffix."}]}},"/v1/me/dashboards":{"get":{"operationId":"getV1MeDashboards","tags":["Dashboards"],"summary":"List dashboards granted to the current member","responses":{"200":{"description":"Granted dashboards returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeDashboardListResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}}},"/v1/desktop-policies":{"get":{"operationId":"getV1DesktopPolicies","tags":["Desktop Policies"],"summary":"List desktop policies","responses":{"200":{"description":"Desktop policies returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopPolicyListResponse"}}}},"401":{"description":"The caller must be signed in to list desktop policies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can list desktop policies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}},"post":{"operationId":"postV1DesktopPolicies","tags":["Desktop Policies"],"summary":"Create desktop policy","responses":{"201":{"description":"Desktop policy created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopPolicyResponse"}}}},"400":{"description":"The desktop policy request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create desktop policies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"402":{"description":"Desktop policy management requires an Enterprise plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterprisePlanRequiredError"}}}},"403":{"description":"Only workspace owners and super-admins can create desktop policies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"A referenced member or team was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"policyName":{"type":"string","minLength":1,"maxLength":255},"policy":{"$ref":"#/components/schemas/DenDesktopPolicyDocumentWrite"},"priority":{"type":"integer","minimum":0,"maximum":1000000},"isEnabled":{"type":"boolean"},"memberIds":{"maxItems":500,"type":"array","items":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29}},"teamIds":{"maxItems":500,"type":"array","items":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30}},"roles":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","enum":["owner","admin","member"]}}},"required":["policyName","policy"]}}}}}},"/v1/desktop-policies/{desktopPolicyId}":{"patch":{"operationId":"patchV1DesktopPoliciesByDesktopPolicyId","tags":["Desktop Policies"],"summary":"Update desktop policy","responses":{"200":{"description":"Desktop policy updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopPolicyResponse"}}}},"400":{"description":"The desktop policy request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update desktop policies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"402":{"description":"Desktop policy management requires an Enterprise plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterprisePlanRequiredError"}}}},"403":{"description":"Only workspace owners and super-admins can update desktop policies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The policy or a referenced resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"desktopPolicyId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'dpo_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"policyName":{"type":"string","minLength":1,"maxLength":255},"policy":{"$ref":"#/components/schemas/DenDesktopPolicyDocumentWrite"},"priority":{"type":"integer","minimum":0,"maximum":1000000},"isEnabled":{"type":"boolean"},"memberIds":{"maxItems":500,"type":"array","items":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29}},"teamIds":{"maxItems":500,"type":"array","items":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30}},"roles":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","enum":["owner","admin","member"]}}},"required":["policyName","policy"]}}}}},"delete":{"operationId":"deleteV1DesktopPoliciesByDesktopPolicyId","tags":["Desktop Policies"],"summary":"Delete desktop policy","responses":{"204":{"description":"Desktop policy deleted successfully."},"401":{"description":"The caller must be signed in to delete desktop policies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can delete desktop policies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The policy was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"desktopPolicyId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'dpo_' prefix and a 26-character base32 suffix."}]}},"/v1/diagnostics/egress":{"get":{"operationId":"getV1DiagnosticsEgress","tags":["Diagnostics"],"summary":"Describe the controlled Den egress diagnostic","description":"Reports whether the operator-configured public Diagnostics target is available. The target cannot be supplied by the browser.","responses":{"200":{"description":"Egress diagnostic configuration returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"available":{"type":"boolean"},"targetOrigin":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"missingConfiguration":{"maxItems":2,"type":"array","items":{"type":"string","enum":["DEN_DIAGNOSTICS_ORIGIN","DEN_DIAGNOSTICS_BEARER_TOKEN"]}}},"required":["available","targetOrigin","missingConfiguration"]}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can inspect egress diagnostics.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}},"post":{"operationId":"postV1DiagnosticsEgress","tags":["Diagnostics"],"summary":"Run the controlled Den egress diagnostic","description":"Runs fixed HTTP, redirect, OAuth-shaped, and MCP probes from the Den process to the operator-configured public Diagnostics origin.","responses":{"200":{"description":"The completed diagnostic run, including a failed result when a layer did not pass.","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"targetOrigin":{"type":"string","format":"uri"},"supportUrl":{"type":"string","format":"uri"},"startedAt":{"type":"string"},"completedAt":{"type":"string"},"overallStatus":{"type":"string","enum":["passed","failed"]},"highestPassingStep":{"anyOf":[{"type":"string","enum":["reachability","http-methods","redirect","oauth-discovery","oauth-token","mcp-handshake"]},{"type":"null"}]},"failedStep":{"anyOf":[{"type":"string","enum":["reachability","http-methods","redirect","oauth-discovery","oauth-token","mcp-handshake"]},{"type":"null"}]},"steps":{"minItems":6,"maxItems":6,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["reachability","http-methods","redirect","oauth-discovery","oauth-token","mcp-handshake"]},"label":{"type":"string","minLength":1,"maxLength":120},"category":{"type":"string","enum":["connectivity","http","oauth","mcp"]},"status":{"type":"string","enum":["passed","failed","skipped"]},"startedAt":{"type":"string"},"completedAt":{"type":"string"},"durationMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"httpStatuses":{"maxItems":16,"type":"array","items":{"type":"integer","minimum":100,"maximum":599}},"diagnosticIds":{"maxItems":16,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"code":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]},"message":{"type":"string","minLength":1,"maxLength":500},"owner":{"type":"string","enum":["den-operator","network-administrator","openwork-support"]},"action":{"type":"string","minLength":1,"maxLength":500}},"required":["id","label","category","status","startedAt","completedAt","durationMs","httpStatuses","diagnosticIds","code","message","owner","action"]}}},"required":["runId","targetOrigin","supportUrl","startedAt","completedAt","overallStatus","highestPassingStep","failedStep","steps"]}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can run egress diagnostics.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"503":{"description":"The Den operator has not configured the Diagnostics target.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","const":"egress_diagnostics_not_configured"},"missingConfiguration":{"maxItems":2,"type":"array","items":{"type":"string","enum":["DEN_DIAGNOSTICS_ORIGIN","DEN_DIAGNOSTICS_BEARER_TOKEN"]}}},"required":["error","missingConfiguration"]}}}}}}},"/v1/diagnostics/egress/token":{"put":{"operationId":"putV1DiagnosticsEgressToken","tags":["Diagnostics"],"summary":"Set the organization egress diagnostic bearer token","description":"Stores the synthetic Diagnostics bearer token encrypted for this organization. The token is never returned by the API.","responses":{"204":{"description":"The diagnostic token was stored."},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can configure egress diagnostics.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}}},"/v1/inference":{"get":{"operationId":"getV1Inference","tags":["Inference"],"summary":"Get inference settings","description":"Returns OpenWork Models enablement and limit context for the active organization.","responses":{"200":{"description":"Inference settings returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceStatusResponse"}}}},"401":{"description":"The caller must be signed in to read inference settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can read inference settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}},"patch":{"operationId":"patchV1Inference","tags":["Inference"],"summary":"Update inference settings","description":"Enables or disables OpenWork Models for the active organization.","responses":{"200":{"description":"Inference settings updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceStatusResponse"}}}},"400":{"description":"The inference settings request was invalid.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidRequestError"},{"$ref":"#/components/schemas/InferenceProviderMissingError"}]}}}},"401":{"description":"The caller must be signed in to update inference settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can update inference settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"tier":{"type":"string","enum":["tier1","tier2"]}},"required":["enabled"]}}}}}},"/v1/scim":{"get":{"operationId":"getV1Scim","tags":["SCIM"],"summary":"Get organization SCIM connection","description":"Returns the SCIM provisioning base URL, group-to-team mapping mode, and current connector metadata for the selected organization.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Organization SCIM configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationScimConnectionResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimInvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimUnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can read SCIM.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimOrganizationNotFoundError"}}}}}},"patch":{"operationId":"patchV1Scim","tags":["SCIM"],"summary":"Update organization SCIM settings","description":"Controls whether provisioned SCIM Groups remain metadata or create and manage organization teams.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Organization SCIM settings updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationScimConnectionResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Only workspace owners and super-admins can manage SCIM."},"404":{"description":"SCIM connection not found"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"groupMappingMode":{"type":"string","enum":["metadata_only","create_teams"]}},"required":["groupMappingMode"]}}}}},"delete":{"operationId":"deleteV1Scim","tags":["SCIM"],"summary":"Delete an organization SCIM connection","description":"Deletes the organization SCIM connection and invalidates the current bearer token.","security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Organization SCIM connection deleted"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimInvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimUnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can manage SCIM.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimOrganizationNotFoundError"}}}}}}},"/v1/scim/token":{"post":{"operationId":"postV1ScimToken","tags":["SCIM"],"summary":"Create or rotate an organization SCIM token","description":"Creates the organization SCIM provisioning connector if needed and returns a freshly rotated bearer token.","security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Organization SCIM token created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotateOrganizationScimTokenResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimInvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimUnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can manage SCIM.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimOrganizationNotFoundError"}}}},"409":{"description":"An enabled SSO connection is required before creating or rotating a SCIM token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimSsoRequiredError"}}}}}}},"/v1/scim/reconcile":{"post":{"operationId":"postV1ScimReconcile","tags":["SCIM"],"summary":"Run organization SCIM drift reconciliation","description":"Checks local SCIM-managed identities for inconsistent organization membership or provider-account state and records unresolved drift for retry or manual review.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"SCIM reconciliation completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationScimReconciliationResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimUnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can manage SCIM.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimOrganizationNotFoundError"}}}}}}},"/v1/sso":{"get":{"operationId":"getV1Sso","tags":["SSO"],"summary":"Get organization SSO connection","description":"Returns the current organization SSO connection and setup URLs.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Organization SSO configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSsoConnectionResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoInvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoUnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can read SSO.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoOrganizationNotFoundError"}}}}}},"delete":{"operationId":"deleteV1Sso","tags":["SSO"],"summary":"Delete organization SSO connection","description":"Deletes the active organization SSO connection.","security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Organization SSO connection deleted"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoInvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoUnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can manage SSO.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoOrganizationNotFoundError"}}}}}}},"/v1/sso/saml":{"post":{"operationId":"postV1SsoSaml","tags":["SSO"],"summary":"Register organization SAML SSO","description":"Registers or replaces the active organization SAML SSO provider.","security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Organization SSO connection created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSsoConnectionResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoInvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoUnauthorizedError"}}}},"402":{"description":"SSO management requires an Enterprise plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterprisePlanRequiredError"}}}},"403":{"description":"Only workspace owners and super-admins can manage SSO.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoOrganizationNotFoundError"}}}}}}},"/v1/sso/oidc":{"post":{"operationId":"postV1SsoOidc","tags":["SSO"],"summary":"Register organization OIDC SSO","description":"Registers or replaces the active organization OIDC SSO provider.","security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Organization SSO connection created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSsoConnectionResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoInvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoUnauthorizedError"}}}},"402":{"description":"SSO management requires an Enterprise plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterprisePlanRequiredError"}}}},"403":{"description":"Only workspace owners and super-admins can manage SSO.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoOrganizationNotFoundError"}}}}}}},"/v1/sso/metadata":{"get":{"operationId":"getV1SsoMetadata","tags":["SSO"],"summary":"Get organization SAML SP metadata","description":"Returns the generated Service Provider metadata for the current organization's SAML connection.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"SAML metadata document"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoInvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoUnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can read SSO metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoOrganizationNotFoundError"}}}}}}},"/v1/sso/request-domain-verification":{"post":{"operationId":"postV1SsoRequestDomainVerification","tags":["SSO"],"summary":"Request an SSO domain verification token","description":"Returns the DNS TXT verification token for the current organization's SSO provider.","security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Domain verification token returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSsoDomainVerificationResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoInvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoUnauthorizedError"}}}},"402":{"description":"SSO management requires an Enterprise plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterprisePlanRequiredError"}}}},"403":{"description":"Only workspace owners and super-admins can manage SSO.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoOrganizationNotFoundError"}}}}}}},"/v1/sso/verify-domain":{"post":{"operationId":"postV1SsoVerifyDomain","tags":["SSO"],"summary":"Verify the organization SSO domain","description":"Checks the provider's DNS TXT record and marks the domain as verified when present.","security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Organization SSO domain verified"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoInvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoUnauthorizedError"}}}},"402":{"description":"SSO management requires an Enterprise plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterprisePlanRequiredError"}}}},"403":{"description":"Only workspace owners and super-admins can manage SSO.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoOrganizationNotFoundError"}}}}}}},"/v1/invitations":{"post":{"operationId":"postV1Invitations","tags":["Invitations"],"summary":"Create organization invitation","description":"Creates or refreshes a pending organization invitation for an email address and sends the invite email. Returns 502 when the invitation row is persisted but the configured email provider failed to send; the client should surface the error and give the user a retry affordance.","responses":{"200":{"description":"Existing invitation refreshed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationResponse"}}}},"201":{"description":"Invitation created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationResponse"}}}},"400":{"description":"The invitation request body or path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to invite organization members.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"402":{"description":"A seat subscription is required before inviting more members.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitePaymentRequiredError"}}}},"403":{"description":"Only workspace owners and admins can create invitations. Admins can only invite members.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"The email address is outside this workspace's allowed domains.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteEmailDomainNotAllowedError"}}}},"502":{"description":"The invitation was saved but the email provider rejected or failed to deliver it. Retry by submitting the same email again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationEmailFailedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"type":"string","minLength":1,"maxLength":64}},"required":["email","role"]}}}}}},"/v1/invitations/{invitationId}/cancel":{"post":{"operationId":"postV1InvitationsByInvitationIdCancel","tags":["Invitations"],"summary":"Cancel organization invitation","description":"Cancels a pending organization invitation so the invite link can no longer be used.","responses":{"200":{"description":"Invitation cancelled successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"The invitation cancellation path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to cancel invitations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can cancel invitations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The invitation or organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"The invitation is no longer pending and cannot be canceled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationNotPendingError"}}}}},"parameters":[{"in":"path","name":"invitationId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'inv_' prefix and a 26-character base32 suffix."}]}},"/v1/orgs/{organizationId}/install-links":{"post":{"operationId":"postV1OrgsByOrganizationIdInstallLinks","tags":["Organizations"],"summary":"Create organization install link","description":"Mints a shareable OpenWork desktop install link for a signed-in organization member. Older active links remain valid unless an owner or admin explicitly requests rotation.","responses":{"200":{"description":"Install link created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInstallLinkResponse"}}}},"400":{"description":"The install-link request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create install links.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The organization needs the installLinks capability enabled, and only workspace owners and admins can rotate existing links.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/CapabilityDisabledError"}]}}}},"404":{"description":"The organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"The member has created too many install links.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInstallLinkRequest"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"organizationId","required":true}]}},"/v1/me/install-config":{"get":{"operationId":"getV1MeInstallConfig","tags":["Users"],"summary":"Get current user's install configuration","description":"Returns desktop branding, distribution, and approved version for the signed-in member's active organization.","responses":{"200":{"description":"Authenticated install configuration resolved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticatedInstallConfig"}}}},"401":{"description":"The caller must be signed in to load install configuration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The caller has no active organization membership.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/me/install/{platform}":{"get":{"operationId":"getV1MeInstallByPlatform","tags":["Users"],"summary":"Download current user's managed OpenWork desktop","description":"Downloads the Cloud or Enterprise artifact approved for the signed-in member's active organization.","responses":{"200":{"description":"Mounted desktop artifact returned successfully.","content":{"text/plain":{"schema":{"type":"string"}}}},"302":{"description":"Den redirected the browser to the signed desktop asset for this deployment."},"400":{"description":"The desktop platform was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to download the desktop app.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The caller has no active organization membership.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"Too many installer download attempts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"platform","required":true}]}},"/v1/install-config":{"get":{"operationId":"getV1InstallConfig","tags":["Organizations"],"summary":"Resolve install-link configuration","description":"Returns organization setup details and a fresh desktop connection handoff for a valid install link token.","responses":{"200":{"description":"Install configuration resolved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstallExperienceConfig"}}}},"400":{"description":"The install-link token was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"404":{"description":"The install link was missing, expired, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstallLinkNotFoundError"}}}},"429":{"description":"Too many install-link attempts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}}},"parameters":[{"in":"query","name":"token","schema":{"type":"string","maxLength":255,"pattern":"^[A-Za-z0-9_-]{8,}$"},"required":true}]}},"/v1/install-connect/status":{"post":{"operationId":"postV1InstallConnectStatus","tags":["Organizations"],"summary":"Inspect desktop connection status","description":"Reports whether a short-lived organization connection code is still pending or has been accepted by a desktop.","responses":{"200":{"description":"Desktop connection status resolved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopConnectGrantStatusResponse"}}}},"400":{"description":"The connection code body was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"404":{"description":"The connection code was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopConnectGrantFailure"}}}},"410":{"description":"The connection code expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopConnectGrantFailure"}}}},"429":{"description":"Too many connection attempts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Za-z0-9_-]{24,128}$"}},"required":["code"]}}}}}},"/v1/install-connect/preview":{"post":{"operationId":"postV1InstallConnectPreview","tags":["Organizations"],"summary":"Preview desktop connection","description":"Resolves a short-lived organization connection code without consuming it.","responses":{"200":{"description":"Desktop connection resolved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopConnectGrantResponse"}}}},"400":{"description":"The connection code body was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"404":{"description":"The connection code was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopConnectGrantFailure"}}}},"409":{"description":"The connection code was already consumed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopConnectGrantFailure"}}}},"410":{"description":"The connection code expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopConnectGrantFailure"}}}},"429":{"description":"Too many connection attempts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Za-z0-9_-]{24,128}$"}},"required":["code"]}}}}}},"/v1/install-connect/exchange":{"post":{"operationId":"postV1InstallConnectExchange","tags":["Organizations"],"summary":"Accept desktop connection","description":"Consumes a short-lived organization connection code exactly once.","responses":{"200":{"description":"Desktop connection resolved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopConnectGrantResponse"}}}},"400":{"description":"The connection code body was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"404":{"description":"The connection code was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopConnectGrantFailure"}}}},"409":{"description":"The connection code was already consumed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopConnectGrantFailure"}}}},"410":{"description":"The connection code expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopConnectGrantFailure"}}}},"429":{"description":"Too many connection attempts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Za-z0-9_-]{24,128}$"}},"required":["code"]}}}}}},"/v1/install/{platform}":{"get":{"operationId":"getV1InstallByPlatform","tags":["Organizations"],"summary":"Download managed OpenWork desktop","description":"Redirects hosted Cloud deployments to the sign-in-required Cloud app and private single-org deployments to the activation-required Enterprise app.","responses":{"200":{"description":"Mounted desktop artifact returned successfully.","content":{"text/plain":{"schema":{"type":"string"}}}},"302":{"description":"Den redirected the browser to the signed desktop asset for this deployment."},"400":{"description":"The install-link token or platform was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"404":{"description":"The install link was missing, expired, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstallLinkNotFoundError"}}}},"429":{"description":"Too many installer download attempts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}}},"parameters":[{"in":"query","name":"token","schema":{"type":"string","maxLength":255,"pattern":"^[A-Za-z0-9_-]{8,}$"},"required":true},{"schema":{"type":"string"},"in":"path","name":"platform","required":true}]}},"/v1/llm-providers/test-connection":{"post":{"operationId":"postV1LlmProvidersTestConnection","tags":["LLM Providers"],"summary":"Test a custom LLM provider endpoint","description":"Probes an OpenAI-compatible endpoint (Azure AI Foundry, LiteLLM, vLLM, gateways) with the given credential: normalizes common base-URL mistakes, calls GET /models, and returns the model ids the endpoint actually serves — on Azure these are the deployment names. Nothing is stored.","responses":{"200":{"description":"Probe completed (ok=false carries a human hint).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmProviderTestConnectionResponse"}}}},"400":{"description":"The probe request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to test provider endpoints.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"api":{"type":"string","minLength":1,"maxLength":2048},"apiKey":{"type":"string","maxLength":65535},"modelIds":{"maxItems":8,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}}},"required":["api"]}}}}}},"/v1/llm-provider-catalog":{"get":{"operationId":"getV1LlmProviderCatalog","tags":["LLM Providers"],"summary":"List LLM provider catalog","description":"Lists the provider catalog from models.dev so an organization can choose which LLM providers to configure.","responses":{"200":{"description":"Provider catalog returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmProviderCatalogListResponse"}}}},"400":{"description":"The provider catalog path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to browse the provider catalog.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"502":{"description":"The external provider catalog was unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderCatalogUnavailableError"}}}}}}},"/v1/llm-provider-catalog/{providerId}":{"get":{"operationId":"getV1LlmProviderCatalogByProviderId","tags":["LLM Providers"],"summary":"Get LLM provider catalog entry","description":"Returns the full models.dev catalog record for one provider, including its config template and model list.","responses":{"200":{"description":"Provider catalog entry returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmProviderCatalogResponse"}}}},"400":{"description":"The provider catalog path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to inspect provider catalog entries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The requested provider catalog entry could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"502":{"description":"The external provider catalog was unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderCatalogUnavailableError"}}}}},"parameters":[{"in":"path","name":"providerId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/v1/llm-providers":{"get":{"operationId":"getV1LlmProviders","tags":["LLM Providers"],"summary":"List organization LLM providers","description":"Lists usable providers by default. Pass scope=manageable to list providers the current member can administer in Den.","responses":{"200":{"description":"Accessible organization LLM providers returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmProviderListResponse"}}}},"400":{"description":"The provider list path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list organization LLM providers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"parameters":[{"in":"query","name":"scope","schema":{"default":"usable","type":"string","enum":["usable","manageable"]}}]},"post":{"operationId":"postV1LlmProviders","tags":["LLM Providers"],"summary":"Create organization LLM provider","description":"Creates a new organization-scoped LLM provider from either a models.dev provider template, pasted JSON/JSONC custom configuration, or MCP-supplied customConfig object.","responses":{"201":{"description":"Organization LLM provider created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmProviderResponse"}}}},"400":{"description":"The provider creation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create organization LLM providers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"A referenced provider, model, member, or team could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"source":{"type":"string","enum":["models_dev","custom"]},"providerId":{"type":"string","minLength":1,"maxLength":255},"modelIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}},"customConfigText":{"type":"string","minLength":1},"customConfig":{},"credentialMode":{"default":"shared","type":"string","enum":["shared","per_member"]},"apiKey":{"type":"string","maxLength":65535},"apiKeys":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":255},"additionalProperties":{"type":"string","maxLength":65535}},"memberIds":{"maxItems":500,"type":"array","items":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29}},"teamIds":{"maxItems":500,"type":"array","items":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30}},"allMembers":{"default":false,"type":"boolean"}},"required":["name","source"]}}}}}},"/v1/llm-providers/{llmProviderId}/connect":{"get":{"operationId":"getV1LlmProvidersByLlmProviderIdConnect","tags":["LLM Providers"],"x-mcp":false,"summary":"Get LLM provider connect payload","description":"Returns one accessible organization LLM provider with the concrete model configuration needed to connect to it.","responses":{"200":{"description":"Provider connection payload returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmProviderResponse"}}}},"400":{"description":"The provider connect path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to connect to an organization LLM provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only members with access can connect to this provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The provider could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"llmProviderId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'lpr_' prefix and a 26-character base32 suffix."}]}},"/v1/llm-providers/{llmProviderId}/my-credential":{"put":{"operationId":"putV1LlmProvidersByLlmProviderIdMyCredential","tags":["LLM Providers"],"summary":"Set the calling member's LLM provider credential","description":"Stores a write-only credential for the calling member on a granted per-member provider.","responses":{"200":{"description":"Member credential stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmProviderMemberCredentialSummary"}}}},"400":{"description":"The provider is not per-member or the credential is invalid.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidRequestError"},{"$ref":"#/components/schemas/LlmProviderNotPerMemberError"},{"type":"object","properties":{"error":{"type":"string","const":"invalid_api_keys"},"message":{"type":"string"}},"required":["error"]}]}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller has not been granted this provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The provider could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"The credential is blocked and only an admin can replace it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmProviderCredentialBlockedError"}}}}},"parameters":[{"in":"path","name":"llmProviderId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'lpr_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"apiKey":{"type":"string","minLength":1,"maxLength":65535},"apiKeys":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":255},"additionalProperties":{"type":"string","minLength":1,"maxLength":65535}}}}}}}},"delete":{"operationId":"deleteV1LlmProvidersByLlmProviderIdMyCredential","tags":["LLM Providers"],"summary":"Delete the calling member's LLM provider credential","responses":{"200":{"description":"Member credential deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmProviderMemberCredentialDeleteResponse"}}}},"400":{"description":"The provider is not per-member.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidRequestError"},{"$ref":"#/components/schemas/LlmProviderNotPerMemberError"}]}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller has not been granted this provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The provider could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"The credential is blocked and only an admin can remove it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmProviderCredentialBlockedError"}}}}},"parameters":[{"in":"path","name":"llmProviderId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'lpr_' prefix and a 26-character base32 suffix."}]}},"/v1/llm-providers/{llmProviderId}/member-credentials":{"get":{"operationId":"getV1LlmProvidersByLlmProviderIdMemberCredentials","tags":["LLM Providers"],"summary":"List member credential states for an LLM provider","description":"Admin-only. Lists credential state and external identifiers for every granted member without returning secret material.","responses":{"200":{"description":"Granted member credential states returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmProviderMemberCredentialListResponse"}}}},"400":{"description":"The provider id is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can list member credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The provider could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"llmProviderId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'lpr_' prefix and a 26-character base32 suffix."}]}},"/v1/llm-providers/{llmProviderId}/member-credentials/{orgMembershipId}":{"put":{"operationId":"putV1LlmProvidersByLlmProviderIdMemberCredentialsByOrgMembershipId","tags":["LLM Providers"],"summary":"Set one member's LLM provider credential","description":"Admin-only. Stores write-only credential material and optional external provisioner identifiers.","responses":{"200":{"description":"Member credential stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmProviderMemberCredentialSummary"}}}},"400":{"description":"The provider is not per-member or the credential is invalid.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidRequestError"},{"$ref":"#/components/schemas/LlmProviderNotPerMemberError"},{"type":"object","properties":{"error":{"type":"string","const":"invalid_api_keys"},"message":{"type":"string"}},"required":["error"]}]}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can provision member credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The provider or member could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"The member credential version changed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmProviderCredentialVersionConflictError"}}}}},"parameters":[{"in":"path","name":"llmProviderId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'lpr_' prefix and a 26-character base32 suffix."},{"in":"path","name":"orgMembershipId","schema":{"format":"typeid","type":"string","minLength":29,"maxLength":29},"required":true,"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"apiKey":{"type":"string","minLength":1,"maxLength":65535},"apiKeys":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":255},"additionalProperties":{"type":"string","minLength":1,"maxLength":65535}},"externalPrincipalId":{"type":"string","minLength":1,"maxLength":255},"externalCredentialId":{"type":"string","minLength":1,"maxLength":255},"expectedVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}}}}}}},"/v1/llm-providers/{llmProviderId}/member-credentials/{orgMembershipId}/block":{"post":{"operationId":"postV1LlmProvidersByLlmProviderIdMemberCredentialsByOrgMembershipIdBlock","tags":["LLM Providers"],"summary":"Block one member's LLM provider credential","responses":{"200":{"description":"Member credential blocked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmProviderMemberCredentialSummary"}}}},"400":{"description":"The provider or member id is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can block member credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The provider or member credential could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"llmProviderId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'lpr_' prefix and a 26-character base32 suffix."},{"in":"path","name":"orgMembershipId","schema":{"format":"typeid","type":"string","minLength":29,"maxLength":29},"required":true,"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix."}]}},"/v1/llm-providers/{llmProviderId}":{"patch":{"operationId":"patchV1LlmProvidersByLlmProviderId","tags":["LLM Providers"],"summary":"Update organization LLM provider","description":"Updates an existing organization LLM provider, including its provider config, selected models, secret, and access grants. Custom providers accept JSON/JSONC text or an MCP-supplied customConfig object.","responses":{"200":{"description":"Organization LLM provider updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmProviderResponse"}}}},"400":{"description":"The provider update request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update organization LLM providers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only the provider creator or a workspace admin can update providers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The provider or a referenced resource could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"llmProviderId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'lpr_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"source":{"type":"string","enum":["models_dev","custom"]},"providerId":{"type":"string","minLength":1,"maxLength":255},"modelIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}},"customConfigText":{"type":"string","minLength":1},"customConfig":{},"credentialMode":{"default":"shared","type":"string","enum":["shared","per_member"]},"apiKey":{"type":"string","maxLength":65535},"apiKeys":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":255},"additionalProperties":{"type":"string","maxLength":65535}},"memberIds":{"maxItems":500,"type":"array","items":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29}},"teamIds":{"maxItems":500,"type":"array","items":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30}},"allMembers":{"default":false,"type":"boolean"}},"required":["name","source"]}}}}},"delete":{"operationId":"deleteV1LlmProvidersByLlmProviderId","tags":["LLM Providers"],"summary":"Delete organization LLM provider","description":"Deletes an organization LLM provider and removes its models and access rules.","responses":{"204":{"description":"Organization LLM provider deleted successfully."},"400":{"description":"The provider deletion path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to delete organization LLM providers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only the provider creator or a workspace admin can delete providers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The provider could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"llmProviderId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'lpr_' prefix and a 26-character base32 suffix."}]}},"/v1/llm-providers/{llmProviderId}/access/{accessId}":{"delete":{"operationId":"deleteV1LlmProvidersByLlmProviderIdAccessByAccessId","tags":["LLM Providers"],"summary":"Remove LLM provider access grant","description":"Removes one explicit member or team access grant from an organization LLM provider.","responses":{"204":{"description":"Organization LLM provider access removed successfully."},"400":{"description":"The provider access deletion path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage provider access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only the provider creator or a workspace admin can manage provider access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The provider or access grant could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"The request tried to remove a protected provider access entry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}}},"parameters":[{"in":"path","name":"llmProviderId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'lpr_' prefix and a 26-character base32 suffix."},{"in":"path","name":"accessId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'lpa_' prefix and a 26-character base32 suffix."}]}},"/v1/members/{memberId}/role":{"post":{"operationId":"postV1MembersByMemberIdRole","tags":["Members"],"summary":"Update member role","description":"Changes the role assigned to a specific organization member.","responses":{"200":{"description":"Member role updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"The member role update request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update member roles.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can update member roles.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The member or organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"memberId","schema":{"format":"typeid","type":"string","minLength":29,"maxLength":29},"required":true,"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","minLength":1,"maxLength":64}},"required":["role"]}}}}}},"/v1/members/{memberId}/transfer-ownership":{"post":{"operationId":"postV1MembersByMemberIdTransferOwnership","tags":["Members"],"summary":"Transfer workspace ownership","description":"Transfers the protected workspace owner role to another active super-admin member.","responses":{"200":{"description":"Workspace ownership transferred successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"The ownership transfer request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to transfer ownership.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners can transfer ownership.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The target member or organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"memberId","schema":{"format":"typeid","type":"string","minLength":29,"maxLength":29},"required":true,"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix."}]}},"/v1/members/{memberId}":{"delete":{"operationId":"deleteV1MembersByMemberId","tags":["Members"],"summary":"Remove organization member","description":"Removes a member from an organization while protecting the owner role from deletion.","responses":{"204":{"description":"Member removed successfully."},"400":{"description":"The member removal request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to remove organization members.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can remove members.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The member or organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"memberId","schema":{"format":"typeid","type":"string","minLength":29,"maxLength":29},"required":true,"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix."}]}},"/v1/oauth-providers/{providerId}/client":{"post":{"operationId":"postV1OauthProvidersByProviderIdClient","tags":["Authentication"],"summary":"Save an org's OAuth client for a provider","description":"Admin-only. Lets an org bring its own OAuth app (client id + secret) for a native provider such as google-workspace, instead of relying on an OpenWork-owned client.","responses":{"200":{"description":"OAuth client saved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClientConfigResponse"}}}},"400":{"description":"The request body or providerId was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can configure an OAuth client.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Unknown providerId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnknownOAuthProviderError"}}}}},"parameters":[{"in":"path","name":"providerId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"clientId":{"type":"string","minLength":1,"maxLength":512},"clientSecret":{"type":"string","minLength":1,"maxLength":4096},"features":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128}},"tenantId":{"type":"string","minLength":1,"maxLength":253}}}}}}},"get":{"operationId":"getV1OauthProvidersByProviderIdClient","tags":["Authentication"],"summary":"Get an org's OAuth client configuration for a provider","description":"Admin-only. Returns setup status, the saved OAuth client id when configured, selected permission features, the callback redirect URI, and the full scope list members will be asked to approve. Never returns the client secret.","responses":{"200":{"description":"OAuth client configuration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClientConfigDetailResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can view an OAuth client configuration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Unknown providerId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnknownOAuthProviderError"}}}}},"parameters":[{"in":"path","name":"providerId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/v1/oauth-providers/{providerId}/connect/start":{"get":{"operationId":"getV1OauthProvidersByProviderIdConnectStart","tags":["Authentication"],"summary":"Begin connecting the calling member's account for a provider","description":"Returns an authorize URL to redirect the member's browser to. Requires the org to have already saved an OAuth client for this provider.","responses":{"200":{"description":"Authorize URL to redirect to.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthConnectStartResponse"}}}},"400":{"description":"Unknown providerId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The org has not configured an OAuth client for this provider yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClientNotConfiguredError"}}}}},"parameters":[{"in":"path","name":"providerId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/v1/mcp-connections/google-workspace/connect/start":{"get":{"operationId":"getV1McpConnectionsGoogleWorkspaceConnectStart","tags":["Authentication"],"summary":"Begin connecting the calling member to Google Workspace","description":"Native-provider twin of the external MCP connect/start route: returns an authorize URL for the browser, using the OAuth client the org saved for this provider.","responses":{"200":{"description":"Authorize URL, or already connected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NativeProviderConnectStartResponse"}}}},"400":{"description":"The OAuth client configuration is incomplete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The org has not configured an OAuth client for this provider yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClientNotConfiguredError"}}}}}}},"/v1/mcp-connections/microsoft-365/connect/start":{"get":{"operationId":"getV1McpConnectionsMicrosoft365ConnectStart","tags":["Authentication"],"summary":"Begin connecting the calling member to Microsoft 365","description":"Native-provider twin of the external MCP connect/start route: returns an authorize URL for the browser, using the OAuth client the org saved for this provider.","responses":{"200":{"description":"Authorize URL, or already connected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NativeProviderConnectStartResponse"}}}},"400":{"description":"The OAuth client configuration is incomplete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The org has not configured an OAuth client for this provider yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClientNotConfiguredError"}}}}}}},"/v1/oauth-providers/{providerId}/connect/callback":{"get":{"operationId":"getV1OauthProvidersByProviderIdConnectCallback","tags":["Authentication"],"summary":"OAuth callback for a provider","description":"The provider redirects here with code+state after the member consents. Identity is carried entirely by the signed state token, not a session cookie, since the redirect may arrive in a fresh browser context. Serves a small static HTML page that deep-links back to OpenWork.","responses":{"200":{"description":"Connected — a static success page.","content":{"text/html":{"schema":{"type":"string"}}}},"400":{"description":"Missing or invalid code/state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}}},"parameters":[{"in":"path","name":"providerId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/v1/oauth-providers/{providerId}/status":{"get":{"operationId":"getV1OauthProvidersByProviderIdStatus","tags":["Capability Sources"],"summary":"Check whether the calling member has connected a provider","description":"Read-only. Never returns a token — only whether a connection exists and which scopes/account it covers. Safe to expose to a harness so it can detect \"not connected\" and tell the human what to do.","responses":{"200":{"description":"Connection status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthProviderStatusResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"Unknown providerId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnknownOAuthProviderError"}}}}},"parameters":[{"in":"path","name":"providerId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/v1/oauth-providers/{providerId}/disconnect":{"post":{"operationId":"postV1OauthProvidersByProviderIdDisconnect","tags":["Capability Sources"],"summary":"Disconnect the calling member's account for a provider","description":"Removes the stored credential. Mutation — intentionally kept out of the agent-callable MCP surface (see policy.ts BLOCKED_OPERATION_IDS).","responses":{"200":{"description":"Disconnected."},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"Nothing was connected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"providerId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/v1/direct-uploads/google-workspace/drive-files":{"post":{"operationId":"postV1DirectUploadsGoogleWorkspaceDriveFiles","tags":["Direct uploads"],"summary":"Upload one multipart workspace file directly to Google Drive","description":"Authenticated host transport for openwork-cloud-uploads. The route immediately forwards the file to Google and does not persist it or expose its bytes to the model.","responses":{"200":{"description":"Google Drive file uploaded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUploadDriveFileResponse"}}}},"400":{"description":"The multipart upload was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Google account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceNeedsConnectionError"}}}},"502":{"description":"Google rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpstreamError"}}}}}}},"/v1/direct-uploads/google-workspace/gmail-drafts":{"post":{"operationId":"postV1DirectUploadsGoogleWorkspaceGmailDrafts","tags":["Direct uploads"],"summary":"Create a Gmail draft with direct multipart workspace attachments","description":"Authenticated host transport for openwork-cloud-uploads. The route immediately creates the draft and does not persist attachment bytes or expose them to the model.","responses":{"200":{"description":"Gmail draft created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceDraftResponse"}}}},"400":{"description":"The multipart draft request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Google account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceNeedsConnectionError"}}}},"502":{"description":"Google rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpstreamError"}}}}}}},"/v1/capabilities/google-workspace/gmail-messages":{"get":{"operationId":"getV1CapabilitiesGoogleWorkspaceGmailMessages","tags":["Capability Sources"],"summary":"List or search Gmail messages as the calling member","description":"Reads and searches inbox mail in the calling member's Gmail mailbox, using the Google account they connected through the org Google Workspace connection. Returns needs_connection when the member has not connected their Google account yet or the connection lacks Gmail read permission.","responses":{"200":{"description":"Gmail messages returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceGmailMessagesResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Google account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceNeedsConnectionError"}}}},"502":{"description":"Google rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpstreamError"}}}}},"parameters":[{"in":"query","name":"q","schema":{"type":"string","minLength":1,"maxLength":1000},"description":"Optional Gmail search query, using Gmail's search syntax."},{"in":"query","name":"maxResults","schema":{"default":10,"type":"integer","minimum":1,"maximum":25},"description":"Maximum messages to return, capped at 25."}]}},"/v1/capabilities/google-workspace/gmail-message/{messageId}":{"get":{"operationId":"getV1CapabilitiesGoogleWorkspaceGmailMessageByMessageId","tags":["Capability Sources"],"summary":"Read a Gmail message with its plain-text body as the calling member","description":"Reads one Gmail message, including decoded plain-text body content and attachment metadata, using the calling member's connected Google Workspace account. To download an attachment's bytes, pass its attachmentId to the gmail-attachment capability.","responses":{"200":{"description":"Gmail message returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceGmailMessageResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Google account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceNeedsConnectionError"}}}},"502":{"description":"Google rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpstreamError"}}}}},"parameters":[{"in":"path","name":"messageId","schema":{"type":"string","minLength":1,"maxLength":512},"required":true,"description":"Gmail message id."}]}},"/v1/capabilities/google-workspace/gmail-attachment/{messageId}/{attachmentId}":{"get":{"operationId":"getV1CapabilitiesGoogleWorkspaceGmailAttachmentByMessageIdByAttachmentId","tags":["Capability Sources"],"summary":"Download a Gmail attachment's bytes as the calling member","description":"Downloads one Gmail attachment (file) as base64-encoded bytes, using the messageId and the attachmentId from the gmail-message capability's attachments metadata. Decode dataBase64 locally to reconstruct the file, e.g. a PDF or spreadsheet, then extract its contents.","responses":{"200":{"description":"Gmail attachment returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceGmailAttachmentResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Google account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceNeedsConnectionError"}}}},"502":{"description":"Google rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpstreamError"}}}}},"parameters":[{"in":"path","name":"messageId","schema":{"type":"string","minLength":1,"maxLength":512},"required":true,"description":"Gmail message id that contains the attachment."},{"in":"path","name":"attachmentId","schema":{"type":"string","minLength":1,"maxLength":2048},"required":true,"description":"Attachment id from the gmail-message capability's attachments metadata."}]}},"/v1/capabilities/google-workspace/calendar-events":{"get":{"operationId":"getV1CapabilitiesGoogleWorkspaceCalendarEvents","tags":["Capability Sources"],"summary":"List Google Calendar events in a time range as the calling member","description":"Lists primary-calendar events for the calling member in a requested ISO time range, using their connected Google Workspace account.","responses":{"200":{"description":"Google Calendar events returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceCalendarEventsResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Google account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceNeedsConnectionError"}}}},"502":{"description":"Google rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpstreamError"}}}}},"parameters":[{"in":"query","name":"timeMin","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"required":true,"description":"Inclusive lower bound for event start time."},{"in":"query","name":"timeMax","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"required":true,"description":"Exclusive upper bound for event start time."},{"in":"query","name":"maxResults","schema":{"default":25,"type":"integer","minimum":1,"maximum":100},"description":"Maximum events to return, capped at 100."}]},"post":{"operationId":"postV1CapabilitiesGoogleWorkspaceCalendarEvents","tags":["Capability Sources"],"summary":"Create a Google Calendar event as the calling member","description":"Creates an event on the calling member's primary Google Calendar, using their connected Google Workspace account. Set createMeetLink to true to request a Google Meet conferencing link and return meetLink.","responses":{"200":{"description":"Google Calendar event created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceCreateCalendarEventResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Google account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceNeedsConnectionError"}}}},"502":{"description":"Google rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpstreamError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceCreateCalendarEventBody"}}}}}},"/v1/capabilities/google-workspace/calendar-event/{eventId}":{"patch":{"operationId":"patchV1CapabilitiesGoogleWorkspaceCalendarEventByEventId","tags":["Capability Sources"],"summary":"Add a Google Meet link to a Calendar event","description":"Updates one primary-calendar event by id to request Google Meet conferencing, using the calling member's connected Google Workspace account. Use this for an existing event that needs a Meet link without creating a duplicate.","responses":{"200":{"description":"Google Calendar event updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpdateCalendarEventResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Google account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceNeedsConnectionError"}}}},"502":{"description":"Google rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpstreamError"}}}}},"parameters":[{"in":"path","name":"eventId","schema":{"type":"string","minLength":1,"maxLength":512},"required":true,"description":"Google Calendar event id."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpdateCalendarEventBody"}}}}}},"/v1/capabilities/google-workspace/drive-files":{"get":{"operationId":"getV1CapabilitiesGoogleWorkspaceDriveFiles","tags":["Capability Sources"],"summary":"Search Google Drive files as the calling member","description":"Searches the calling member's Google Drive files by name and full text, using their connected Google Workspace account.","responses":{"200":{"description":"Google Drive files returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceDriveFilesResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Google account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceNeedsConnectionError"}}}},"502":{"description":"Google rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpstreamError"}}}}},"parameters":[{"in":"query","name":"query","schema":{"type":"string","minLength":1,"maxLength":500},"required":true,"description":"Text to search in Drive file names and full text."},{"in":"query","name":"maxResults","schema":{"default":10,"type":"integer","minimum":1,"maximum":25},"description":"Maximum files to return, capped at 25."}]}},"/v1/capabilities/google-workspace/drive-file/{fileId}":{"get":{"operationId":"getV1CapabilitiesGoogleWorkspaceDriveFileByFileId","tags":["Capability Sources"],"summary":"Read a Google Drive file's text or binary content as the calling member","description":"Reads one Google Drive file, exporting Google Docs editors files as plain text. Downloaded files are content-sniffed with strict UTF-8 detection, so text is returned regardless of MIME type; binary content is returned as standard base64 up to 10 MiB.","responses":{"200":{"description":"Google Drive file returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceDriveFileResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Google account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceNeedsConnectionError"}}}},"502":{"description":"Google rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpstreamError"}}}}},"parameters":[{"in":"path","name":"fileId","schema":{"type":"string","minLength":1,"maxLength":512},"required":true,"description":"Google Drive file id."}]}},"/v1/capabilities/google-workspace/drive-file-share/{fileId}":{"post":{"operationId":"postV1CapabilitiesGoogleWorkspaceDriveFileShareByFileId","tags":["Capability Sources"],"summary":"Share a Google Drive file with a person or the organization","description":"Creates a Drive permission for one file using the calling member's Google Workspace account. To share with one person pass type=user plus emailAddress; to share with the entire organization pass type=domain plus the org's Google Workspace domain (e.g. openworklabs.com). Sharing files not created through OpenWork needs the Full Drive access feature enabled by an admin.","responses":{"200":{"description":"Google Drive file shared.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceShareDriveFileResponse"}}}},"400":{"description":"The share request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Google account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceNeedsConnectionError"}}}},"502":{"description":"Google rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpstreamError"}}}}},"parameters":[{"in":"path","name":"fileId","schema":{"type":"string","minLength":1,"maxLength":512},"required":true,"description":"Google Drive file id."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceShareDriveFileBody"}}}}}},"/v1/capabilities/google-workspace/gmail-drafts":{"post":{"operationId":"postV1CapabilitiesGoogleWorkspaceGmailDrafts","tags":["Capability Sources"],"summary":"Create a Gmail draft or threaded reply draft without attachments","description":"Creates a plain-text Gmail draft in the calling member own mailbox. For workspace attachments, use the openwork-cloud-uploads gmail_create_draft_with_attachments action so file bytes stay outside model context. Set threadId for replies and forwards. Always share the returned draftUrl.","responses":{"200":{"description":"Draft created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceDraftResponse"}}}},"400":{"description":"The draft request was invalid.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidRequestError"},{"$ref":"#/components/schemas/GoogleWorkspaceMissingThreadIdError"}]}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Google account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceNeedsConnectionError"}}}},"502":{"description":"Google rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpstreamError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","minLength":3,"maxLength":320,"description":"Recipient email address."},"cc":{"description":"Optional comma-separated Cc email addresses.","type":"string","minLength":3,"maxLength":1000},"bcc":{"description":"Optional comma-separated Bcc email addresses.","type":"string","minLength":3,"maxLength":1000},"subject":{"type":"string","minLength":1,"maxLength":500,"description":"Draft subject line. For replies or forwards, include threadId; subjects starting with Re: or Fwd: are rejected without threadId so the draft stays on the existing conversation."},"body":{"type":"string","minLength":1,"maxLength":50000,"description":"Plain-text draft body. Write plain prose with no markdown syntax, separate paragraphs with blank lines, and do not hard-wrap prose. For threaded drafts, the server appends the quoted conversation automatically; do not include quoted history."},"threadId":{"description":"Gmail thread id to reply on. Required for replies and forwards; get it from the gmail-messages capability. When set, the draft is attached to that thread as a reply — keep the thread's subject (e.g. 'Re: …').","type":"string","minLength":1,"maxLength":512}},"required":["to","subject","body"],"additionalProperties":false}}}}}},"/v1/capabilities/microsoft-365/mail-messages":{"get":{"operationId":"getV1CapabilitiesMicrosoft365MailMessages","tags":["Capability Sources"],"summary":"List or search Outlook mail as the calling member","description":"Reads recent Outlook messages from the calling member's connected Microsoft 365 account. This capability is delegated and read-only.","responses":{"200":{"description":"Outlook messages returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365MailMessagesResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Microsoft account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365NeedsConnectionError"}}}},"502":{"description":"Microsoft Graph rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365GraphError"}}}}},"parameters":[{"in":"query","name":"search","schema":{"type":"string","minLength":1,"maxLength":1000},"description":"Optional Outlook message search text."},{"in":"query","name":"maxResults","schema":{"default":10,"type":"integer","minimum":1,"maximum":25},"description":"Maximum messages to return, capped at 25."}]}},"/v1/capabilities/microsoft-365/mail-message/{messageId}":{"get":{"operationId":"getV1CapabilitiesMicrosoft365MailMessageByMessageId","tags":["Capability Sources"],"summary":"Read an Outlook message as the calling member","description":"Reads one Outlook message and requests its body as plain text, using the calling member's delegated Microsoft 365 connection.","responses":{"200":{"description":"Outlook message returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365MailMessageResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Microsoft account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365NeedsConnectionError"}}}},"502":{"description":"Microsoft Graph rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365GraphError"}}}}},"parameters":[{"in":"path","name":"messageId","schema":{"type":"string","minLength":1,"maxLength":512},"required":true,"description":"Microsoft Graph message id."}]}},"/v1/capabilities/microsoft-365/calendar-events":{"get":{"operationId":"getV1CapabilitiesMicrosoft365CalendarEvents","tags":["Capability Sources"],"summary":"List Microsoft 365 calendar events as the calling member","description":"Lists the calling member's Outlook calendar events in a requested time range. This capability is delegated and read-only.","responses":{"200":{"description":"Outlook calendar events returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365CalendarEventsResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Microsoft account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365NeedsConnectionError"}}}},"502":{"description":"Microsoft Graph rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365GraphError"}}}}},"parameters":[{"in":"query","name":"timeMin","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"required":true,"description":"Inclusive lower bound for event start time."},{"in":"query","name":"timeMax","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"required":true,"description":"Exclusive upper bound for event start time."},{"in":"query","name":"maxResults","schema":{"default":25,"type":"integer","minimum":1,"maximum":100},"description":"Maximum events to return, capped at 100."}]},"post":{"operationId":"postV1CapabilitiesMicrosoft365CalendarEvents","tags":["Capability Sources"],"summary":"Create an Outlook calendar event as the calling member","description":"Creates an event in the calling member's default calendar. Adding attendees can send Microsoft calendar invitations.","responses":{"200":{"description":"Outlook calendar event created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365CalendarEventResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Microsoft account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365NeedsConnectionError"}}}},"502":{"description":"Microsoft Graph rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365GraphError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365CalendarEventBody"}}}}}},"/v1/capabilities/microsoft-365/drive-files":{"get":{"operationId":"getV1CapabilitiesMicrosoft365DriveFiles","tags":["Capability Sources"],"summary":"Search OneDrive files as the calling member","description":"Searches the calling member's OneDrive by name and content, returning source links. This capability is delegated and read-only.","responses":{"200":{"description":"OneDrive files returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365DriveFilesResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Microsoft account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365NeedsConnectionError"}}}},"502":{"description":"Microsoft Graph rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365GraphError"}}}}},"parameters":[{"in":"query","name":"query","schema":{"type":"string","minLength":1,"maxLength":500},"required":true,"description":"Text to search in OneDrive file names and content."},{"in":"query","name":"maxResults","schema":{"default":10,"type":"integer","minimum":1,"maximum":25},"description":"Maximum files to return, capped at 25."}]},"put":{"operationId":"putV1CapabilitiesMicrosoft365DriveFiles","tags":["Capability Sources"],"summary":"Create or replace a OneDrive text file as the calling member","description":"Creates or replaces a bounded UTF-8 text file at a path in the calling member's OneDrive.","responses":{"200":{"description":"OneDrive file written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365DriveFileWriteResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Microsoft account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365NeedsConnectionError"}}}},"502":{"description":"Microsoft Graph rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365GraphError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365DriveFileWriteBody"}}}}}},"/v1/capabilities/microsoft-365/drive-file/{itemId}":{"get":{"operationId":"getV1CapabilitiesMicrosoft365DriveFileByItemId","tags":["Capability Sources"],"summary":"Read a OneDrive text or binary file as the calling member","description":"Returns OneDrive metadata and content using strict-UTF-8 content sniffing: text is returned regardless of MIME type, while binary files are returned as standard base64 up to 10 MiB. Folders and oversized files return metadata with an explicit contentUnavailableReason.","responses":{"200":{"description":"OneDrive file returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365DriveFileResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Microsoft account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365NeedsConnectionError"}}}},"502":{"description":"Microsoft Graph rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365GraphError"}}}}},"parameters":[{"in":"path","name":"itemId","schema":{"type":"string","minLength":1,"maxLength":512},"required":true,"description":"Microsoft Graph drive item id."}]}},"/v1/capabilities/microsoft-365/mail-drafts":{"post":{"operationId":"postV1CapabilitiesMicrosoft365MailDrafts","tags":["Capability Sources"],"summary":"Create an Outlook draft as the calling member","description":"Creates a draft in the calling member's mailbox. It never sends the message. Microsoft requires delegated Mail.ReadWrite for draft creation.","responses":{"200":{"description":"Outlook draft created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365MailDraftResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Microsoft account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365NeedsConnectionError"}}}},"502":{"description":"Microsoft Graph rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365GraphError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365MailDraftBody"}}}}}},"/v1/capabilities/microsoft-365/teams-chats":{"get":{"operationId":"getV1CapabilitiesMicrosoft365TeamsChats","tags":["Capability Sources"],"summary":"List Microsoft Teams chats as the calling member","description":"Lists the calling member's Microsoft Teams chats using delegated Chat.Read permission.","responses":{"200":{"description":"Teams chats returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365TeamsChatsResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Microsoft account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365NeedsConnectionError"}}}},"502":{"description":"Microsoft Graph rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365GraphError"}}}}},"parameters":[{"in":"query","name":"maxResults","schema":{"default":20,"type":"integer","minimum":1,"maximum":50}}]}},"/v1/capabilities/microsoft-365/teams-chats/{chatId}/messages":{"get":{"operationId":"getV1CapabilitiesMicrosoft365TeamsChatsByChatIdMessages","tags":["Capability Sources"],"summary":"List messages in a Microsoft Teams chat as the calling member","description":"Reads recent messages from one Teams chat using delegated Chat.Read permission.","responses":{"200":{"description":"Teams chat messages returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365TeamsMessagesResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Microsoft account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365NeedsConnectionError"}}}},"502":{"description":"Microsoft Graph rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365GraphError"}}}}},"parameters":[{"in":"path","name":"chatId","schema":{"type":"string","minLength":1,"maxLength":1024},"required":true},{"in":"query","name":"maxResults","schema":{"default":20,"type":"integer","minimum":1,"maximum":50}}]},"post":{"operationId":"postV1CapabilitiesMicrosoft365TeamsChatsByChatIdMessages","tags":["Capability Sources"],"summary":"Send a message to an existing Microsoft Teams chat as the calling member","description":"Sends one message to an existing Teams chat. The operation cannot create a new chat.","responses":{"200":{"description":"Teams chat message sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365TeamsMessageResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Microsoft account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365NeedsConnectionError"}}}},"502":{"description":"Microsoft Graph rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365GraphError"}}}}},"parameters":[{"in":"path","name":"chatId","schema":{"type":"string","minLength":1,"maxLength":1024},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365TeamsMessageBody"}}}}}},"/v1/mcp-connections/discover":{"post":{"operationId":"postV1McpConnectionsDiscover","tags":["Authentication"],"summary":"Discover external MCP connection requirements","description":"Admin-only, side-effect-free requirements discovery. It performs no client registration, credential write, or connection creation.","responses":{"200":{"description":"Requirements discovery result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpRequirementsDiscovery"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can discover MCP requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"502":{"description":"Requirements discovery failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpRequirementsDiscoveryFailedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpRequirementsDiscoveryInput"}}}}}},"/v1/mcp-connections/{connectionId}/oauth/issuer-review":{"post":{"operationId":"postV1McpConnectionsByConnectionIdOauthIssuerReview","tags":["Authentication"],"summary":"Review a changed External MCP OAuth issuer","description":"Organization-admin-only. Repeats live OAuth discovery and either previews the issuers currently advertised by the MCP resource or explicitly confirms one. Confirmation never trusts an unadvertised issuer. Changing issuers invalidates issuer-bound OAuth clients and credentials so members reconnect cleanly.","responses":{"200":{"description":"Issuer review result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpIssuerReviewResponse"}}}},"400":{"description":"Invalid issuer review request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can review OAuth issuers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Unknown connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotFoundError"}}}},"409":{"description":"The connection changed or the requested issuer is not currently advertised.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionConflictError"}}}},"502":{"description":"Live OAuth discovery failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpRequirementsDiscoveryFailedError"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'emc_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpIssuerReviewInput"}}}}}},"/v1/mcp-connections/presets":{"get":{"operationId":"getV1McpConnectionsPresets","tags":["Capability Sources"],"summary":"List predefined External MCP Connection presets","description":"Common third-party MCP servers (Notion, Linear, Stripe, Slack, ...) an admin can add with one click, prefilled with a real name and URL.","responses":{"200":{"description":"Presets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpPresetListResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}}},"/v1/mcp-connections/resolve":{"post":{"operationId":"postV1McpConnectionsResolve","tags":["Authentication"],"summary":"Resolve a free-form query to an MCP server","description":"Admin-only, side-effect-free smart resolution for the add-connection flow. Accepts a URL, a bare host, or a product name (\"vercel\"), matches curated presets, probes bounded well-known endpoint candidates through the SSRF-guarded discovery fetch, and returns the winning URL with its requirements discovery. It performs no client registration, credential write, or connection creation.","responses":{"200":{"description":"Resolution result (not_found is a successful outcome).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpResolveResult"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can resolve MCP servers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpResolveInput"}}}}}},"/v1/mcp-connections":{"get":{"operationId":"getV1McpConnections","tags":["Capability Sources"],"summary":"List External MCP Connections","description":"scope=usable (default): connections the calling member has been granted (org-wide, direct, or via a team), with per-member connection status. scope=manageable: every org connection with access summaries — workspace owners and admins only.","responses":{"200":{"description":"Connections.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionListResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"scope=manageable requires a workspace owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}},"parameters":[{"in":"query","name":"scope","schema":{"default":"usable","type":"string","enum":["usable","manageable"]}}]},"post":{"operationId":"postV1McpConnections","tags":["Capability Sources"],"summary":"Register a new External MCP Connection for the org","description":"Admin-only. Registers a third-party MCP server by name + URL and grants access (org-wide, teams, or members). Use GET /v1/mcp-connections/presets for known server URLs (Notion, Linear, Stripe, Sentry, Slack, Context7). For credentialMode per_member, each member connects their own account afterwards — share links.yourConnections from the response so teammates know where to sign in. For servers with pre-registered OAuth apps, whitelist links.oauthCallback. API-key and OAuth-client credentials cannot be created through the agent surface; use the dashboard.","responses":{"200":{"description":"Connection created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionCreatedResponse"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can add MCP connections.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"502":{"description":"The upstream MCP server could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionValidationFailedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"native_provider"},"nativeProviderKey":{"type":"string","minLength":1,"maxLength":64},"name":{"type":"string","minLength":1,"maxLength":255},"oauthClient":{"type":"object","properties":{"clientId":{"type":"string","minLength":1,"maxLength":512},"clientSecret":{"type":"string","minLength":1,"maxLength":4096},"features":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128}}},"required":["clientId"]}},"required":["kind","nativeProviderKey","name","oauthClient"]},{"type":"object","properties":{"kind":{"type":"string","const":"external_mcp"},"name":{"type":"string","minLength":1,"maxLength":255},"url":{"type":"string","maxLength":2048,"format":"uri"},"authType":{"type":"string","enum":["oauth","apikey","none"]},"credentialMode":{"default":"shared","type":"string","enum":["shared","per_member"]},"apiKey":{"type":"string","minLength":1,"maxLength":4096},"oauthClient":{"type":"object","properties":{"clientId":{"type":"string","minLength":1,"maxLength":512},"clientSecret":{"type":"string","minLength":1,"maxLength":4096},"tokenEndpointAuthMethod":{"type":"string","enum":["client_secret_basic","client_secret_post"]}},"required":["clientId"]},"authorizationServerIssuer":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"requestedScopes":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}},"access":{"$ref":"#/components/schemas/ExternalMcpConnectionAccessInput"}},"required":["name","url","authType"]}]}}}}}},"/v1/mcp-connections/{connectionId}/tool-policy":{"get":{"operationId":"getV1McpConnectionsByConnectionIdToolPolicy","tags":["Capability Sources"],"summary":"Get the tool policy for an External MCP Connection","responses":{"200":{"description":"External MCP tool policy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionToolPolicyResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller must be a workspace owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Unknown connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotFoundError"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'emc_' prefix and a 26-character base32 suffix."}]},"put":{"operationId":"putV1McpConnectionsByConnectionIdToolPolicy","tags":["Capability Sources"],"summary":"Update the tool policy for an External MCP Connection","responses":{"200":{"description":"External MCP tool policy updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionToolPolicyResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller must be a workspace owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Unknown connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotFoundError"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'emc_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionToolPolicyInput"}}}}}},"/v1/mcp-connections/{connectionId}/tools":{"get":{"operationId":"getV1McpConnectionsByConnectionIdTools","tags":["Capability Sources"],"summary":"List tools exposed by an External MCP Connection","description":"Uses the Den-managed credential available to the calling member to read the live MCP tools/list catalog. Granted members can inspect connections available under Your Connections; workspace owners and admins can also inspect connections they manage. Credentials and tool calls are never returned.","responses":{"200":{"description":"External MCP tool catalog.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionToolListResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller has not been granted access to this connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Unknown connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotFoundError"}}}},"409":{"description":"The connection has no usable credential for this member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotReadyError"}}}},"502":{"description":"The upstream MCP tool catalog could not be read.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionToolListFailedError"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'emc_' prefix and a 26-character base32 suffix."}]}},"/v1/mcp-connections/{connectionId}/mcp-apps":{"get":{"operationId":"getV1McpConnectionsByConnectionIdMcpApps","tags":["Capability Sources"],"summary":"List MCP Apps exposed by an External MCP Connection","description":"Enumerates the connection's app-visible MCP App launch tools in the exact reference shape desktop dashboard tiles use, so organization Dashboards can add them as elements. Admin-only.","responses":{"200":{"description":"MCP Apps available from this connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionMcpAppListResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can list connection MCP Apps.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Unknown connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotFoundError"}}}},"409":{"description":"The connection has no usable credential for this member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotReadyError"}}}},"502":{"description":"The upstream MCP tool catalog could not be read.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionToolListFailedError"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'emc_' prefix and a 26-character base32 suffix."}]}},"/v1/mcp-connections/{connectionId}/tools/call":{"post":{"operationId":"postV1McpConnectionsByConnectionIdToolsCall","tags":["Authentication"],"summary":"Manually run a tool from an External MCP Connection","description":"Workspace owner/admin diagnostic runner. Executes one named MCP tool with caller-supplied JSON arguments using the Den-managed shared credential or the calling admin's connected credential. Returns an ephemeral inspection of the actual tools/call HTTP request and response with credential and session headers redacted. The caller must already be granted access to the connection. Credentials, arguments, results, and inspection payloads are never written to logs.","responses":{"200":{"description":"The MCP tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionToolRunResponse"}}}},"400":{"description":"Invalid tool name or arguments.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller must be a workspace owner/admin, have access, and be allowed by tool policy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionToolRunForbiddenError"}}}},"404":{"description":"Unknown connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotFoundError"}}}},"409":{"description":"The connection has no usable credential for this member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotReadyError"}}}},"413":{"description":"The tool arguments exceeded the request size limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionToolRequestTooLargeError"}}}},"502":{"description":"The upstream MCP tool call failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionToolRunFailedError"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'emc_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionToolRunInput"}}}}}},"/v1/mcp-connections/{connectionId}":{"put":{"operationId":"putV1McpConnectionsByConnectionId","tags":["Authentication"],"summary":"Edit an External MCP Connection","description":"Workspace owners and super-admins can edit any connection. Other org members can edit only connections they created. Name and direct access changes preserve credentials. URL, authentication type, or credential-mode changes invalidate the old identity atomically. Secret fields are write-only optional replacements and are never returned. expectedUpdatedAt prevents stale edits.","responses":{"200":{"description":"Connection updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionUpdatedResponse"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners, super-admins, or the connection creator can edit MCP connections.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Unknown connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotFoundError"}}}},"409":{"description":"The edit is stale or changes marketplace-owned identity fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionUpdateConflictError"}}}},"502":{"description":"The proposed API-key or no-auth configuration could not be validated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionValidationFailedError"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'emc_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedUpdatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"name":{"type":"string","minLength":1,"maxLength":255},"url":{"type":"string","maxLength":2048,"format":"uri"},"authType":{"type":"string","enum":["oauth","apikey","none"]},"credentialMode":{"type":"string","enum":["shared","per_member"]},"apiKey":{"type":"string","minLength":1,"maxLength":4096},"oauthClient":{"type":"object","properties":{"clientId":{"type":"string","minLength":1,"maxLength":512},"clientSecret":{"type":"string","minLength":1,"maxLength":4096},"tokenEndpointAuthMethod":{"type":"string","enum":["client_secret_basic","client_secret_post"]}},"required":["clientId"]},"authorizationServerIssuer":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"requestedScopes":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}},"access":{"$ref":"#/components/schemas/ExternalMcpConnectionAccessInput"}},"required":["expectedUpdatedAt","name","url","authType","credentialMode","access"]}}}}},"delete":{"operationId":"deleteV1McpConnectionsByConnectionId","tags":["Authentication"],"summary":"Remove an External MCP Connection","responses":{"200":{"description":"Removed."},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners, super-admins, or the connection creator can remove MCP connections.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Unknown connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotFoundError"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'emc_' prefix and a 26-character base32 suffix."}]}},"/v1/mcp-connections/{connectionId}/access":{"put":{"operationId":"putV1McpConnectionsByConnectionIdAccess","tags":["Capability Sources"],"summary":"Replace who can use an External MCP Connection","description":"Admin-only. Full-replace semantics: send the complete desired access set (orgWide, or memberIds + teamIds). Team and member ids come from GET /v1/org.","responses":{"200":{"description":"Access updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionResponse"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can change connection access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Unknown connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotFoundError"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'emc_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"access":{"$ref":"#/components/schemas/ExternalMcpConnectionAccessInput"}},"required":["access"]}}}}}},"/v1/mcp-connections/{connectionId}/disconnect":{"post":{"operationId":"postV1McpConnectionsByConnectionIdDisconnect","tags":["Authentication"],"summary":"Disconnect (clear credentials for) an External MCP Connection without removing it","description":"Admin-only. Signs out every shared or per-member account stored for this connection, while preserving the connection row, access grants, OAuth client configuration, and plugin bindings.","responses":{"200":{"description":"Disconnected."},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can disconnect MCP connections.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Unknown connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotFoundError"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'emc_' prefix and a 26-character base32 suffix."}]}},"/v1/mcp-connections/{connectionId}/disconnect-my-account":{"post":{"operationId":"postV1McpConnectionsByConnectionIdDisconnectMyAccount","tags":["Authentication"],"summary":"Disconnect the calling member's account for a per-member External MCP Connection","description":"Removes only the caller's connected account for this MCP connection. The org-level connection, access grants, OAuth client configuration, and other members' accounts are preserved.","responses":{"200":{"description":"Disconnected."},"400":{"description":"This connection does not use per-member credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"Unknown connection or nothing was connected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotFoundError"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'emc_' prefix and a 26-character base32 suffix."}]}},"/v1/mcp-connections/{connectionId}/connect/start":{"get":{"operationId":"getV1McpConnectionsByConnectionIdConnectStart","tags":["Authentication"],"summary":"Begin the OAuth handshake for an External MCP Connection","description":"Runs RFC 9728 discovery, dynamic client registration if needed, and returns an authorize URL to redirect the admin's browser to.","responses":{"200":{"description":"Authorize URL, or already connected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectStartResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"Unknown connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotFoundError"}}}},"409":{"description":"The OAuth connection requires provider or issuer configuration before connecting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectStartConflictError"}}}},"502":{"description":"OAuth handshake failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectStartFailedError"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'emc_' prefix and a 26-character base32 suffix."}]}},"/v1/mcp-connections/oauth/callback":{"get":{"operationId":"getV1McpConnectionsOauthCallback","tags":["Authentication"],"summary":"Shared OAuth callback for External MCP Connections","description":"Deployment-wide callback. Organization, member, and connection routing are derived exclusively from signed state.","responses":{"200":{"description":"Connected — a static success page.","content":{"text/html":{"schema":{"type":"string"}}}},"400":{"description":"Missing or invalid code/state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}}}}},"/v1/mcp-connections/{connectionId}/connect/callback":{"get":{"operationId":"getV1McpConnectionsByConnectionIdConnectCallback","tags":["Authentication"],"summary":"OAuth callback for an External MCP Connection","description":"The external MCP server redirects here with code+state after the admin consents. Serves a small static HTML page — the admin's Den tab in the background polls connection status and never needs this response body.","responses":{"200":{"description":"Connected — a static success page.","content":{"text/html":{"schema":{"type":"string"}}}},"400":{"description":"Missing or invalid code/state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'emc_' prefix and a 26-character base32 suffix."}]}},"/v1/connectors/github/install/start":{"post":{"operationId":"postV1ConnectorsGithubInstallStart","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"returnPath":{"type":"string","minLength":1,"maxLength":1024}},"required":["returnPath"]}}}},"tags":["GitHub"],"summary":"Start GitHub install","description":"Builds a GitHub App install redirect URL for the current organization.","responses":{"200":{"description":"GitHub install redirect returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchGithubInstallStartResponse"}}}},"400":{"description":"The GitHub install request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to connect GitHub.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to connect GitHub.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}}},"/v1/connectors/github/install/complete":{"post":{"operationId":"postV1ConnectorsGithubInstallComplete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"installationId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"state":{"type":"string","minLength":1,"maxLength":4096}},"required":["installationId","state"]}}}},"tags":["GitHub"],"summary":"Complete GitHub install","description":"Completes a GitHub App installation for the current organization and returns visible repositories.","responses":{"200":{"description":"GitHub installation completed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchGithubInstallCompleteResponse"}}}},"400":{"description":"The GitHub install completion request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to complete GitHub connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to complete GitHub connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}}},"/v1/config-objects":{"get":{"operationId":"getV1ConfigObjects","parameters":[{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"type","schema":{"type":"string","enum":["skill","agent","command","tool","mcp","hook","context","custom","script","workflow","app"]}},{"in":"query","name":"status","schema":{"type":"string","enum":["active","inactive","deleted","archived","ingestion_error"]}},{"in":"query","name":"sourceMode","schema":{"type":"string","enum":["cloud","import","connector"]}},{"in":"query","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."},{"in":"query","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."},{"in":"query","name":"includeDeleted","schema":{"type":"string","enum":["true","false"]}},{"in":"query","name":"q","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["Config Objects"],"summary":"List config objects","description":"Lists current config object projections visible to the current organization member.","responses":{"200":{"description":"Config objects returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConfigObjectListResponse"}}}},"400":{"description":"The config object query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list config objects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}},"post":{"operationId":"postV1ConfigObjects","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["skill","agent","command","tool","mcp","hook","context","custom","script","workflow","app"]},"sourceMode":{"type":"string","enum":["cloud","import","connector"]},"pluginIds":{"maxItems":100,"type":"array","items":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30}},"input":{"type":"object","properties":{"rawSourceText":{"type":"string","minLength":1},"normalizedPayloadJson":{"type":"object","properties":{},"additionalProperties":{}},"parserMode":{"type":"string","minLength":1,"maxLength":100},"schemaVersion":{"type":"string","minLength":1,"maxLength":100},"metadata":{"type":"object","properties":{},"additionalProperties":{}}}}},"required":["type","sourceMode","input"]}}}},"tags":["Config Objects"],"summary":"Create config object","description":"Creates a new private config object and initial immutable version.","responses":{"201":{"description":"Config object created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConfigObjectMutationResponse"}}}},"400":{"description":"The config object creation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create config objects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to create config objects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}}},"/v1/config-objects/{configObjectId}":{"get":{"operationId":"getV1ConfigObjectsByConfigObjectId","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."}],"tags":["Config Objects"],"summary":"Get config object","description":"Returns one config object detail when the caller can view it.","responses":{"200":{"description":"Config object returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConfigObjectDetailResponse"}}}},"400":{"description":"The config object path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view config objects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The config object could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/config-objects/{configObjectId}/versions":{"post":{"operationId":"postV1ConfigObjectsByConfigObjectIdVersions","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"rawSourceText":{"type":"string","minLength":1},"normalizedPayloadJson":{"type":"object","properties":{},"additionalProperties":{}},"parserMode":{"type":"string","minLength":1,"maxLength":100},"schemaVersion":{"type":"string","minLength":1,"maxLength":100},"metadata":{"type":"object","properties":{},"additionalProperties":{}}}},"reason":{"type":"string","minLength":1,"maxLength":255}},"required":["input"]}}}},"tags":["Config Objects"],"summary":"Update config object with new version","description":"Updates an existing config object, including a Cloud skill, by creating a new immutable version without creating a duplicate.","responses":{"201":{"description":"Config object version created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConfigObjectMutationResponse"}}}},"400":{"description":"The config object version request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create config object versions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this config object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The config object could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"get":{"operationId":"getV1ConfigObjectsByConfigObjectIdVersions","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"includeDeleted","schema":{"type":"string","enum":["true","false"]}}],"tags":["Config Objects"],"summary":"List config object versions","description":"Returns immutable versions for one config object.","responses":{"200":{"description":"Config object versions returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConfigObjectVersionListResponse"}}}},"400":{"description":"The version list request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view config object versions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The config object could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/config-objects/{configObjectId}/versions/{versionId}":{"get":{"operationId":"getV1ConfigObjectsByConfigObjectIdVersionsByVersionId","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."},{"in":"path","name":"versionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cov_' prefix and a 26-character base32 suffix."}],"tags":["Config Objects"],"summary":"Get config object version","description":"Returns one immutable config object version.","responses":{"200":{"description":"Config object version returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConfigObjectVersionDetailResponse"}}}},"400":{"description":"The version path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view config object versions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The config object version could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/config-objects/{configObjectId}/versions/latest":{"get":{"operationId":"getV1ConfigObjectsByConfigObjectIdVersionsLatest","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."}],"tags":["Config Objects"],"summary":"Get latest config object version","description":"Returns the latest config object version by created_at and id ordering.","responses":{"200":{"description":"Latest config object version returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConfigObjectVersionDetailResponse"}}}},"400":{"description":"The latest-version path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view config object versions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The config object version could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/config-objects/{configObjectId}/archive":{"post":{"operationId":"postV1ConfigObjectsByConfigObjectIdArchive","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."}],"tags":["Config Objects"],"summary":"archive config object","description":"archive a config object without removing its history.","responses":{"200":{"description":"Config object lifecycle updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConfigObjectMutationResponse"}}}},"400":{"description":"The lifecycle path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage config objects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage this config object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The config object could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/config-objects/{configObjectId}/delete":{"post":{"operationId":"postV1ConfigObjectsByConfigObjectIdDelete","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."}],"tags":["Config Objects"],"summary":"delete config object","description":"delete a config object without removing its history.","responses":{"200":{"description":"Config object lifecycle updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConfigObjectMutationResponse"}}}},"400":{"description":"The lifecycle path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage config objects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage this config object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The config object could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/config-objects/{configObjectId}/restore":{"post":{"operationId":"postV1ConfigObjectsByConfigObjectIdRestore","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."}],"tags":["Config Objects"],"summary":"restore config object","description":"restore a config object without removing its history.","responses":{"200":{"description":"Config object lifecycle updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConfigObjectMutationResponse"}}}},"400":{"description":"The lifecycle path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage config objects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage this config object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The config object could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/config-objects/{configObjectId}/plugins":{"get":{"operationId":"getV1ConfigObjectsByConfigObjectIdPlugins","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."}],"tags":["Config Objects"],"summary":"List config object plugins","description":"Lists plugins that currently include the config object.","responses":{"200":{"description":"Config object plugins returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginMembershipListResponse"}}}},"400":{"description":"The config object plugin path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view config object plugins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The config object could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"post":{"operationId":"postV1ConfigObjectsByConfigObjectIdPlugins","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pluginId":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"membershipSource":{"type":"string","enum":["manual","connector","api","system"]}},"required":["pluginId"]}}}},"tags":["Config Objects"],"summary":"Attach config object to plugin","description":"Adds a config object to a plugin when the caller can edit the target plugin.","responses":{"201":{"description":"Plugin membership created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginMembershipMutationResponse"}}}},"400":{"description":"The plugin membership request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage plugin membership.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit the target plugin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The config object or plugin could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/config-objects/{configObjectId}/plugins/{pluginId}":{"delete":{"operationId":"deleteV1ConfigObjectsByConfigObjectIdPluginsByPluginId","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."},{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"tags":["Config Objects"],"summary":"Remove config object from plugin","description":"Removes one active plugin membership from a config object.","responses":{"204":{"description":"Plugin membership removed successfully."},"400":{"description":"The plugin membership path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage plugin membership.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit the target plugin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The plugin membership could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/config-objects/{configObjectId}/access":{"get":{"operationId":"getV1ConfigObjectsByConfigObjectIdAccess","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."}],"tags":["Config Objects"],"summary":"List config object access grants","description":"Lists direct, team, and org-wide grants for one config object.","responses":{"200":{"description":"Config object access grants returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchAccessGrantListResponse"}}}},"400":{"description":"The access path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage config object access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage config object access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The config object could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"post":{"operationId":"postV1ConfigObjectsByConfigObjectIdAccess","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29},"teamId":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"orgWide":{"default":false,"type":"boolean"},"role":{"type":"string","enum":["viewer","editor","manager"]}},"required":["role"]}}}},"tags":["Config Objects"],"summary":"Grant config object access","description":"Creates or reactivates one access grant for a config object.","responses":{"201":{"description":"Config object access grant created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchAccessGrantMutationResponse"}}}},"400":{"description":"The access grant request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage config object access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage config object access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The config object could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/config-objects/{configObjectId}/access/{grantId}":{"delete":{"operationId":"deleteV1ConfigObjectsByConfigObjectIdAccessByGrantId","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."},{"in":"path","name":"grantId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'coa_' prefix and a 26-character base32 suffix."}],"tags":["Config Objects"],"summary":"Revoke config object access","description":"Soft-revokes one config object access grant.","responses":{"204":{"description":"Config object access revoked successfully."},"400":{"description":"The access grant path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage config object access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage config object access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The access grant could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins":{"get":{"operationId":"getV1Plugins","parameters":[{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"status","schema":{"type":"string","enum":["active","inactive","deleted","archived"]}},{"in":"query","name":"q","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["Plugins"],"summary":"List plugins","description":"Lists plugins visible to the current organization member.","responses":{"200":{"description":"Plugins returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginListResponse"}}}},"400":{"description":"The plugin query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list plugins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}},"post":{"operationId":"postV1Plugins","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"sourceRepositoryUrl":{"type":"string","minLength":1,"maxLength":1024},"components":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["skill","agent","command","tool","mcp","hook","context","custom","script","workflow","app"]},"input":{"type":"object","properties":{"rawSourceText":{"type":"string","minLength":1},"normalizedPayloadJson":{"type":"object","properties":{},"additionalProperties":{}},"parserMode":{"type":"string","minLength":1,"maxLength":100},"schemaVersion":{"type":"string","minLength":1,"maxLength":100},"metadata":{"type":"object","properties":{},"additionalProperties":{}}}}},"required":["type","input"]}},"orgWide":{"type":"boolean"},"marketplaceId":{"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30}},"required":["name"]}}}},"tags":["Plugins"],"summary":"Create plugin","description":"Creates a plugin and can also create components, share org-wide, and publish to a marketplace in one request.","responses":{"201":{"description":"Plugin created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginMutationResponse"}}}},"400":{"description":"The plugin creation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create plugins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to create plugins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The marketplace could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins/{pluginId}":{"get":{"operationId":"getV1PluginsByPluginId","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"tags":["Plugins"],"summary":"Get plugin","description":"Returns one plugin detail when the caller can view it.","responses":{"200":{"description":"Plugin returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginDetailResponse"}}}},"400":{"description":"The plugin path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view plugins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The plugin could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"patch":{"operationId":"patchV1PluginsByPluginId","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}}}}}},"tags":["Plugins"],"summary":"Update plugin","description":"Updates plugin metadata.","responses":{"200":{"description":"Plugin updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginMutationResponse"}}}},"400":{"description":"The plugin update request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update plugins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this plugin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The plugin could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins/{pluginId}/archive":{"post":{"operationId":"postV1PluginsByPluginIdArchive","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"tags":["Plugins"],"summary":"archive plugin","description":"archive a plugin without touching its historical memberships.","responses":{"200":{"description":"Plugin lifecycle updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginMutationResponse"}}}},"400":{"description":"The plugin lifecycle path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage plugins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage this plugin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The plugin could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins/{pluginId}/restore":{"post":{"operationId":"postV1PluginsByPluginIdRestore","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"tags":["Plugins"],"summary":"restore plugin","description":"restore a plugin without touching its historical memberships.","responses":{"200":{"description":"Plugin lifecycle updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginMutationResponse"}}}},"400":{"description":"The plugin lifecycle path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage plugins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage this plugin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The plugin could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins/{pluginId}/config-objects":{"get":{"operationId":"getV1PluginsByPluginIdConfigObjects","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"tags":["Plugins"],"summary":"List plugin config objects","description":"Lists plugin memberships and resolved config object projections.","responses":{"200":{"description":"Plugin memberships returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginMembershipListResponse"}}}},"400":{"description":"The plugin membership path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view plugin memberships.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The plugin could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"post":{"operationId":"postV1PluginsByPluginIdConfigObjects","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"configObjectId":{"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"membershipSource":{"type":"string","enum":["manual","connector","api","system"]}},"required":["configObjectId"]}}}},"tags":["Plugins"],"summary":"Add plugin config object","description":"Adds a config object to a plugin. Workflows require manager access because this can expand their audience through Plugin and Marketplace grants.","responses":{"201":{"description":"Plugin membership created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginMembershipMutationResponse"}}}},"400":{"description":"The plugin membership request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage plugin memberships.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this plugin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The plugin or config object could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins/{pluginId}/config-objects/{configObjectId}":{"delete":{"operationId":"deleteV1PluginsByPluginIdConfigObjectsByConfigObjectId","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."},{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."}],"tags":["Plugins"],"summary":"Remove plugin config object","description":"Removes one config object from a plugin. Workflows require manager access because this revokes inherited Plugin or Marketplace access.","responses":{"204":{"description":"Plugin membership removed successfully."},"400":{"description":"The plugin membership path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage plugin memberships.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this plugin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The plugin membership could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins/{pluginId}/resolved":{"get":{"operationId":"getV1PluginsByPluginIdResolved","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"tags":["Plugins"],"summary":"Get resolved plugin","description":"Lists active plugin memberships with the current config object projection for each item.","responses":{"200":{"description":"Resolved plugin returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginMembershipListResponse"}}}},"400":{"description":"The plugin path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view resolved plugins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The plugin could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins/{pluginId}/mcp-connections":{"post":{"operationId":"postV1PluginsByPluginIdMcpConnections","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"configObjectId":{"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"serverName":{"type":"string","minLength":1,"maxLength":255},"authType":{"default":"oauth","type":"string","enum":["oauth","apikey","none"]},"credentialMode":{"type":"string","enum":["shared","per_member"]},"apiKey":{"type":"string","minLength":1,"maxLength":4096},"oauthClient":{"type":"object","properties":{"clientId":{"type":"string","minLength":1,"maxLength":512},"clientSecret":{"type":"string","minLength":1,"maxLength":4096}},"required":["clientId"]}},"required":["configObjectId","serverName"]}}}},"tags":["Plugins"],"summary":"Configure plugin MCP requirement","description":"Admin-only privileged setup for one declared remote MCP server. The server name and URL are derived from the active plugin config object; the request never supplies a URL and does not start OAuth.","responses":{"200":{"description":"Plugin MCP requirement configured successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginMcpRequirementConfigureResponse"}}}},"400":{"description":"The plugin MCP requirement request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to configure plugin MCP requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can configure plugin MCP requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The plugin MCP requirement could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins/import-mcps-from-github-url/preview":{"post":{"operationId":"postV1PluginsImportMcpsFromGithubUrlPreview","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"githubUrl":{"type":"string","maxLength":2048,"format":"uri"}},"required":["githubUrl"]}}}},"tags":["GitHub"],"summary":"Preview GitHub plugin marketplace import","description":"Reads a public GitHub plugin URL and returns skills and remote MCP servers that can be imported into an organization marketplace.","responses":{"200":{"description":"GitHub plugin MCP import preview returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubPluginMcpImportPreviewResponse"}}}},"400":{"description":"The GitHub plugin MCP import preview request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to preview plugin MCP imports.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The GitHub plugin path could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins/import-mcps-from-github-url":{"post":{"operationId":"postV1PluginsImportMcpsFromGithubUrl","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"githubUrl":{"type":"string","maxLength":2048,"format":"uri"},"access":{"type":"object","properties":{"orgWide":{"default":true,"type":"boolean"},"memberIds":{"maxItems":200,"type":"array","items":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29}},"teamIds":{"maxItems":200,"type":"array","items":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30}}}},"authType":{"default":"oauth","type":"string","enum":["oauth","none"]},"credentialMode":{"default":"per_member","type":"string","enum":["shared","per_member"]},"description":{"anyOf":[{"type":"string","maxLength":65535},{"type":"null"}]},"marketplaceId":{"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":255},"selectedSkillKeys":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"selectedServerKeys":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"selectedServerNames":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}}},"required":["githubUrl"]}}}},"tags":["GitHub"],"summary":"Create a plugin from GitHub","description":"Creates one plugin from selected skills and remote MCP servers in a public GitHub plugin URL, applies the requested access grants, and optionally publishes it into an organization marketplace. Declared and known-server authentication requirements take precedence over the request-wide auth fallback.","responses":{"200":{"description":"GitHub plugin MCPs imported successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubPluginMcpImportResponse"}}}},"400":{"description":"The GitHub plugin MCP import request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to import plugin MCPs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to import plugin MCPs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The GitHub plugin path or marketplace could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins/{pluginId}/access":{"get":{"operationId":"getV1PluginsByPluginIdAccess","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"tags":["Plugins"],"summary":"List plugin access grants","description":"Lists direct, team, and org-wide grants for a plugin.","responses":{"200":{"description":"Plugin access grants returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchAccessGrantListResponse"}}}},"400":{"description":"The plugin access path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage plugin access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage plugin access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The plugin could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"post":{"operationId":"postV1PluginsByPluginIdAccess","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29},"teamId":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"orgWide":{"default":false,"type":"boolean"},"role":{"type":"string","enum":["viewer","editor","manager"]}},"required":["role"]}}}},"tags":["Plugins"],"summary":"Grant plugin access","description":"Creates or reactivates one access grant for a plugin.","responses":{"201":{"description":"Plugin access grant created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchAccessGrantMutationResponse"}}}},"400":{"description":"The plugin access request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage plugin access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage plugin access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The plugin could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/me/plugin-access":{"get":{"operationId":"getV1MePluginAccess","tags":["Plugins"],"summary":"List my effective plugin access","description":"Lists active plugins in the caller's organization library and every access edge that applies to the caller.","responses":{"200":{"description":"Effective member plugin access returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchMePluginAccess"}}},"required":["items"]}}}},"401":{"description":"The caller must be signed in to view plugin access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}}},"/v1/me/library":{"get":{"operationId":"getV1MeLibrary","tags":["Plugins"],"summary":"List my library","description":"Lists the Workflows, Remote MCP Apps, plugins, and connections the caller can use, with every applicable access edge. Workflows and Remote MCP Apps remain config objects contained by their parent OpenWork Connect Plugin.","responses":{"200":{"description":"Effective member library returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchMeLibraryListResponse"}}}},"401":{"description":"The caller must be signed in to view their library.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}}},"/v1/teams/{teamId}/plugin-access":{"get":{"operationId":"getV1TeamsByTeamIdPluginAccess","parameters":[{"in":"path","name":"teamId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix."}],"tags":["Plugins"],"summary":"List effective team plugin access","description":"Lists plugins available to a team through direct grants, marketplace grants, and organization-wide grants.","responses":{"200":{"description":"Effective team plugin access returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchTeamPluginAccess"}}},"required":["items"]}}}},"400":{"description":"The team access path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view team plugin access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to view this team's plugin access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The team could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins/{pluginId}/access/{grantId}":{"delete":{"operationId":"deleteV1PluginsByPluginIdAccessByGrantId","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."},{"in":"path","name":"grantId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'pag_' prefix and a 26-character base32 suffix."}],"tags":["Plugins"],"summary":"Revoke plugin access","description":"Soft-revokes one plugin access grant.","responses":{"204":{"description":"Plugin access revoked successfully."},"400":{"description":"The plugin access path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage plugin access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage plugin access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The access grant could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/marketplaces":{"get":{"operationId":"getV1Marketplaces","parameters":[{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"status","schema":{"type":"string","enum":["active","inactive","deleted","archived"]}},{"in":"query","name":"q","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["Marketplaces"],"summary":"List marketplaces","description":"Lists marketplaces visible to the current organization member.","responses":{"200":{"description":"Marketplaces returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchMarketplaceListResponse"}}}},"400":{"description":"The marketplace query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list marketplaces.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}},"post":{"operationId":"postV1Marketplaces","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"logoUrl":{"anyOf":[{"type":"string","minLength":1,"maxLength":1024},{"type":"null"}]}},"required":["name"]}}}},"tags":["Marketplaces"],"summary":"Create marketplace","description":"Creates a new private marketplace and grants the creator manager access.","responses":{"201":{"description":"Marketplace created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchMarketplaceMutationResponse"}}}},"400":{"description":"The marketplace creation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create marketplaces.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to create marketplaces.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}}},"/v1/marketplaces/{marketplaceId}":{"get":{"operationId":"getV1MarketplacesByMarketplaceId","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."}],"tags":["Marketplaces"],"summary":"Get marketplace","description":"Returns one marketplace detail when the caller can view it.","responses":{"200":{"description":"Marketplace returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchMarketplaceDetailResponse"}}}},"400":{"description":"The marketplace path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view marketplaces.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The marketplace could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"patch":{"operationId":"patchV1MarketplacesByMarketplaceId","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"logoUrl":{"anyOf":[{"type":"string","minLength":1,"maxLength":1024},{"type":"null"}]}}}}}},"tags":["Marketplaces"],"summary":"Update marketplace","description":"Updates marketplace metadata.","responses":{"200":{"description":"Marketplace updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchMarketplaceMutationResponse"}}}},"400":{"description":"The marketplace update request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update marketplaces.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The marketplace could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/marketplaces/{marketplaceId}/archive":{"post":{"operationId":"postV1MarketplacesByMarketplaceIdArchive","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."}],"tags":["Marketplaces"],"summary":"archive marketplace","description":"archive a marketplace without deleting its plugins.","responses":{"200":{"description":"Marketplace lifecycle updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchMarketplaceMutationResponse"}}}},"400":{"description":"The marketplace lifecycle path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage marketplaces.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The marketplace could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/marketplaces/{marketplaceId}/delete":{"post":{"operationId":"postV1MarketplacesByMarketplaceIdDelete","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."}],"tags":["Marketplaces"],"summary":"delete marketplace","description":"Permanently deletes a custom marketplace and its relationships.","responses":{"200":{"description":"Marketplace lifecycle updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchMarketplaceMutationResponse"}}}},"400":{"description":"The marketplace lifecycle path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage marketplaces.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The marketplace could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"A built-in or connector-managed marketplace cannot be deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchMarketplaceConflictError"}}}}}}},"/v1/marketplaces/{marketplaceId}/restore":{"post":{"operationId":"postV1MarketplacesByMarketplaceIdRestore","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."}],"tags":["Marketplaces"],"summary":"restore marketplace","description":"restore a marketplace without deleting its plugins.","responses":{"200":{"description":"Marketplace lifecycle updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchMarketplaceMutationResponse"}}}},"400":{"description":"The marketplace lifecycle path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage marketplaces.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The marketplace could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/marketplaces/{marketplaceId}/plugins":{"get":{"operationId":"getV1MarketplacesByMarketplaceIdPlugins","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."}],"tags":["Marketplaces"],"summary":"List marketplace plugins","description":"Lists marketplace memberships and resolved plugin projections.","responses":{"200":{"description":"Marketplace memberships returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchMarketplacePluginListResponse"}}}},"400":{"description":"The marketplace membership path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view marketplace memberships.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The marketplace could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"post":{"operationId":"postV1MarketplacesByMarketplaceIdPlugins","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pluginId":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"membershipSource":{"type":"string","enum":["manual","connector","api","system"]}},"required":["pluginId"]}}}},"tags":["Marketplaces"],"summary":"Add marketplace plugin","description":"Adds a plugin to a marketplace.","responses":{"201":{"description":"Marketplace membership created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchMarketplacePluginMutationResponse"}}}},"400":{"description":"The marketplace membership request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage marketplace memberships.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The marketplace or plugin could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/marketplaces/{marketplaceId}/resolved":{"get":{"operationId":"getV1MarketplacesByMarketplaceIdResolved","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."}],"tags":["Marketplaces"],"summary":"Get resolved marketplace plugin readiness","description":"Returns marketplace detail with plugins, derived source info, and each plugin's cloud readiness or required setup state.","responses":{"200":{"description":"Marketplace resolved detail returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchMarketplaceResolvedResponse"}}}},"400":{"description":"The marketplace path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view marketplaces.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The marketplace could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/marketplaces/{marketplaceId}/plugins/{pluginId}":{"delete":{"operationId":"deleteV1MarketplacesByMarketplaceIdPluginsByPluginId","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."},{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"tags":["Marketplaces"],"summary":"Remove marketplace plugin","description":"Removes one plugin from a marketplace.","responses":{"204":{"description":"Marketplace membership removed successfully."},"400":{"description":"The marketplace membership path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage marketplace memberships.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The marketplace membership could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/marketplaces/{marketplaceId}/access":{"get":{"operationId":"getV1MarketplacesByMarketplaceIdAccess","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."}],"tags":["Marketplaces"],"summary":"List marketplace access grants","description":"Lists direct, team, and org-wide grants for a marketplace.","responses":{"200":{"description":"Marketplace access grants returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchAccessGrantListResponse"}}}},"400":{"description":"The marketplace access path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage marketplace access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage marketplace access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The marketplace could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"post":{"operationId":"postV1MarketplacesByMarketplaceIdAccess","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29},"teamId":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"orgWide":{"default":false,"type":"boolean"},"role":{"type":"string","enum":["viewer","editor","manager"]}},"required":["role"]}}}},"tags":["Marketplaces"],"summary":"Grant marketplace access","description":"Creates or reactivates one access grant for a marketplace.","responses":{"201":{"description":"Marketplace access grant created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchAccessGrantMutationResponse"}}}},"400":{"description":"The marketplace access request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage marketplace access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage marketplace access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The marketplace could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/marketplaces/{marketplaceId}/access/{grantId}":{"delete":{"operationId":"deleteV1MarketplacesByMarketplaceIdAccessByGrantId","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."},{"in":"path","name":"grantId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'mag_' prefix and a 26-character base32 suffix."}],"tags":["Marketplaces"],"summary":"Revoke marketplace access","description":"Soft-revokes one marketplace access grant.","responses":{"204":{"description":"Marketplace access revoked successfully."},"400":{"description":"The marketplace access path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage marketplace access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage marketplace access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The access grant could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-accounts":{"get":{"operationId":"getV1ConnectorAccounts","parameters":[{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"connectorType","schema":{"type":"string","enum":["github"]}},{"in":"query","name":"status","schema":{"type":"string","enum":["active","inactive","disconnected","error"]}},{"in":"query","name":"q","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["Connectors"],"summary":"List connector accounts","description":"Lists connector accounts for the organization.","responses":{"200":{"description":"Connector accounts returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorAccountListResponse"}}}},"400":{"description":"The connector account query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list connector accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}},"post":{"operationId":"postV1ConnectorAccounts","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectorType":{"type":"string","enum":["github"]},"remoteId":{"type":"string","minLength":1,"maxLength":255},"externalAccountRef":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"displayName":{"type":"string","minLength":1,"maxLength":255},"metadata":{"type":"object","properties":{},"additionalProperties":{}}},"required":["connectorType","remoteId","displayName"]}}}},"tags":["Connectors"],"summary":"Create connector account","description":"Creates a connector account such as a GitHub App installation binding.","responses":{"201":{"description":"Connector account created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorAccountMutationResponse"}}}},"400":{"description":"The connector account creation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create connector accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to create connector accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}}},"/v1/connector-accounts/{connectorAccountId}":{"get":{"operationId":"getV1ConnectorAccountsByConnectorAccountId","parameters":[{"in":"path","name":"connectorAccountId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cac_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"Get connector account","description":"Returns one connector account detail.","responses":{"200":{"description":"Connector account returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorAccountDetailResponse"}}}},"400":{"description":"The connector account path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view connector accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The connector account could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-accounts/{connectorAccountId}/disconnect":{"post":{"operationId":"postV1ConnectorAccountsByConnectorAccountIdDisconnect","parameters":[{"in":"path","name":"connectorAccountId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cac_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":255}}}}}},"tags":["Connectors"],"summary":"Disconnect connector account","description":"Disconnects a connector account and cleans up all associated connector-managed records.","responses":{"200":{"description":"Connector account disconnected and cleaned up successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorAccountDisconnectResponse"}}}},"400":{"description":"The connector account disconnect request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage connector accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage connector accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector account could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances":{"get":{"operationId":"getV1ConnectorInstances","parameters":[{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"connectorAccountId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"description":"Den TypeID with 'cac_' prefix and a 26-character base32 suffix."},{"in":"query","name":"connectorType","schema":{"type":"string","enum":["github"]}},{"in":"query","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."},{"in":"query","name":"status","schema":{"type":"string","enum":["active","disabled","archived","error"]}},{"in":"query","name":"q","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["Connectors"],"summary":"List connector instances","description":"Lists connector instances visible to the current member.","responses":{"200":{"description":"Connector instances returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorInstanceListResponse"}}}},"400":{"description":"The connector instance query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list connector instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}},"post":{"operationId":"postV1ConnectorInstances","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectorAccountId":{"description":"Den TypeID with 'cac_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"connectorType":{"type":"string","enum":["github"]},"remoteId":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":255},"config":{"type":"object","properties":{},"additionalProperties":{}}},"required":["connectorAccountId","connectorType","name"]}}}},"tags":["Connectors"],"summary":"Create connector instance","description":"Creates a new connector instance.","responses":{"201":{"description":"Connector instance created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorInstanceMutationResponse"}}}},"400":{"description":"The connector instance creation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create connector instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to create connector instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector account could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}":{"get":{"operationId":"getV1ConnectorInstancesByConnectorInstanceId","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"Get connector instance","description":"Returns one connector instance detail.","responses":{"200":{"description":"Connector instance returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorInstanceDetailResponse"}}}},"400":{"description":"The connector instance path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view connector instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"patch":{"operationId":"patchV1ConnectorInstancesByConnectorInstanceId","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"remoteId":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":255},"status":{"type":"string","enum":["active","disabled","archived","error"]},"config":{"type":"object","properties":{},"additionalProperties":{}}}}}}},"tags":["Connectors"],"summary":"Update connector instance","description":"Updates one connector instance.","responses":{"200":{"description":"Connector instance updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorInstanceMutationResponse"}}}},"400":{"description":"The connector instance update request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update connector instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/archive":{"post":{"operationId":"postV1ConnectorInstancesByConnectorInstanceIdArchive","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"archive connector instance","description":"archive a connector instance.","responses":{"200":{"description":"Connector instance updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorInstanceMutationResponse"}}}},"400":{"description":"The connector instance path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage connector instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/disable":{"post":{"operationId":"postV1ConnectorInstancesByConnectorInstanceIdDisable","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"disable connector instance","description":"disable a connector instance.","responses":{"200":{"description":"Connector instance updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorInstanceMutationResponse"}}}},"400":{"description":"The connector instance path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage connector instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/enable":{"post":{"operationId":"postV1ConnectorInstancesByConnectorInstanceIdEnable","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"enable connector instance","description":"enable a connector instance.","responses":{"200":{"description":"Connector instance updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorInstanceMutationResponse"}}}},"400":{"description":"The connector instance path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage connector instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/configuration":{"get":{"operationId":"getV1ConnectorInstancesByConnectorInstanceIdConfiguration","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"Get connector instance configuration","description":"Returns the currently configured plugins and import stats for a connector instance.","responses":{"200":{"description":"Connector instance configuration returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorInstanceConfigurationResponse"}}}},"400":{"description":"The connector instance path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to inspect connector instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/remove":{"post":{"operationId":"postV1ConnectorInstancesByConnectorInstanceIdRemove","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"Remove connector instance","description":"Removes a connector instance and deletes the plugins, mappings, config objects, and bindings associated with it.","responses":{"200":{"description":"Connector instance removed and cleaned up successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorInstanceRemoveResponse"}}}},"400":{"description":"The connector instance path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to remove connector instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to remove this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/auto-import":{"post":{"operationId":"postV1ConnectorInstancesByConnectorInstanceIdAutoImport","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"autoImportNewPlugins":{"type":"boolean"}},"required":["autoImportNewPlugins"]}}}},"tags":["Connectors"],"summary":"Set connector instance auto-import","description":"Enables or disables auto-import of new plugins on future push webhooks for a connector instance.","responses":{"200":{"description":"Connector instance auto-import updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorInstanceConfigurationResponse"}}}},"400":{"description":"The auto-import request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to configure connector instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to configure this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/sync-now":{"post":{"operationId":"postV1ConnectorInstancesByConnectorInstanceIdSyncNow","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"Sync connector instance now","description":"Queues sync work for each connector target without sync work already queued or running.","responses":{"200":{"description":"Connector instance sync queued successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorInstanceSyncNowResponse"}}}},"400":{"description":"The connector instance path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to sync connector instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/discovery":{"get":{"operationId":"getV1ConnectorInstancesByConnectorInstanceIdDiscovery","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"tags":["GitHub"],"summary":"Get GitHub connector discovery","description":"Analyzes a GitHub connector target and returns discovered plugin candidates.","responses":{"200":{"description":"GitHub connector discovery returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchGithubConnectorDiscoveryResponse"}}}},"400":{"description":"The connector instance path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to inspect GitHub discovery.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/discovery/tree":{"get":{"operationId":"getV1ConnectorInstancesByConnectorInstanceIdDiscoveryTree","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255}},{"in":"query","name":"limit","schema":{"type":"integer","exclusiveMinimum":0,"maximum":500}},{"in":"query","name":"prefix","schema":{"type":"string","minLength":1,"maxLength":1024}}],"tags":["GitHub"],"summary":"List GitHub discovery tree entries","description":"Pages through the normalized GitHub repository tree used during discovery.","responses":{"200":{"description":"GitHub discovery tree returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchGithubDiscoveryTreeResponse"}}}},"400":{"description":"The discovery tree request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to inspect GitHub discovery tree entries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/discovery/apply":{"post":{"operationId":"postV1ConnectorInstancesByConnectorInstanceIdDiscoveryApply","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"autoImportNewPlugins":{"default":false,"type":"boolean"},"selectedKeys":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}}},"required":["selectedKeys"]}}}},"tags":["GitHub"],"summary":"Apply GitHub discovery selection","description":"Creates OpenWork plugins and connector mappings from selected discovery candidates.","responses":{"200":{"description":"GitHub discovery selection applied successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchGithubDiscoveryApplyResponse"}}}},"400":{"description":"The discovery apply request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to apply discovery selections.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/access":{"get":{"operationId":"getV1ConnectorInstancesByConnectorInstanceIdAccess","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"List connector instance access grants","description":"Lists direct, team, and org-wide grants for a connector instance.","responses":{"200":{"description":"Connector instance access grants returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchAccessGrantListResponse"}}}},"400":{"description":"The connector instance access path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage connector instance access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage connector instance access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"post":{"operationId":"postV1ConnectorInstancesByConnectorInstanceIdAccess","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29},"teamId":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"orgWide":{"default":false,"type":"boolean"},"role":{"type":"string","enum":["viewer","editor","manager"]}},"required":["role"]}}}},"tags":["Connectors"],"summary":"Grant connector instance access","description":"Creates or reactivates one access grant for a connector instance.","responses":{"201":{"description":"Connector instance access grant created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchAccessGrantMutationResponse"}}}},"400":{"description":"The connector instance access request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage connector instance access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage connector instance access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/access/{grantId}":{"delete":{"operationId":"deleteV1ConnectorInstancesByConnectorInstanceIdAccessByGrantId","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."},{"in":"path","name":"grantId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cia_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"Revoke connector instance access","description":"Soft-revokes one connector instance access grant.","responses":{"204":{"description":"Connector instance access revoked successfully."},"400":{"description":"The connector instance access path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage connector instance access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage connector instance access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The access grant could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/targets":{"get":{"operationId":"getV1ConnectorInstancesByConnectorInstanceIdTargets","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"targetKind","schema":{"type":"string","enum":["repository_branch"]}},{"in":"query","name":"q","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["Connectors"],"summary":"List connector targets","description":"Lists connector targets for one connector instance.","responses":{"200":{"description":"Connector targets returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorTargetListResponse"}}}},"400":{"description":"The connector target query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list connector targets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"post":{"operationId":"postV1ConnectorInstancesByConnectorInstanceIdTargets","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectorType":{"type":"string","enum":["github"]},"remoteId":{"type":"string","minLength":1,"maxLength":255},"targetKind":{"type":"string","enum":["repository_branch"]},"externalTargetRef":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"config":{"type":"object","properties":{},"additionalProperties":{}}},"required":["connectorType","remoteId","targetKind","config"]}}}},"tags":["Connectors"],"summary":"Create connector target","description":"Creates a connector target under a connector instance.","responses":{"201":{"description":"Connector target created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorTargetMutationResponse"}}}},"400":{"description":"The connector target creation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create connector targets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-targets/{connectorTargetId}":{"get":{"operationId":"getV1ConnectorTargetsByConnectorTargetId","parameters":[{"in":"path","name":"connectorTargetId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'ctg_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"Get connector target","description":"Returns one connector target detail.","responses":{"200":{"description":"Connector target returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorTargetDetailResponse"}}}},"400":{"description":"The connector target path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view connector targets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The connector target could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"patch":{"operationId":"patchV1ConnectorTargetsByConnectorTargetId","parameters":[{"in":"path","name":"connectorTargetId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'ctg_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"remoteId":{"type":"string","minLength":1,"maxLength":255},"externalTargetRef":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"config":{"type":"object","properties":{},"additionalProperties":{}}}}}}},"tags":["Connectors"],"summary":"Update connector target","description":"Updates one connector target.","responses":{"200":{"description":"Connector target updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorTargetMutationResponse"}}}},"400":{"description":"The connector target update request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update connector targets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector target could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-targets/{connectorTargetId}/resync":{"post":{"operationId":"postV1ConnectorTargetsByConnectorTargetIdResync","parameters":[{"in":"path","name":"connectorTargetId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'ctg_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"Resync connector target","description":"Queues a manual resync for a connector target.","responses":{"202":{"description":"Connector target resync queued successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorSyncAsyncResponse"}}}},"400":{"description":"The connector target path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to resync connector targets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector target could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-targets/{connectorTargetId}/mappings":{"get":{"operationId":"getV1ConnectorTargetsByConnectorTargetIdMappings","parameters":[{"in":"path","name":"connectorTargetId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'ctg_' prefix and a 26-character base32 suffix."},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"mappingKind","schema":{"type":"string","enum":["path","api","custom"]}},{"in":"query","name":"objectType","schema":{"type":"string","enum":["skill","agent","command","tool","mcp","hook","context","custom","script","workflow","app"]}},{"in":"query","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."},{"in":"query","name":"q","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["Connectors"],"summary":"List connector mappings","description":"Lists mappings under a connector target.","responses":{"200":{"description":"Connector mappings returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorMappingListResponse"}}}},"400":{"description":"The connector mapping query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list connector mappings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The connector target could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"post":{"operationId":"postV1ConnectorTargetsByConnectorTargetIdMappings","parameters":[{"in":"path","name":"connectorTargetId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'ctg_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mappingKind":{"type":"string","enum":["path","api","custom"]},"selector":{"type":"string","minLength":1,"maxLength":255},"objectType":{"type":"string","enum":["skill","agent","command","tool","mcp","hook","context","custom","script","workflow","app"]},"pluginId":{"anyOf":[{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},{"type":"null"}]},"autoAddToPlugin":{"default":false,"type":"boolean"},"config":{"type":"object","properties":{},"additionalProperties":{}}},"required":["mappingKind","selector","objectType"]}}}},"tags":["Connectors"],"summary":"Create connector mapping","description":"Creates a connector mapping.","responses":{"201":{"description":"Connector mapping created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorMappingMutationResponse"}}}},"400":{"description":"The connector mapping creation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create connector mappings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this connector instance or target plugin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector target could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-mappings/{connectorMappingId}":{"patch":{"operationId":"patchV1ConnectorMappingsByConnectorMappingId","parameters":[{"in":"path","name":"connectorMappingId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cmp_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"selector":{"type":"string","minLength":1,"maxLength":255},"objectType":{"type":"string","enum":["skill","agent","command","tool","mcp","hook","context","custom","script","workflow","app"]},"pluginId":{"anyOf":[{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},{"type":"null"}]},"autoAddToPlugin":{"type":"boolean"},"config":{"type":"object","properties":{},"additionalProperties":{}}}}}}},"tags":["Connectors"],"summary":"Update connector mapping","description":"Updates one connector mapping.","responses":{"200":{"description":"Connector mapping updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorMappingMutationResponse"}}}},"400":{"description":"The connector mapping update request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update connector mappings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this connector instance or target plugin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector mapping could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"delete":{"operationId":"deleteV1ConnectorMappingsByConnectorMappingId","parameters":[{"in":"path","name":"connectorMappingId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cmp_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"Delete connector mapping","description":"Deletes one connector mapping.","responses":{"204":{"description":"Connector mapping deleted successfully."},"400":{"description":"The connector mapping path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to delete connector mappings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector mapping could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-sync-events":{"get":{"operationId":"getV1ConnectorSyncEvents","parameters":[{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."},{"in":"query","name":"connectorTargetId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"description":"Den TypeID with 'ctg_' prefix and a 26-character base32 suffix."},{"in":"query","name":"eventType","schema":{"type":"string","enum":["push","installation","installation_repositories","repository","manual_resync"]}},{"in":"query","name":"status","schema":{"type":"string","enum":["pending","queued","running","completed","failed","partial","ignored"]}},{"in":"query","name":"q","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["Connectors"],"summary":"List connector sync events","description":"Lists connector sync events visible to the current member.","responses":{"200":{"description":"Connector sync events returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorSyncEventListResponse"}}}},"400":{"description":"The connector sync event query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list connector sync events.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}}},"/v1/connector-sync-events/{connectorSyncEventId}":{"get":{"operationId":"getV1ConnectorSyncEventsByConnectorSyncEventId","parameters":[{"in":"path","name":"connectorSyncEventId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cse_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"Get connector sync event","description":"Returns one connector sync event detail.","responses":{"200":{"description":"Connector sync event returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorSyncEventDetailResponse"}}}},"400":{"description":"The connector sync event path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view connector sync events.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The connector sync event could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-sync-events/{connectorSyncEventId}/retry":{"post":{"operationId":"postV1ConnectorSyncEventsByConnectorSyncEventIdRetry","parameters":[{"in":"path","name":"connectorSyncEventId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cse_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"Retry connector sync event","description":"Re-queues one connector sync event.","responses":{"202":{"description":"Connector sync event retried successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorSyncAsyncResponse"}}}},"400":{"description":"The connector sync event path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to retry connector sync events.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector sync event could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connectors/github/accounts":{"post":{"operationId":"postV1ConnectorsGithubAccounts","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"installationId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"accountLogin":{"type":"string","minLength":1,"maxLength":255},"accountType":{"type":"string","enum":["Organization","User"]},"displayName":{"type":"string","minLength":1,"maxLength":255}},"required":["installationId","accountLogin","accountType","displayName"]}}}},"tags":["GitHub"],"summary":"Create GitHub connector account","description":"Persists one GitHub App installation as a connector account.","responses":{"201":{"description":"GitHub connector account created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorAccountMutationResponse"}}}},"400":{"description":"The GitHub account creation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create GitHub connector accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to create GitHub connector accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}}},"/v1/connectors/github/setup":{"post":{"operationId":"postV1ConnectorsGithubSetup","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"installationId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"connectorAccountId":{"description":"Den TypeID with 'cac_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},"connectorInstanceName":{"type":"string","minLength":1,"maxLength":255},"repositoryId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"repositoryFullName":{"type":"string","minLength":1,"maxLength":255},"branch":{"type":"string","minLength":1,"maxLength":255},"ref":{"type":"string","minLength":1,"maxLength":255},"mappings":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"mappingKind":{"type":"string","enum":["path","api","custom"]},"selector":{"type":"string","minLength":1,"maxLength":255},"objectType":{"type":"string","enum":["skill","agent","command","tool","mcp","hook","context","custom","script","workflow","app"]},"pluginId":{"anyOf":[{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30},{"type":"null"}]},"autoAddToPlugin":{"default":false,"type":"boolean"},"config":{"type":"object","properties":{},"additionalProperties":{}}},"required":["mappingKind","selector","objectType"]}}},"required":["installationId","connectorInstanceName","repositoryId","repositoryFullName","branch","ref"]}}}},"tags":["GitHub"],"summary":"Setup GitHub connector","description":"Creates a GitHub connector account, instance, target, and initial mappings in one flow.","responses":{"201":{"description":"GitHub connector setup created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchGithubSetupResponse"}}}},"400":{"description":"The GitHub setup request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to setup GitHub connectors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to setup GitHub connectors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}}},"/v1/connectors/github/accounts/{connectorAccountId}/repositories":{"get":{"operationId":"getV1ConnectorsGithubAccountsByConnectorAccountIdRepositories","parameters":[{"in":"path","name":"connectorAccountId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'cac_' prefix and a 26-character base32 suffix."},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"q","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["GitHub"],"summary":"List GitHub repositories","description":"Lists repositories visible to one GitHub connector account.","responses":{"200":{"description":"GitHub repositories returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchGithubRepositoryListResponse"}}}},"400":{"description":"The GitHub repository query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list GitHub repositories.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The connector account could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connectors/github/validate-target":{"post":{"operationId":"postV1ConnectorsGithubValidateTarget","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"installationId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"repositoryId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"repositoryFullName":{"type":"string","minLength":1,"maxLength":255},"branch":{"type":"string","minLength":1,"maxLength":255},"ref":{"type":"string","minLength":1,"maxLength":255}},"required":["installationId","repositoryId","repositoryFullName","branch","ref"]}}}},"tags":["GitHub"],"summary":"Validate GitHub target","description":"Validates one repository-branch target before persisting it.","responses":{"200":{"description":"GitHub target validated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchGithubValidateTargetResponse"}}}},"400":{"description":"The GitHub target validation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to validate GitHub targets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}}},"/v1/roles":{"post":{"operationId":"postV1Roles","tags":["Roles"],"summary":"Create organization role","description":"Creates a custom organization role with a named permission map.","responses":{"201":{"description":"Organization role created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"The role creation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create organization roles.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can create custom roles.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"roleName":{"type":"string","minLength":2,"maxLength":64},"permission":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["roleName","permission"]}}}}}},"/v1/roles/{roleId}":{"patch":{"operationId":"patchV1RolesByRoleId","tags":["Roles"],"summary":"Update organization role","description":"Updates a custom organization role and propagates role name changes to members and pending invitations.","responses":{"200":{"description":"Organization role updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"The role update request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update organization roles.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can update custom roles.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The role or organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"roleId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'orl_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"roleName":{"type":"string","minLength":2,"maxLength":64},"permission":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}},"delete":{"operationId":"deleteV1RolesByRoleId","tags":["Roles"],"summary":"Delete organization role","description":"Deletes a custom organization role after confirming that no members or pending invitations still depend on it.","responses":{"204":{"description":"Organization role deleted successfully."},"400":{"description":"The role deletion request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to delete organization roles.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can delete custom roles.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The role or organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"roleId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'orl_' prefix and a 26-character base32 suffix."}]}},"/v1/resources/marketplace-capabilities":{"get":{"operationId":"getV1ResourcesMarketplaceCapabilities","tags":["Resources"],"summary":"List assigned marketplace capabilities","description":"Returns grant-scoped marketplace capability references for the current member. Organization administration visibility never expands this desktop and agent inventory.","responses":{"200":{"description":"Assigned marketplace capabilities returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignedMarketplaceCapabilitiesResponse"}}}},"401":{"description":"The caller must be signed in to list assigned capabilities.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}}},"/v1/resources":{"get":{"operationId":"getV1Resources","tags":["Resources"],"summary":"Get accessible resource snapshot","description":"Returns IDs and update timestamps for cloud resources visible to the current organization member.","responses":{"200":{"description":"Accessible resource snapshot returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceSnapshotResponse"}}}},"401":{"description":"The caller must be signed in to list resources.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}}},"/v1/teams":{"post":{"operationId":"postV1Teams","tags":["Teams"],"summary":"Create team","description":"Creates a team inside an organization and can optionally attach existing organization members to it.","responses":{"201":{"description":"Team created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}}},"400":{"description":"The team creation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create teams.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can create teams.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The organization or a referenced member could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"memberIds":{"type":"array","items":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29}}},"required":["name"]}}}}}},"/v1/teams/{teamId}":{"patch":{"operationId":"patchV1TeamsByTeamId","tags":["Teams"],"summary":"Update team","description":"Updates a team's name and-or membership list within an organization.","responses":{"200":{"description":"Team updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}}},"400":{"description":"The team update request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update teams.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can update teams.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The team, organization, or a referenced member could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"teamId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"memberIds":{"type":"array","items":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29}}}}}}}},"delete":{"operationId":"deleteV1TeamsByTeamId","tags":["Teams"],"summary":"Delete team","description":"Deletes a team and removes its related team-membership records.","responses":{"204":{"description":"Team deleted successfully."},"400":{"description":"The team deletion path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to delete teams.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can delete teams.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The team or organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"teamId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix."}]}},"/v1/app-version":{"get":{"operationId":"getV1AppVersion","tags":["System"],"summary":"Get desktop app version metadata","description":"Returns the supported desktop app range, stable published desktop releases from GitHub, and, when available, this deployment's web app base URL so desktop clients only need to be configured with the API URL.","responses":{"200":{"description":"Desktop app version metadata returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DenAppVersionResponse"}}}}}}},"/v1/webhooks/connectors/github":{"post":{"operationId":"postV1WebhooksConnectorsGithub","tags":["Webhooks"],"summary":"GitHub webhook ingress","description":"Verifies a GitHub App webhook signature against the raw request body, then records any relevant sync work.","responses":{"200":{"description":"Ignored but valid GitHub webhook delivery.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchGithubWebhookIgnoredResponse"}}}},"202":{"description":"Accepted GitHub webhook delivery.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchGithubWebhookAcceptedResponse"}}}},"401":{"description":"Invalid GitHub webhook signature.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchGithubWebhookUnauthorizedResponse"}}}},"503":{"description":"GitHub webhook secret is not configured."}}}},"/v1/workers/{id}/activity-heartbeat":{"post":{"operationId":"postV1WorkersByIdActivityHeartbeat","tags":["Workers","Worker Activity"],"summary":"Record worker heartbeat","description":"Accepts signed heartbeat and recent-activity updates from a worker so Den can track worker health and recent usage.","responses":{"200":{"description":"Worker heartbeat accepted successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerHeartbeatResponse"}}}},"400":{"description":"The heartbeat payload or worker path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The worker heartbeat token was missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The worker could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"id","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'wrk_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sentAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"isActiveRecently":{"type":"boolean"},"lastActivityAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"openSessionCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["isActiveRecently"]}}}}}},"/v1/workers":{"get":{"operationId":"getV1Workers","tags":["Workers"],"summary":"List workers","description":"Lists the workers that belong to the caller's active organization, including each worker's latest known instance state.","responses":{"200":{"description":"Workers returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerListResponse"}}}},"400":{"description":"The worker list query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list workers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"parameters":[{"in":"query","name":"limit","schema":{"default":20,"type":"integer","minimum":1,"maximum":50}}]},"post":{"operationId":"postV1Workers","tags":["Workers"],"summary":"Create worker","description":"Creates a local worker or cloud worker for the active organization and returns the initial tokens needed to connect to it.","responses":{"201":{"description":"Local worker created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerCreateResponse"}}}},"202":{"description":"Cloud worker creation started successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerCreateResponse"}}}},"400":{"description":"The worker creation payload was invalid.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidRequestError"},{"$ref":"#/components/schemas/OrganizationUnavailableError"},{"$ref":"#/components/schemas/WorkspacePathRequiredError"},{"$ref":"#/components/schemas/WorkerUserEmailRequiredError"}]}}}},"401":{"description":"The caller must be signed in to create workers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"402":{"description":"The caller needs an active cloud plan before launching a cloud worker.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerPaymentRequiredError"}}}},"409":{"description":"The organization has reached its worker limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerOrgLimitReachedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"destination":{"type":"string","enum":["local","cloud"]},"workspacePath":{"type":"string"},"sandboxBackend":{"type":"string"},"imageVersion":{"type":"string"}},"required":["name","destination"]}}}}}},"/v1/workers/{id}":{"get":{"operationId":"getV1WorkersById","tags":["Workers"],"summary":"Get worker","description":"Returns one worker from the active organization together with its latest provisioned instance details.","responses":{"200":{"description":"Worker returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerResponse"}}}},"400":{"description":"The worker path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to read worker details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The worker could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"id","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'wrk_' prefix and a 26-character base32 suffix."}]},"patch":{"operationId":"patchV1WorkersById","tags":["Workers"],"summary":"Update worker","description":"Renames a worker, but only when the caller is the user who originally created that worker.","responses":{"200":{"description":"Worker updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUpdateResponse"}}}},"400":{"description":"The worker update request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update workers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only the worker owner can rename this worker.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The worker could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"id","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'wrk_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255}},"required":["name"]}}}}},"delete":{"operationId":"deleteV1WorkersById","tags":["Workers"],"summary":"Delete worker","description":"Deletes a worker and cascades cleanup for its tokens, runtime records, and provider-specific resources.","responses":{"204":{"description":"Worker deleted successfully."},"400":{"description":"The worker deletion path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to delete workers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The worker could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"id","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'wrk_' prefix and a 26-character base32 suffix."}]}},"/v1/workers/{id}/tokens":{"post":{"operationId":"postV1WorkersByIdTokens","tags":["Workers"],"summary":"Get worker connection tokens","description":"Returns connection tokens and the resolved OpenWork connect URL for an existing worker.","responses":{"200":{"description":"Worker connection tokens returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerTokensResponse"}}}},"400":{"description":"The worker token path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to request worker tokens.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The worker could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"The worker is not ready to return connection tokens yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerConnectionError"}}}}},"parameters":[{"in":"path","name":"id","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'wrk_' prefix and a 26-character base32 suffix."}]}},"/v1/workers/{id}/runtime":{"get":{"operationId":"getV1WorkersByIdRuntime","tags":["Workers","Worker Runtime"],"summary":"Get worker runtime status","description":"Fetches runtime version and status information from a specific worker's runtime endpoint.","responses":{"200":{"description":"Worker runtime information returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerRuntimeResponse"}}}},"400":{"description":"The worker runtime path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to read worker runtime information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The worker could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"id","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'wrk_' prefix and a 26-character base32 suffix."}]}},"/v1/workers/{id}/runtime/upgrade":{"post":{"operationId":"postV1WorkersByIdRuntimeUpgrade","tags":["Workers","Worker Runtime"],"summary":"Upgrade worker runtime","description":"Forwards a runtime upgrade request to a specific worker and returns the worker runtime's response.","responses":{"200":{"description":"Worker runtime upgrade request completed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerRuntimeResponse"}}}},"400":{"description":"The runtime upgrade request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to upgrade a worker runtime.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The worker could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"id","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30},"required":true,"description":"Den TypeID with 'wrk_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":{}}}}}}},"/v1/mcp/token":{"post":{"operationId":"postV1McpToken","tags":["Authentication"],"summary":"Mint MCP access token","description":"Mints an org-scoped MCP access token for the caller's active organization so first-party clients can connect to the Den MCP server without a separate browser OAuth flow.","responses":{"200":{"description":"MCP access token minted successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpTokenResponse"}}}},"400":{"description":"The token request was invalid or no active organization is selected.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidRequestError"},{"$ref":"#/components/schemas/McpTokenOrganizationRequiredError"}]}}}},"401":{"description":"The caller must be signed in to mint an MCP token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"API keys cannot mint MCP tokens.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scopes":{"minItems":1,"type":"array","items":{"type":"string","enum":["mcp:read","mcp:write"]}}}}}}}}},"/.well-known/oauth-protected-resource":{"get":{"operationId":"getWellKnownOauthProtectedResource","responses":{"200":{"description":"OK"}}}},"/.well-known/oauth-protected-resource/mcp":{"get":{"operationId":"getWellKnownOauthProtectedResourceMcp","responses":{"200":{"description":"OK"}}}},"/mcp/.well-known/oauth-protected-resource":{"get":{"operationId":"getMcpWellKnownOauthProtectedResource","responses":{"200":{"description":"OK"}}}},"/.well-known/oauth-protected-resource/mcp/agent":{"get":{"operationId":"getWellKnownOauthProtectedResourceMcpAgent","responses":{"200":{"description":"OK"}}}},"/mcp/agent/.well-known/oauth-protected-resource":{"get":{"operationId":"getMcpAgentWellKnownOauthProtectedResource","responses":{"200":{"description":"OK"}}}},"/.well-known/oauth-protected-resource/mcp/admin":{"get":{"operationId":"getWellKnownOauthProtectedResourceMcpAdmin","responses":{"200":{"description":"OK"}}}},"/mcp/admin/.well-known/oauth-protected-resource":{"get":{"operationId":"getMcpAdminWellKnownOauthProtectedResource","responses":{"200":{"description":"OK"}}}},"/v1/telemetry/ingest":{"post":{"operationId":"postV1TelemetryIngest","tags":["Telemetry"],"summary":"Ingest telemetry events","description":"Receives a batch of telemetry events from the OpenWork app or workers. Auth provides org and member identity. Unknown event types and disallowed fields are dropped. Always returns 204.","responses":{"204":{"description":"Events accepted."},"400":{"description":"Invalid event payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"Caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"events":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":64},"timestamp":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"source":{"type":"string","maxLength":32},"sessionId":{"type":"string","maxLength":128},"durationMs":{"type":"integer","minimum":0,"maximum":86400000},"success":{"type":"boolean"},"dimensions":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":64},"value":{"type":"string","minLength":1,"maxLength":128},"label":{"type":"string","minLength":1,"maxLength":255},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","label"]}}},"required":["type","timestamp"]}}},"required":["events"]}}}}}},"/v1/telemetry/dimensions":{"get":{"operationId":"getV1TelemetryDimensions","tags":["Telemetry"],"summary":"List telemetry dimension values","description":"Returns unique analytics dimension values for the active organization, such as project labels for the project selector.","responses":{"200":{"description":"Telemetry dimensions returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetryDimensionListResponse"}}}},"400":{"description":"Invalid dimension query.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"Caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"parameters":[{"in":"query","name":"type","schema":{"type":"string","minLength":1,"maxLength":64},"required":true}]}},"/v1/telemetry/adoption":{"get":{"operationId":"getV1TelemetryAdoption","tags":["Telemetry"],"summary":"Get adoption metrics","description":"Returns org adoption metrics: member count, pending invites, active members in 7d and 30d windows, and a 12-week weekly active member trend.","responses":{"200":{"description":"Adoption metrics returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetryAdoptionResponse"}}}},"401":{"description":"Caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}}},"/v1/telemetry/analytics":{"get":{"operationId":"getV1TelemetryAnalytics","tags":["Telemetry"],"summary":"Get usage analytics","description":"Returns Layer 1 (who is using AI) and Layer 2 (how often) analytics for the active org: member counts, active members, session and task volume in 7d/30d windows, average task duration, model usage and selection in 30d, and a 12-week trend of active members, sessions, and tasks.","responses":{"200":{"description":"Analytics returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetryAnalyticsResponse"}}}},"400":{"description":"Invalid analytics query.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"Caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"402":{"description":"Usage analytics requires an Enterprise plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterprisePlanRequiredError"}}}}},"parameters":[{"in":"query","name":"dimensionType","schema":{"type":"string","minLength":1,"maxLength":64}},{"in":"query","name":"dimensionValue","schema":{"type":"string","minLength":1,"maxLength":128}}]}}}}