{"openapi":"3.1.0","info":{"title":"Stow Capture API","version":"1.0.0","summary":"Capture, retrieve, review, and organize source-backed information.","description":"The HTTP API behind Stow, its CLI, and its remote MCP server. Hosted credentials are bound to one workspace. Raw source data remains the source of truth."},"externalDocs":{"description":"Developer guide and agent setup instructions","url":"https://docs.youens.com/developers/"},"servers":[{"url":"https://capture-api.youens.com","description":"Current API origin"}],"tags":[{"name":"Authentication"},{"name":"Integrations"},{"name":"Workspaces"},{"name":"Packs"},{"name":"Schemas"},{"name":"Captures"},{"name":"Provenance"},{"name":"Processing"},{"name":"Review"},{"name":"Records"},{"name":"Relationships"},{"name":"Actions"},{"name":"Skills"},{"name":"Conversations"},{"name":"Search"},{"name":"Maintenance"},{"name":"Administration"}],"security":[{"bearerAuth":[]},{"sessionCookie":[]}],"paths":{"/v1/auth/me":{"get":{"operationId":"get__v1_auth_me","tags":["Authentication"],"summary":"Inspect the authenticated identity","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/auth/tokens":{"post":{"operationId":"post__v1_auth_tokens","tags":["Authentication"],"summary":"Create a personal API token","description":"Requires a signed-in session or an admin-scoped personal token. Requesting the capture:admin scope also requires the authenticated user to be a global administrator.","security":[{"sessionCookie":[]},{"bearerAuth":[]}],"x-capture-scope":"capture:admin","x-session-or-admin-token-required":true,"parameters":[],"responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiTokenIssue"}}}}},"get":{"operationId":"get__v1_auth_tokens","tags":["Authentication"],"summary":"List personal API tokens","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/auth/tokens/{id}":{"delete":{"operationId":"delete__v1_auth_tokens_by_id","tags":["Authentication"],"summary":"Revoke a personal API token","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"x-explicit-user-intent-required":true}},"/v1/auth/oauth/grants":{"get":{"operationId":"get__v1_auth_oauth_grants","tags":["Authentication"],"summary":"List connected OAuth clients","description":"Requires an interactive signed-in session. Token credentials are not accepted.","security":[{"sessionCookie":[]}],"x-session-required":true,"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/auth/oauth/grants/{id}":{"delete":{"operationId":"delete__v1_auth_oauth_grants_by_id","tags":["Authentication"],"summary":"Revoke an OAuth client grant","description":"Requires an interactive signed-in session. Token credentials are not accepted.","security":[{"sessionCookie":[]}],"x-session-required":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"x-explicit-user-intent-required":true}},"/v1/integrations/google-calendar":{"get":{"operationId":"get__v1_integrations_google_calendar","tags":["Integrations"],"summary":"Google Calendar connection status and calendar names","description":"First-test Composio managed-auth spike. Uses the authenticated Stow user DB id as Composio user_id. Requires COMPOSIO_API_KEY to list calendars.","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/integrations/google-calendar/connect":{"post":{"operationId":"post__v1_integrations_google_calendar_connect","tags":["Integrations"],"summary":"Start Composio Google Calendar Connect Link","description":"Creates a Composio Tool Router session and Connect Link for toolkit googlecalendar. user_id is the authenticated Stow account DB id — never supplied by the client.","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:write","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleCalendarConnect"}}}}}},"/v1/workspaces":{"post":{"operationId":"post__v1_workspaces","tags":["Workspaces"],"summary":"Create a workspace","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:admin","parameters":[],"responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceCreate"}}}}}},"/v1/workspaces/{workspace_id}":{"get":{"operationId":"get__v1_workspaces_by_workspace_id","tags":["Workspaces"],"summary":"Get a workspace","description":"Hosted callers may retrieve only the workspace attached to their authenticated identity.","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","x-authenticated-workspace-only":true,"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/system-pack/install":{"post":{"operationId":"post__v1_system_pack_install","tags":["Packs"],"summary":"Install the system pack","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:admin","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/packs":{"get":{"operationId":"get__v1_packs","tags":["Packs"],"summary":"List installed packs","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":1000000}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/pack-catalog":{"get":{"operationId":"get__v1_pack_catalog","tags":["Packs"],"summary":"List the pack catalog","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"topic","in":"query","required":false,"schema":{"type":"string"}},{"name":"include_installed","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":1000000}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/pack-catalog/{pack_key}":{"get":{"operationId":"get__v1_pack_catalog_by_pack_key","tags":["Packs"],"summary":"Get a pack catalog entry","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"pack_key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/pack-catalog/{pack_key}/install":{"post":{"operationId":"post__v1_pack_catalog_by_pack_key_install","tags":["Packs"],"summary":"Install a catalog pack","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:write","parameters":[{"name":"pack_key","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"query","required":false,"schema":{"type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:[-+][0-9A-Za-z.-]+)?$"}}],"responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogPackInstall"}}}}}},"/v1/packs/install":{"post":{"operationId":"post__v1_packs_install","tags":["Packs"],"summary":"Install an arbitrary pack manifest","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:admin","parameters":[],"responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackManifest"}}}}}},"/v1/packs/{pack_key}":{"get":{"operationId":"get__v1_packs_by_pack_key","tags":["Packs"],"summary":"Get an installed pack","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"pack_key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}},"patch":{"operationId":"patch__v1_packs_by_pack_key","tags":["Packs"],"summary":"Enable or disable a pack","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:write","parameters":[{"name":"pack_key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackUpdate"}}}}}},"/v1/packs/{pack_key}/schemas":{"get":{"operationId":"get__v1_packs_by_pack_key_schemas","tags":["Packs"],"summary":"List schemas declared by a pack","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"pack_key","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":1000000}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/packs/{pack_key}/producers":{"get":{"operationId":"get__v1_packs_by_pack_key_producers","tags":["Packs"],"summary":"List producers declared by a pack","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"pack_key","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":1000000}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/schemas":{"get":{"operationId":"get__v1_schemas","tags":["Schemas"],"summary":"List record schemas","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":1000000}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"operationId":"post__v1_schemas","tags":["Schemas"],"summary":"Register a record schema","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:write","parameters":[],"responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaRegister"}}}}}},"/v1/schemas/{schema_key}":{"get":{"operationId":"get__v1_schemas_by_schema_key","tags":["Schemas"],"summary":"Get a record schema","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"schema_key","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"query","required":false,"schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}},"patch":{"operationId":"patch__v1_schemas_by_schema_key","tags":["Schemas"],"summary":"Update a record schema","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:write","parameters":[{"name":"schema_key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaPatch"}}}}}},"/v1/captures":{"post":{"operationId":"post__v1_captures","tags":["Captures"],"summary":"Accept a capture","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes retries of the same capture submission return the original acceptance.","schema":{"type":"string","minLength":1}}],"responses":{"202":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureEnvelope"}}}}},"get":{"operationId":"get__v1_captures","tags":["Captures"],"summary":"List captures","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque next_cursor value returned by the previous capture page.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/uploads/{capture_id}/{artifact_id}":{"put":{"operationId":"put__v1_uploads_by_capture_id_by_artifact_id","tags":["Captures"],"summary":"Upload capture artifact bytes","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:write","parameters":[{"name":"capture_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}}},"/v1/captures/{capture_id}/uploads/confirm":{"post":{"operationId":"post__v1_captures_by_capture_id_uploads_confirm","tags":["Captures"],"summary":"Confirm capture artifact uploads","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:write","parameters":[{"name":"capture_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/captures/{capture_id}":{"get":{"operationId":"get__v1_captures_by_capture_id","tags":["Captures"],"summary":"Get a capture with provenance and review state","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"capture_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}},"delete":{"operationId":"delete__v1_captures_by_capture_id","tags":["Captures"],"summary":"Delete a capture and its stored artifacts","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:write","parameters":[{"name":"capture_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"x-explicit-user-intent-required":true}},"/v1/captures/{capture_id}/artifacts/{artifact_id}":{"get":{"operationId":"get__v1_captures_by_capture_id_artifacts_by_artifact_id","tags":["Captures"],"summary":"Download a capture artifact","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"capture_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/captures/{capture_id}/thumbnail":{"get":{"operationId":"get__v1_captures_by_capture_id_thumbnail","tags":["Captures"],"summary":"Download the current card thumbnail as image bytes","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"capture_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"operationId":"post__v1_captures_by_capture_id_thumbnail","tags":["Captures"],"summary":"Return a card thumbnail, generating and persisting one when missing","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:write","parameters":[{"name":"capture_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/captures/{capture_id}/derived-outputs":{"post":{"operationId":"post__v1_captures_by_capture_id_derived_outputs","tags":["Captures"],"summary":"Write a user correction to derived content","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:write","parameters":[{"name":"capture_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDerivedOutputCreate"}}}}}},"/v1/captures/{capture_id}/source":{"get":{"operationId":"get__v1_captures_by_capture_id_source","tags":["Provenance"],"summary":"List source objects for a capture","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"capture_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/source-objects":{"get":{"operationId":"get__v1_source_objects","tags":["Provenance"],"summary":"List source objects","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"capture_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"object_type","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["expected","written","failed"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":1000000}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/source-objects/{source_object_id}":{"get":{"operationId":"get__v1_source_objects_by_source_object_id","tags":["Provenance"],"summary":"Get a source object pointer","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"source_object_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/source-objects/{source_object_id}/body":{"get":{"operationId":"get__v1_source_objects_by_source_object_id_body","tags":["Provenance"],"summary":"Read a source object body","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"source_object_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/source-objects/{source_object_id}/file":{"get":{"operationId":"get__v1_source_objects_by_source_object_id_file","tags":["Provenance"],"summary":"Download a source object as raw bytes","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"source_object_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/captures/{capture_id}/derived":{"get":{"operationId":"get__v1_captures_by_capture_id_derived","tags":["Provenance"],"summary":"List derived outputs for a capture","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"capture_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/derived-outputs":{"get":{"operationId":"get__v1_derived_outputs","tags":["Provenance"],"summary":"List derived outputs","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"capture_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"output_kind","in":"query","required":false,"schema":{"type":"string"}},{"name":"producer_key","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["current","superseded","failed"]}},{"name":"current","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}},{"name":"tier","in":"query","required":false,"schema":{"type":"string","enum":["baseline_auto_run","gated_auto_run","on_demand","maintenance","disabled_deferred"]}},{"name":"visibility","in":"query","required":false,"schema":{"type":"string","enum":["user_facing","debug"]}},{"name":"user_facing","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":1000000}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/derived-outputs/{derived_output_id}":{"get":{"operationId":"get__v1_derived_outputs_by_derived_output_id","tags":["Provenance"],"summary":"Get a derived output pointer","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"derived_output_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/derived-outputs/{derived_output_id}/body":{"get":{"operationId":"get__v1_derived_outputs_by_derived_output_id_body","tags":["Provenance"],"summary":"Read a derived output body","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"derived_output_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/derived-outputs/{derived_output_id}/file":{"get":{"operationId":"get__v1_derived_outputs_by_derived_output_id_file","tags":["Provenance"],"summary":"Download a derived image output as raw bytes","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"derived_output_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/producers/run":{"post":{"operationId":"post__v1_producers_run","tags":["Processing"],"summary":"Run queued producers","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:admin","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PositiveLimit"}}}}}},"/v1/captures/{capture_id}/producers/{producer_key}/run":{"post":{"operationId":"post__v1_captures_by_capture_id_producers_by_producer_key_run","tags":["Processing"],"summary":"Queue one producer for a capture","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:write","parameters":[{"name":"capture_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"producer_key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProducerQueueRequest"}}}}}},"/v1/producer-runs":{"get":{"operationId":"get__v1_producer_runs","tags":["Processing"],"summary":"List producer runs","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"capture_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["queued","running","completed","failed","cancelled","superseded"]}},{"name":"producer_key","in":"query","required":false,"schema":{"type":"string"}},{"name":"tier","in":"query","required":false,"schema":{"type":"string","enum":["baseline_auto_run","gated_auto_run","on_demand","maintenance","disabled_deferred"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":1000000}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/producer-runs/{producer_run_id}":{"get":{"operationId":"get__v1_producer_runs_by_producer_run_id","tags":["Processing"],"summary":"Get a producer run","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"producer_run_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/producer-runs/{producer_run_id}/retry":{"post":{"operationId":"post__v1_producer_runs_by_producer_run_id_retry","tags":["Processing"],"summary":"Retry a producer run","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:admin","parameters":[{"name":"producer_run_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/suggestions":{"get":{"operationId":"get__v1_suggestions","tags":["Review"],"summary":"List review suggestions","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pending","approved","rejected","held","superseded"]}},{"name":"capture_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"suggestion_type","in":"query","required":false,"schema":{"type":"string","enum":["create_record","update_record","create_collection","evolve_collection","create_relationship","ask_question","hold_for_review","action_request","store_only"]}},{"name":"skill_key","in":"query","required":false,"schema":{"type":"string"}},{"name":"target_ref","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":1000000}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/suggestions/{suggestion_id}":{"get":{"operationId":"get__v1_suggestions_by_suggestion_id","tags":["Review"],"summary":"Get a suggestion","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"suggestion_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/suggestions/{suggestion_id}/approve":{"post":{"operationId":"post__v1_suggestions_by_suggestion_id_approve","tags":["Review"],"summary":"Approve a suggestion with optional edits","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:write","parameters":[{"name":"suggestion_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestionApprove"}}}}}},"/v1/suggestions/{suggestion_id}/reject":{"post":{"operationId":"post__v1_suggestions_by_suggestion_id_reject","tags":["Review"],"summary":"Reject a suggestion","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:write","parameters":[{"name":"suggestion_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestionReview"}}}}}},"/v1/suggestions/{suggestion_id}/hold":{"post":{"operationId":"post__v1_suggestions_by_suggestion_id_hold","tags":["Review"],"summary":"Place a suggestion on hold","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:write","parameters":[{"name":"suggestion_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestionReview"}}}}}},"/v1/records":{"get":{"operationId":"get__v1_records","tags":["Records"],"summary":"List structured records","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"schema_key","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["active","archived","deleted"]}},{"name":"source_ref","in":"query","required":false,"schema":{"type":"string"}},{"name":"include_current_version","in":"query","required":false,"schema":{"type":"string","enum":["0","1"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":1000000}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"operationId":"post__v1_records","tags":["Records"],"summary":"Create a structured record","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:write","parameters":[],"responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordCreate"}}}}}},"/v1/records/{record_id}":{"get":{"operationId":"get__v1_records_by_record_id","tags":["Records"],"summary":"Get a record and version history","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}},"patch":{"operationId":"patch__v1_records_by_record_id","tags":["Records"],"summary":"Create a new record version","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:write","parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordUpdate"}}}}},"delete":{"operationId":"delete__v1_records_by_record_id","tags":["Records"],"summary":"Delete a record","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:write","parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"x-explicit-user-intent-required":true}},"/v1/records/{record_id}/versions":{"get":{"operationId":"get__v1_records_by_record_id_versions","tags":["Records"],"summary":"List record versions","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":1000000}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/relationships":{"get":{"operationId":"get__v1_relationships","tags":["Relationships"],"summary":"List relationships","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"subject_ref","in":"query","required":false,"schema":{"type":"string"}},{"name":"predicate","in":"query","required":false,"schema":{"type":"string"}},{"name":"object_ref","in":"query","required":false,"schema":{"type":"string"}},{"name":"relationship_class","in":"query","required":false,"schema":{"type":"string","enum":["provenance","semantic","workflow"]}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["suggested","active","rejected","archived"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":1000000}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"operationId":"post__v1_relationships","tags":["Relationships"],"summary":"Create a relationship","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:write","parameters":[],"responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationshipCreate"}}}}}},"/v1/relationships/{relationship_id}":{"get":{"operationId":"get__v1_relationships_by_relationship_id","tags":["Relationships"],"summary":"Get a relationship","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"relationship_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}},"patch":{"operationId":"patch__v1_relationships_by_relationship_id","tags":["Relationships"],"summary":"Update a relationship","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:write","parameters":[{"name":"relationship_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationshipUpdate"}}}}}},"/v1/action-requests":{"get":{"operationId":"get__v1_action_requests","tags":["Actions"],"summary":"List action requests","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pending_review","approved","running","completed","failed","cancelled"]}},{"name":"action_key","in":"query","required":false,"schema":{"type":"string"}},{"name":"suggestion_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":1000000}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"operationId":"post__v1_action_requests","tags":["Actions"],"summary":"Create an action request","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:write","parameters":[],"responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionRequestCreate"}}}}}},"/v1/action-requests/{action_request_id}":{"get":{"operationId":"get__v1_action_requests_by_action_request_id","tags":["Actions"],"summary":"Get an action request","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"action_request_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/action-requests/{action_request_id}/approve":{"post":{"operationId":"post__v1_action_requests_by_action_request_id_approve","tags":["Actions"],"summary":"Approve an action request","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:write","x-confirmation-field":"confirm","parameters":[{"name":"action_request_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionApprove"}}}},"x-explicit-user-intent-required":true}},"/v1/action-requests/{action_request_id}/cancel":{"post":{"operationId":"post__v1_action_requests_by_action_request_id_cancel","tags":["Actions"],"summary":"Cancel an action request","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:write","x-confirmation-field":"confirm","parameters":[{"name":"action_request_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionCancel"}}}},"x-explicit-user-intent-required":true}},"/v1/action-requests/{action_request_id}/dispatch":{"post":{"operationId":"post__v1_action_requests_by_action_request_id_dispatch","tags":["Actions"],"summary":"Dispatch an approved action request","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:write","x-confirmation-field":"confirm","parameters":[{"name":"action_request_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionDispatch"}}}},"x-explicit-user-intent-required":true}},"/v1/action-requests/{action_request_id}/complete":{"post":{"operationId":"post__v1_action_requests_by_action_request_id_complete","tags":["Actions"],"summary":"Complete a dispatched action request","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:write","parameters":[{"name":"action_request_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionComplete"}}}}}},"/v1/skills/{skill_key}/invoke":{"post":{"operationId":"post__v1_skills_by_skill_key_invoke","tags":["Skills"],"summary":"Invoke an installed skill","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:write","parameters":[{"name":"skill_key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillInvoke"}}}}}},"/v1/conversations":{"get":{"operationId":"get__v1_conversations","tags":["Conversations"],"summary":"List conversation threads","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["active","archived","all"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":1000000}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"operationId":"post__v1_conversations","tags":["Conversations"],"summary":"Create a conversation thread","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:write","parameters":[],"responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationCreate"}}}}}},"/v1/conversations/{thread_id}":{"get":{"operationId":"get__v1_conversations_by_thread_id","tags":["Conversations"],"summary":"Get a conversation thread","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/conversations/{thread_id}/messages":{"get":{"operationId":"get__v1_conversations_by_thread_id_messages","tags":["Conversations"],"summary":"List conversation messages","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":1000000}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"operationId":"post__v1_conversations_by_thread_id_messages","tags":["Conversations"],"summary":"Send a conversation message","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:write","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationThreadMessageCreate"}}}}}},"/v1/conversation-messages":{"post":{"operationId":"post__v1_conversation_messages","tags":["Conversations"],"summary":"Send a message and create a thread when needed","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:write","parameters":[],"responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationMessageCreate"}}}}}},"/v1/search":{"get":{"operationId":"get__v1_search","tags":["Search"],"summary":"Search the workspace projection","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":1000000}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/assistant/retrieve":{"get":{"operationId":"get__v1_assistant_retrieve","tags":["Search"],"summary":"Retrieve grounded assistant context","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"operationId":"post__v1_assistant_retrieve","tags":["Search"],"summary":"Retrieve grounded assistant context with JSON input","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantRetrieve"}}}}}},"/v1/diagnostics/health":{"get":{"operationId":"get__v1_diagnostics_health","tags":["Maintenance"],"summary":"Read service health diagnostics","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:read","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/jobs/drain":{"post":{"operationId":"post__v1_jobs_drain","tags":["Maintenance"],"summary":"Drain queued work","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:admin","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PositiveLimit"}}}}}},"/v1/sources/finalize":{"post":{"operationId":"post__v1_sources_finalize","tags":["Maintenance"],"summary":"Finalize pending source objects","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:admin","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PositiveLimit"}}}}}},"/v1/sources/reconcile":{"post":{"operationId":"post__v1_sources_reconcile","tags":["Maintenance"],"summary":"Reconcile source object state","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:admin","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceSelector"}}}}}},"/v1/search/rebuild":{"post":{"operationId":"post__v1_search_rebuild","tags":["Maintenance"],"summary":"Rebuild the search projection","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:admin","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceSelector"}}}}}},"/v1/export":{"get":{"operationId":"get__v1_export","tags":["Maintenance"],"summary":"Export the authenticated workspace","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:admin","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/restore":{"post":{"operationId":"post__v1_restore","tags":["Maintenance"],"summary":"Restore a workspace export","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:admin","x-confirmation-field":"confirm","parameters":[],"responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceExport"}}}},"x-explicit-user-intent-required":true}},"/v1/integrity":{"get":{"operationId":"get__v1_integrity","tags":["Maintenance"],"summary":"Run an object integrity check","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:admin","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/rebuild-index":{"post":{"operationId":"post__v1_rebuild_index","tags":["Maintenance"],"summary":"Rebuild the capture index","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:admin","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceSelector"}}}}}},"/v1/maintenance/validate":{"post":{"operationId":"post__v1_maintenance_validate","tags":["Maintenance"],"summary":"Validate workspace state","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:admin","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceSelector"}}}}}},"/v1/maintenance/drain":{"post":{"operationId":"post__v1_maintenance_drain","tags":["Maintenance"],"summary":"Drain all maintenance work","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:admin","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PositiveLimit"}}}}}},"/v1/maintenance/reconcile-sources":{"post":{"operationId":"post__v1_maintenance_reconcile_sources","tags":["Maintenance"],"summary":"Reconcile all source objects","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:admin","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceSelector"}}}}}},"/v1/maintenance/rebuild-search":{"post":{"operationId":"post__v1_maintenance_rebuild_search","tags":["Maintenance"],"summary":"Rebuild the search index","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:admin","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceSelector"}}}}}},"/v1/maintenance/rebuild-index":{"post":{"operationId":"post__v1_maintenance_rebuild_index","tags":["Maintenance"],"summary":"Rebuild the capture index through maintenance","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:admin","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceSelector"}}}}}},"/v1/maintenance/validate-schemas":{"post":{"operationId":"post__v1_maintenance_validate_schemas","tags":["Maintenance"],"summary":"Validate installed schemas","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:admin","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceSelector"}}}}}},"/v1/maintenance/pack-health":{"get":{"operationId":"get__v1_maintenance_pack_health","tags":["Maintenance"],"summary":"Inspect pack health","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:admin","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/maintenance/recompute":{"post":{"operationId":"post__v1_maintenance_recompute","tags":["Maintenance"],"summary":"Recompute derived outputs","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:admin","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaintenanceRecompute"}}}}}},"/v1/maintenance/retry-failed-producers":{"post":{"operationId":"post__v1_maintenance_retry_failed_producers","tags":["Maintenance"],"summary":"Retry failed producer runs","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:admin","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceSelector"}}}}}},"/v1/admin/me":{"get":{"operationId":"get__v1_admin_me","tags":["Administration"],"summary":"Inspect the global administrator identity","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:admin","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/admin/users":{"get":{"operationId":"get__v1_admin_users","tags":["Administration"],"summary":"List users and grants","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:admin","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/admin/users/{user_id}":{"patch":{"operationId":"patch__v1_admin_users_by_user_id","tags":["Administration"],"summary":"Update a user or global administrator grant","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:admin","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserUpdate"}}}}}},"/v1/admin/members":{"get":{"operationId":"get__v1_admin_members","tags":["Administration"],"summary":"List workspace members","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:admin","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"operationId":"post__v1_admin_members","tags":["Administration"],"summary":"Add or update a workspace member","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:admin","parameters":[],"responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminMemberUpsert"}}}}}},"/v1/admin/members/{workspace_id}/{user_id}":{"delete":{"operationId":"delete__v1_admin_members_by_workspace_id_by_user_id","tags":["Administration"],"summary":"Remove a workspace member","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:admin","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"x-explicit-user-intent-required":true}},"/v1/admin/tokens":{"post":{"operationId":"post__v1_admin_tokens","tags":["Administration"],"summary":"Issue a scoped token for a user","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"x-capture-scope":"capture:admin","parameters":[],"responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminApiTokenIssue"}}}}}}},"components":{"responses":{"BadRequest":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"Authentication is required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The credential lacks permission or scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"The resource does not exist in the authenticated workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"cap_pat_ personal access token","description":"A scoped personal API token sent only in the Authorization header."},"sessionCookie":{"type":"apiKey","in":"cookie","name":"better-auth.session_token","description":"The signed Stow browser session cookie. Hosted production cookies may use the __Secure- prefix."},"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://capture-api.youens.com/oauth/authorize","tokenUrl":"https://capture-api.youens.com/oauth/token","scopes":{"capture:read":"Read and search workspace information.","capture:write":"Add captures and change workspace information."}}}}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":true}}},"GoogleCalendarConnect":{"type":"object","additionalProperties":false,"properties":{"callback_url":{"type":"string","format":"uri","description":"Stow origin that Composio should return to. Path is forced to /lab/calendar."}}},"ApiTokenIssue":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","maxLength":120},"scopes":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string","enum":["capture:read","capture:write","capture:admin"]}},"expires_in_days":{"type":"integer","minimum":1,"maximum":3650}}},"AdminApiTokenIssue":{"type":"object","required":["user_id","workspace_id"],"additionalProperties":false,"properties":{"user_id":{"type":"string","minLength":1},"workspace_id":{"type":"string","minLength":1},"name":{"type":"string","maxLength":120},"scopes":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string","enum":["capture:read","capture:write","capture:admin"]}},"expires_in_days":{"type":"integer","minimum":1,"maximum":3650}}},"WorkspaceCreate":{"type":"object","required":["name"],"additionalProperties":false,"properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}}},"WorkspaceSelector":{"type":"object","required":["workspace_id"],"additionalProperties":false,"properties":{"workspace_id":{"type":"string","minLength":1}}},"ObjectRef":{"type":"string","pattern":"^[a-z][a-z0-9_]*:[A-Za-z0-9][A-Za-z0-9_-]{1,127}$"},"PositiveLimit":{"type":"object","additionalProperties":false,"properties":{"limit":{"type":"integer","minimum":1}}},"CatalogPackInstall":{"type":"object","additionalProperties":false,"properties":{"version":{"type":"string"},"workspace_id":{"type":"string","description":"Used only by the open local API. Hosted credentials are workspace-bound."},"enabled":{"type":"boolean","default":true}}},"ProducerConsumeRequirement":{"type":"object","additionalProperties":false,"anyOf":[{"required":["output_kind"]},{"required":["capture_data_kind"]},{"required":["source_type"]},{"required":["capture_scope"]}],"properties":{"output_kind":{"type":"string","minLength":1},"capture_data_kind":{"type":"string","enum":["text","url","audio","image","video","file","email","imported_object"]},"source_type":{"type":"string","minLength":1},"capture_scope":{"type":"string","const":"capture"}}},"ProducerOutputDeclaration":{"type":"object","additionalProperties":false,"anyOf":[{"required":["output_kind"]},{"required":["suggestion_type"]},{"required":["schema_key"]},{"required":["action_key"]}],"properties":{"output_kind":{"type":"string","minLength":1},"suggestion_type":{"type":"string","enum":["create_record","update_record","create_collection","evolve_collection","create_relationship","ask_question","hold_for_review","action_request","store_only"]},"schema_key":{"type":"string","minLength":1},"action_key":{"type":"string","minLength":1}}},"ProducerPolicy":{"type":"object","additionalProperties":false,"properties":{"auto_run":{"type":"boolean","default":false},"execution_tier":{"type":"string","enum":["baseline_auto_run","gated_auto_run","on_demand","maintenance","disabled_deferred"]},"visibility":{"type":"string","enum":["user_facing","debug"]},"gating":{"type":"object","additionalProperties":true},"processing_budget":{"type":"object","additionalProperties":false,"properties":{"max_runs_per_capture":{"type":"integer","minimum":1,"maximum":20,"default":1},"priority":{"type":"integer","minimum":0,"maximum":1000,"default":100},"retention":{"type":"string","enum":["persistent","recomputable","ephemeral"],"default":"recomputable"}}},"side_effects":{"type":"string","enum":["none","internal","external"],"default":"none"},"max_cost":{"type":"string","enum":["free","low","medium","high"],"default":"free"},"max_duration":{"type":"string","enum":["short","medium","long"],"default":"short"},"requires_review":{"type":"boolean","default":true},"implementation_status":{"type":"string","enum":["implemented","disabled","deferred"],"default":"implemented"},"implementation_reason":{"type":"string","minLength":1,"maxLength":1000}}},"ProducerDefinition":{"type":"object","required":["producer_key","producer_version","phase","consumes","produces"],"additionalProperties":false,"properties":{"producer_key":{"type":"string","minLength":1},"producer_version":{"type":"string","minLength":1},"phase":{"type":"string","enum":["ingest","canonical","interpret","expand","triage","execute"]},"consumes":{"type":"object","required":["any_of"],"additionalProperties":false,"properties":{"any_of":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/ProducerConsumeRequirement"}}}},"produces":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/ProducerOutputDeclaration"}},"policy":{"$ref":"#/components/schemas/ProducerPolicy"}}},"SkillDefinition":{"type":"object","required":["skill_key","name","description"],"additionalProperties":false,"properties":{"skill_key":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","minLength":1,"maxLength":2000},"producers":{"type":"array","items":{"type":"string","minLength":1},"default":[]},"actions":{"type":"array","items":{"type":"string","minLength":1},"default":[]}}},"ActionDefinition":{"type":"object","required":["action_key","name","description"],"additionalProperties":false,"properties":{"action_key":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","minLength":1,"maxLength":2000},"input_schema":{"type":"object","additionalProperties":true,"default":{}},"side_effects":{"type":"string","enum":["none","internal","external"],"default":"internal"},"review_required":{"type":"boolean","default":true},"implementation_status":{"type":"string","enum":["implemented","disabled","deferred"],"default":"implemented"},"implementation_reason":{"type":"string","minLength":1,"maxLength":1000},"execution_policy":{"type":"object","required":["mode"],"additionalProperties":false,"properties":{"mode":{"type":"string","enum":["internal","connector","manual","none"]},"requires_connector":{"type":"boolean","default":false}}}}},"PackManifest":{"type":"object","required":["pack_key","name","version","trust_level"],"additionalProperties":false,"properties":{"schema_version":{"type":"string","const":"pack.manifest.v1","default":"pack.manifest.v1"},"pack_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(?:\\.[a-z][a-z0-9_]*)*$"},"name":{"type":"string","minLength":1,"maxLength":160},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:[-+][0-9A-Za-z.-]+)?$"},"trust_level":{"type":"string","enum":["system","first_party","workspace","third_party"]},"description":{"type":"string","minLength":1,"maxLength":2000},"schemas":{"type":"array","items":{"$ref":"#/components/schemas/SchemaDefinitionInput"},"default":[]},"producers":{"type":"array","items":{"$ref":"#/components/schemas/ProducerDefinition"},"default":[]},"skills":{"type":"array","items":{"$ref":"#/components/schemas/SkillDefinition"},"default":[]},"actions":{"type":"array","items":{"$ref":"#/components/schemas/ActionDefinition"},"default":[]},"domain_topic_hints":{"type":"array","maxItems":20,"items":{"type":"object","required":["topic","description"],"additionalProperties":false,"properties":{"topic":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,39}$"},"description":{"type":"string","minLength":3,"maxLength":300}}},"default":[]}}},"PackUpdate":{"type":"object","required":["enabled"],"additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"workspace_id":{"type":"string","description":"Used only by the open local API. Hosted credentials are workspace-bound."}}},"SchemaDefinitionInput":{"type":"object","required":["schema_key","version","name","json_schema"],"additionalProperties":false,"properties":{"schema_key":{"type":"string","minLength":3},"version":{"type":"integer","minimum":1},"name":{"type":"string","minLength":1,"maxLength":160},"json_schema":{"type":"object","additionalProperties":true},"ui_schema":{"type":"object","additionalProperties":true,"default":{}},"relationship_hints":{"type":"array","items":{"type":"object","required":["field","predicate"],"additionalProperties":false,"properties":{"field":{"type":"string","minLength":1},"predicate":{"type":"string","minLength":1},"target_type":{"type":"string","enum":["workspace","user","capture","capture_data","source_object","pack","producer","producer_run","derived_output","schema","record","record_version","relationship","suggestion","action","action_request","conversation_thread","conversation_message","connector"]}}},"default":[]},"status":{"type":"string","enum":["active","deprecated","disabled"],"default":"active"}}},"SchemaRegister":{"type":"object","required":["pack_key","schema"],"additionalProperties":false,"properties":{"workspace_id":{"type":["string","null"],"description":"Optional on the hosted API. The authenticated workspace wins."},"pack_key":{"type":"string","minLength":1},"schema":{"$ref":"#/components/schemas/SchemaDefinitionInput"},"version_policy":{"type":"string","enum":["reject_existing","bump"],"default":"reject_existing"}}},"SchemaPatch":{"type":"object","additionalProperties":false,"properties":{"workspace_id":{"type":["string","null"],"description":"Optional on the hosted API. The authenticated workspace wins."},"name":{"type":"string","minLength":1,"maxLength":160},"status":{"type":"string","enum":["active","deprecated","disabled"]},"ui_schema":{"type":"object","additionalProperties":true}}},"CaptureEnvelope":{"type":"object","required":["source_type","client","data"],"additionalProperties":false,"properties":{"schema_version":{"type":"string","const":"capture.envelope.v1","default":"capture.envelope.v1"},"workspace_id":{"type":"string","description":"Optional on the hosted API. The authenticated workspace wins."},"source_type":{"type":"string"},"captured_at":{"type":"string","format":"date-time"},"client":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":80},"version":{"type":"string","minLength":1,"maxLength":80}},"additionalProperties":false},"data":{"type":"array","minItems":1,"maxItems":50,"items":{"$ref":"#/components/schemas/CaptureDataInput"}},"metadata":{"type":"object","additionalProperties":true,"default":{}}}},"CaptureDataInput":{"oneOf":[{"$ref":"#/components/schemas/CaptureTextDataInput"},{"$ref":"#/components/schemas/CaptureUrlDataInput"},{"$ref":"#/components/schemas/CaptureBinaryDataInput"}],"discriminator":{"propertyName":"kind"}},"CaptureTextDataInput":{"type":"object","required":["kind","text"],"properties":{"kind":{"type":"string","const":"text"},"text":{"type":"string","minLength":1,"maxLength":1000000},"mime_type":{"type":"string","minLength":1,"maxLength":255,"default":"text/plain"},"submitted_metadata":{"type":"object","additionalProperties":true,"default":{}}},"additionalProperties":false},"CaptureUrlDataInput":{"type":"object","required":["kind","url"],"properties":{"kind":{"type":"string","const":"url"},"url":{"type":"string","format":"uri"},"mime_type":{"type":"string","minLength":1,"maxLength":255,"default":"text/uri-list"},"submitted_metadata":{"type":"object","additionalProperties":true,"default":{}}},"additionalProperties":false},"CaptureBinaryDataInput":{"type":"object","required":["kind","mime_type","size_bytes"],"properties":{"kind":{"type":"string","enum":["audio","image","video","file","email","imported_object"]},"file_name":{"type":"string","minLength":1,"maxLength":255},"mime_type":{"type":"string","minLength":1,"maxLength":255},"size_bytes":{"type":"integer","minimum":0},"checksum_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"content_base64":{"type":"string","minLength":1,"contentEncoding":"base64"},"submitted_metadata":{"type":"object","additionalProperties":true,"default":{}}},"additionalProperties":false},"UserDerivedOutputCreate":{"type":"object","required":["output_kind","value"],"additionalProperties":false,"properties":{"output_kind":{"type":"string","minLength":1},"value":{"type":"string","minLength":1},"edited_by_ref":{"$ref":"#/components/schemas/ObjectRef"}}},"ProducerQueueRequest":{"type":"object","additionalProperties":false,"properties":{"workspace_id":{"type":"string","description":"Required only by the open local API. Hosted credentials are workspace-bound."},"requested_by_ref":{"anyOf":[{"$ref":"#/components/schemas/ObjectRef"},{"type":"null"}]},"reason":{"type":["string","null"]}}},"SuggestionApprove":{"type":"object","additionalProperties":false,"properties":{"reviewed_by_ref":{"$ref":"#/components/schemas/ObjectRef"},"overrides":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","minLength":1},"data":{"type":"object","additionalProperties":true}}}}},"SuggestionReview":{"type":"object","additionalProperties":false,"properties":{"reviewed_by_ref":{"$ref":"#/components/schemas/ObjectRef"},"reason":{"type":"string"}}},"RecordCreate":{"type":"object","required":["schema_key","data"],"additionalProperties":false,"properties":{"workspace_id":{"type":"string","description":"Required only by the open local API. Hosted credentials are workspace-bound."},"schema_key":{"type":"string","minLength":1},"schema_version":{"type":"integer","minimum":1},"title":{"type":["string","null"],"maxLength":240},"data":{"type":"object","additionalProperties":true},"source_refs":{"type":"array","items":{"$ref":"#/components/schemas/ObjectRef"}},"created_by_ref":{"anyOf":[{"$ref":"#/components/schemas/ObjectRef"},{"type":"null"}]}}},"RecordUpdate":{"type":"object","required":["data"],"additionalProperties":false,"properties":{"title":{"type":["string","null"],"maxLength":240},"status":{"type":"string","enum":["active","archived","deleted"]},"data":{"type":"object","additionalProperties":true},"source_refs":{"type":"array","items":{"$ref":"#/components/schemas/ObjectRef"}},"updated_by_ref":{"anyOf":[{"$ref":"#/components/schemas/ObjectRef"},{"type":"null"}]}}},"RelationshipCreate":{"type":"object","required":["relationship_class","subject_ref","predicate","object_ref"],"additionalProperties":false,"properties":{"workspace_id":{"type":"string","description":"Required only by the open local API. Hosted credentials are workspace-bound."},"relationship_class":{"type":"string","enum":["provenance","semantic","workflow"]},"subject_ref":{"$ref":"#/components/schemas/ObjectRef"},"predicate":{"type":"string","minLength":1},"object_ref":{"$ref":"#/components/schemas/ObjectRef"},"confidence":{"type":["number","null"],"minimum":0,"maximum":1},"source_ref":{"anyOf":[{"$ref":"#/components/schemas/ObjectRef"},{"type":"null"}]},"created_by_ref":{"anyOf":[{"$ref":"#/components/schemas/ObjectRef"},{"type":"null"}]}}},"RelationshipUpdate":{"type":"object","additionalProperties":false,"properties":{"status":{"type":"string","enum":["suggested","active","rejected","archived"]},"confidence":{"type":["number","null"],"minimum":0,"maximum":1},"source_ref":{"anyOf":[{"$ref":"#/components/schemas/ObjectRef"},{"type":"null"}]},"created_by_ref":{"anyOf":[{"$ref":"#/components/schemas/ObjectRef"},{"type":"null"}]}}},"ActionRequestCreate":{"type":"object","required":["action_key","input","idempotency_key"],"additionalProperties":false,"properties":{"workspace_id":{"type":"string","description":"Required only by the open local API. Hosted credentials are workspace-bound."},"action_key":{"type":"string","minLength":1},"input":{"type":"object","additionalProperties":true},"idempotency_key":{"type":"string","minLength":1,"maxLength":240},"requested_by_ref":{"anyOf":[{"$ref":"#/components/schemas/ObjectRef"},{"type":"null"}]}}},"ActionApprove":{"type":"object","required":["confirm"],"additionalProperties":false,"properties":{"confirm":{"type":"boolean","const":true},"approved_by_ref":{"$ref":"#/components/schemas/ObjectRef"}}},"ActionCancel":{"type":"object","required":["confirm"],"additionalProperties":false,"properties":{"confirm":{"type":"boolean","const":true},"cancelled_by_ref":{"$ref":"#/components/schemas/ObjectRef"}}},"ActionDispatch":{"type":"object","required":["confirm"],"additionalProperties":false,"properties":{"confirm":{"type":"boolean","const":true}}},"ActionComplete":{"type":"object","required":["executed_by"],"additionalProperties":false,"properties":{"executed_by":{"type":"string","minLength":1},"status":{"type":"string","enum":["completed","failed"]},"external_ref":{"type":["string","null"]},"detail":{"type":"object","additionalProperties":true},"error":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}}},"SkillInvoke":{"type":"object","required":["capture_id"],"additionalProperties":false,"properties":{"capture_id":{"type":"string","minLength":1},"params":{"type":"object","additionalProperties":true,"default":{}}}},"ConversationCreate":{"type":"object","additionalProperties":false,"properties":{"workspace_id":{"type":"string","description":"Required only by the open local API. Hosted credentials are workspace-bound."},"title":{"type":["string","null"]},"created_by_ref":{"$ref":"#/components/schemas/ObjectRef"}}},"ConversationMessageCreate":{"type":"object","required":["content"],"additionalProperties":false,"properties":{"workspace_id":{"type":"string","description":"Accepted only by the route that can create a thread. Hosted credentials are workspace-bound."},"thread_id":{"type":["string","null"]},"content":{"type":"string","minLength":1},"actor_ref":{"$ref":"#/components/schemas/ObjectRef"},"limit":{"type":"integer","minimum":1}}},"ConversationThreadMessageCreate":{"type":"object","required":["content"],"additionalProperties":false,"properties":{"content":{"type":"string","minLength":1},"actor_ref":{"$ref":"#/components/schemas/ObjectRef"},"limit":{"type":"integer","minimum":1}}},"AssistantRetrieve":{"type":"object","required":["query"],"additionalProperties":false,"properties":{"workspace_id":{"type":"string","description":"Required only by the open local API. Hosted credentials are workspace-bound."},"query":{"type":"string","minLength":1},"limit":{"type":"integer","minimum":1}}},"MaintenanceRecompute":{"type":"object","required":["capture_id"],"additionalProperties":false,"properties":{"workspace_id":{"type":"string","description":"Required only by the open local API. Hosted credentials are workspace-bound."},"capture_id":{"type":"string","minLength":1}}},"AdminUserUpdate":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1},"is_global_admin":{"type":"boolean"}}},"AdminMemberUpsert":{"type":"object","required":["workspace_id"],"anyOf":[{"required":["user_id"]},{"required":["email"]}],"additionalProperties":false,"properties":{"workspace_id":{"type":"string","minLength":1},"user_id":{"type":"string","minLength":1},"email":{"type":"string","format":"email"},"role":{"type":"string","minLength":1,"default":"member"}}},"WorkspaceExport":{"type":"object","required":["confirm","schema_version","exported_at","workspace_id","object_bodies","source_objects","packs","schemas","captures","capture_data","producer_runs","derived_outputs","records","record_versions","relationships","suggestions","action_requests","connectors"],"additionalProperties":false,"properties":{"confirm":{"type":"boolean","const":true},"schema_version":{"type":"string","const":"capture.workspace_export.v1"},"exported_at":{"type":"string","format":"date-time"},"workspace_id":{"type":"string","minLength":1},"object_bodies":{"type":"array","items":{"type":"object","required":["storage_key","content_base64","checksum_sha256"],"additionalProperties":false,"properties":{"storage_key":{"type":"string","minLength":1},"content_base64":{"type":"string","minLength":1,"contentEncoding":"base64"},"checksum_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}}}},"source_objects":{"type":"array","items":{"type":"object","additionalProperties":true}},"packs":{"type":"array","items":{"$ref":"#/components/schemas/PackManifest"}},"schemas":{"type":"array","items":{"$ref":"#/components/schemas/SchemaDefinitionInput"}},"captures":{"type":"array","items":{"type":"object","additionalProperties":true}},"capture_data":{"type":"array","items":{"type":"object","additionalProperties":true}},"producer_runs":{"type":"array","items":{"type":"object","additionalProperties":true}},"derived_outputs":{"type":"array","items":{"type":"object","additionalProperties":true}},"records":{"type":"array","items":{"type":"object","additionalProperties":true}},"record_versions":{"type":"array","items":{"type":"object","additionalProperties":true}},"relationships":{"type":"array","items":{"type":"object","additionalProperties":true}},"suggestions":{"type":"array","items":{"type":"object","additionalProperties":true}},"action_requests":{"type":"array","items":{"type":"object","additionalProperties":true}},"conversation_threads":{"type":"array","items":{"type":"object","additionalProperties":true},"default":[]},"conversation_messages":{"type":"array","items":{"type":"object","additionalProperties":true},"default":[]},"connectors":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}